diff --git a/.github/workflows/python.yml b/.github/workflows/python.yml new file mode 100644 index 0000000..1ef8b66 --- /dev/null +++ b/.github/workflows/python.yml @@ -0,0 +1,38 @@ +# NOTE: This file is auto generated by OpenAPI Generator. +# URL: https://openapi-generator.tech +# +# ref: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python + +name: finix Python package + +on: [push, pull_request] + +jobs: + build: + + runs-on: ubuntu-latest + strategy: + matrix: + python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"] + + steps: + - uses: actions/checkout@v3 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install flake8 pytest + if [ -f requirements.txt ]; then pip install -r requirements.txt; fi + if [ -f test-requirements.txt ]; then pip install -r test-requirements.txt; fi + - name: Lint with flake8 + run: | + # stop the build if there are Python syntax errors or undefined names + flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics + # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide + flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics + - name: Test with pytest + run: | + pytest diff --git a/finix/api/authorizations_api.py b/finix/api/authorizations_api.py index 00ed1c8..d1b1992 100644 --- a/finix/api/authorizations_api.py +++ b/finix/api/authorizations_api.py @@ -19,17 +19,17 @@ none_type, validate_and_convert_types ) -from finix.model.authorization import Authorization -from finix.model.authorization_captured import AuthorizationCaptured -from finix.model.authorizations_list import AuthorizationsList -from finix.model.create_authorization_request import CreateAuthorizationRequest -from finix.model.error401_unauthorized import Error401Unauthorized -from finix.model.error403_forbidden_list import Error403ForbiddenList -from finix.model.error404_not_found_list import Error404NotFoundList -from finix.model.error406_not_acceptable import Error406NotAcceptable -from finix.model.error422_invalid_field_list import Error422InvalidFieldList -from finix.model.error_generic import ErrorGeneric -from finix.model.update_authorization_request import UpdateAuthorizationRequest +from typing_extensions import Annotated +from pydantic import Field, StrictInt, StrictStr + +from typing import Optional + +from finix.models.authorization import Authorization +from finix.models.authorization_captured import AuthorizationCaptured +from finix.models.authorizations_list import AuthorizationsList +from finix.models.create_authorization_request import CreateAuthorizationRequest +from finix.models.update_authorization_request import UpdateAuthorizationRequest +from finix.models.void_authorization import VoidAuthorization from finix.model.finix_utils import FinixList from functools import wraps @@ -79,6 +79,8 @@ def __init__(self, api_client=None): params_map={ 'all': [ 'authorization_id', + 'accept', + 'finix_version', 'update_authorization_request', ], 'required': [ @@ -99,14 +101,22 @@ def __init__(self, api_client=None): 'openapi_types': { 'authorization_id': (str,), + 'accept': + (str,), + 'finix_version': + (str,), 'update_authorization_request': (UpdateAuthorizationRequest,), }, 'attribute_map': { 'authorization_id': 'authorization_id', + 'accept': 'Accept', + 'finix_version': 'Finix-Version', }, 'location_map': { 'authorization_id': 'path', + 'accept': 'header', + 'finix_version': 'header', 'update_authorization_request': 'body', }, 'collection_format_map': { @@ -114,10 +124,10 @@ def __init__(self, api_client=None): }, headers_map={ 'accept': [ - 'application/hal+json' + 'application/json' ], 'content_type': [ - 'application/hal+json' + 'application/json' ] }, api_client=api_client @@ -135,6 +145,8 @@ def __init__(self, api_client=None): }, params_map={ 'all': [ + 'accept', + 'finix_version', 'create_authorization_request', ], 'required': [], @@ -151,12 +163,20 @@ def __init__(self, api_client=None): 'allowed_values': { }, 'openapi_types': { + 'accept': + (str,), + 'finix_version': + (str,), 'create_authorization_request': (CreateAuthorizationRequest,), }, 'attribute_map': { + 'accept': 'Accept', + 'finix_version': 'Finix-Version', }, 'location_map': { + 'accept': 'header', + 'finix_version': 'header', 'create_authorization_request': 'body', }, 'collection_format_map': { @@ -164,10 +184,10 @@ def __init__(self, api_client=None): }, headers_map={ 'accept': [ - 'application/hal+json' + 'application/json' ], 'content_type': [ - 'application/hal+json' + 'application/json' ] }, api_client=api_client @@ -186,6 +206,7 @@ def __init__(self, api_client=None): params_map={ 'all': [ 'authorization_id', + 'accept', ], 'required': [ 'authorization_id', @@ -205,19 +226,23 @@ def __init__(self, api_client=None): 'openapi_types': { 'authorization_id': (str,), + 'accept': + (str,), }, 'attribute_map': { 'authorization_id': 'authorization_id', + 'accept': 'Accept', }, 'location_map': { 'authorization_id': 'path', + 'accept': 'header', }, 'collection_format_map': { } }, headers_map={ 'accept': [ - 'application/hal+json' + 'application/json' ], 'content_type': [], }, @@ -236,17 +261,20 @@ def __init__(self, api_client=None): }, params_map={ 'all': [ + 'accept', 'amount', 'amount_gt', 'amount_gte', 'amount_lt', 'amount_lte', 'before_cursor', + 'after_cursor', 'created_at_gte', 'created_at_lte', 'idempotency_id', 'limit', - 'sort', + 'tags_key', + 'tags_value', 'state', 'updated_at_gte', 'updated_at_lte', @@ -264,7 +292,7 @@ def __init__(self, api_client=None): 'instrument_card_last4', 'merchant_processor_id', 'type', - 'after_cursor', + 'finix_version', ], 'required': [], 'nullable': [ @@ -281,13 +309,15 @@ def __init__(self, api_client=None): 'allowed_values': { ('state',): { - "SUCCEEDED": "SUCCEEDED", - "FAILED": "FAILED", - "PENDING": "PENDING", - "CANCELED": "CANCELED" + "'SUCCEEDED'": 'SUCCEEDED', + "'FAILED'": 'FAILED', + "'PENDING'": 'PENDING', + "'CANCELED'": 'CANCELED' }, }, 'openapi_types': { + 'accept': + (str,), 'amount': (int,), 'amount_gt': @@ -300,6 +330,8 @@ def __init__(self, api_client=None): (int,), 'before_cursor': (str,), + 'after_cursor': + (str,), 'created_at_gte': (str,), 'created_at_lte': @@ -308,7 +340,9 @@ def __init__(self, api_client=None): (str,), 'limit': (int,), - 'sort': + 'tags_key': + (str,), + 'tags_value': (str,), 'state': (str,), @@ -344,21 +378,24 @@ def __init__(self, api_client=None): (str,), 'type': (str,), - 'after_cursor': + 'finix_version': (str,), }, 'attribute_map': { + 'accept': 'Accept', 'amount': 'amount', 'amount_gt': 'amount.gt', 'amount_gte': 'amount.gte', 'amount_lt': 'amount.lt', 'amount_lte': 'amount.lte', 'before_cursor': 'before_cursor', + 'after_cursor': 'after_cursor', 'created_at_gte': 'created_at.gte', 'created_at_lte': 'created_at.lte', 'idempotency_id': 'idempotency_id', 'limit': 'limit', - 'sort': 'sort', + 'tags_key': 'tags.key', + 'tags_value': 'tags.value', 'state': 'state', 'updated_at_gte': 'updated_at.gte', 'updated_at_lte': 'updated_at.lte', @@ -376,20 +413,23 @@ def __init__(self, api_client=None): 'instrument_card_last4': 'instrument_card_last4', 'merchant_processor_id': 'merchant_processor_id', 'type': 'type', - 'after_cursor': 'after_cursor', + 'finix_version': 'Finix-Version', }, 'location_map': { + 'accept': 'header', 'amount': 'query', 'amount_gt': 'query', 'amount_gte': 'query', 'amount_lt': 'query', 'amount_lte': 'query', 'before_cursor': 'query', + 'after_cursor': 'query', 'created_at_gte': 'query', 'created_at_lte': 'query', 'idempotency_id': 'query', 'limit': 'query', - 'sort': 'query', + 'tags_key': 'query', + 'tags_value': 'query', 'state': 'query', 'updated_at_gte': 'query', 'updated_at_lte': 'query', @@ -407,19 +447,86 @@ def __init__(self, api_client=None): 'instrument_card_last4': 'query', 'merchant_processor_id': 'query', 'type': 'query', - 'after_cursor': 'query', + 'finix_version': 'header', }, 'collection_format_map': { } }, headers_map={ 'accept': [ - 'application/hal+json' + 'application/json' ], 'content_type': [], }, api_client=api_client ) + self._update_endpoint = finix.api_client.Endpoint( + settings={ + 'response_type': (AuthorizationCaptured,), + 'auth': [ + 'BasicAuth' + ], + 'endpoint_path': '/authorizations/{authorization_id_void_to}', + 'operation_id': 'update', + 'http_method': 'PUT', + 'servers': None, + }, + params_map={ + 'all': [ + 'authorization_id_void_to', + 'accept', + 'finix_version', + 'void_authorization', + ], + 'required': [ + 'authorization_id_void_to', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'authorization_id_void_to': + (str,), + 'accept': + (str,), + 'finix_version': + (str,), + 'void_authorization': + (VoidAuthorization,), + }, + 'attribute_map': { + 'authorization_id_void_to': 'authorization_id_void_to', + 'accept': 'Accept', + 'finix_version': 'Finix-Version', + }, + 'location_map': { + 'authorization_id_void_to': 'path', + 'accept': 'header', + 'finix_version': 'header', + 'void_authorization': 'body', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client + ) def update( self, @@ -428,7 +535,7 @@ def update( ): """Capture an Authorization # noqa: E501 - If successfully captured, the `transfer` field of the `Authorization` will contain the ID of the `Transfer` resource that'll move funds. By default, `Transfers` are in a **PENDING** state. The **PENDING** state means the request to capture funds hasn't been submitted yet. Capture requests get submitted via a batch request. Once the `Authorization` is updated with a `capture_amount` (i.e. *Captured*), the state of the `Transfer` will update to **SUCCEEDED**. > Voided `Authorizations` can't be captured. # noqa: E501 + Use a PUT request to capture an `Authorization`. If captured successfully, the `transfer` field of the `Authorization` will contain the ID of the `Transfer` resource that moves funds. Related Guides: [Creating and Capturing an Authorization](/guides/payments/making-a-payment/creating-and-capturing-an-authorization/), [Level 2 and 3 Processing](/guides/payments/making-a-payment/level-2-and-level-3-processing/), [In-Person Cloud Payments](/guides/payments/in-person-payments/cloud/in-person-cloud-payments/), [Buyer Charges](/guides/payments/making-a-payment/buyer-charges/) # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -439,6 +546,8 @@ def update( authorization_id (str): ID of `Authorization` to fetch. Keyword Args: + accept (str): [optional] if omitted the server will use the default value of 'application/hal+json' + finix_version (str): Specify the API version of your request. For more details, see [Versioning.](/guides/developers/versioning/). [optional] if omitted the server will use the default value of '2018-01-01' update_authorization_request (UpdateAuthorizationRequest): [optional] _return_http_data_only (bool): response data without head status code and headers. Default is True. @@ -506,7 +615,7 @@ def create( ): """Create an Authorization # noqa: E501 - Create an `Authorization` to process a transaction. `Authorizations` can have six possible `states`, two of which are expected: - **SUCCEEDED** - **FAILED** If the `Authorization` has **SUCCEEDED** , it must be captured before `expires_at` passes or the funds will be released. If the `transfer` field of an `Authorization` is **null**, it hasn't been captured yet. Learn how to prevent duplicate authorizations by passing an [Idempotency ID](#section/Idempotency-Requests) in the payload. - `Authorizations` on debit cards place a hold on funds in the cardholder's bank account and can lead to lower than expected balances or issues with insufficient funds. # noqa: E501 + Create an `Authorization` to process a transaction. Related Guides: [Creating and Capturing an Authorization](/guides/payments/making-a-payment/creating-and-capturing-an-authorization/), [Level 2 and 3 Processing](/guides/payments/making-a-payment/level-2-and-level-3-processing/), [In-Person Cloud Payments](/guides/payments/in-person-payments/cloud/in-person-cloud-payments/), [Buyer Charges](/guides/payments/making-a-payment/buyer-charges/) # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -515,6 +624,8 @@ def create( Keyword Args: + accept (str): [optional] if omitted the server will use the default value of 'application/hal+json' + finix_version (str): Specify the API version of your request. For more details, see [Versioning.](/guides/developers/versioning/). [optional] if omitted the server will use the default value of '2018-01-01' create_authorization_request (CreateAuthorizationRequest): [optional] _return_http_data_only (bool): response data without head status code and headers. Default is True. @@ -592,6 +703,7 @@ def get( authorization_id (str): ID of `Authorization` to fetch. Keyword Args: + accept (str): [optional] if omitted the server will use the default value of 'application/hal+json' _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object @@ -667,17 +779,20 @@ def list( Keyword Args: + accept (str): Body Header. [optional] if omitted the server will use the default value of 'application/hal+json' amount (int): Filter by an amount equal to the given value.. [optional] amount_gt (int): Filter by an amount greater than.. [optional] amount_gte (int): Filter by an amount greater than or equal.. [optional] amount_lt (int): Filter by an amount less than.. [optional] amount_lte (int): Filter by an amount less than or equal.. [optional] before_cursor (str): Return every resource created before the cursor value.. [optional] + after_cursor (str): Return every resource created after the cursor value.. [optional] created_at_gte (str): Filter where `created_at` is after the given date.. [optional] created_at_lte (str): Filter where `created_at` is before the given date.. [optional] idempotency_id (str): Filter by `idempotency_id`.. [optional] limit (int): The numbers of items to return.. [optional] - sort (str): Specify key to be used for sorting the collection.. [optional] + tags_key (str): Filter by the [`key` of a `Tag`](/api/overview/#section/Tags).. [optional] + tags_value (str): Filter by the [value of a `Tag`](https://finix.com/docs/api/overview/#section/Tags).. [optional] state (str): Filter by Transaction state.. [optional] updated_at_gte (str): Filter where `updated_at` is after the given date.. [optional] updated_at_lte (str): Filter where `updated_at` is before the given date.. [optional] @@ -695,7 +810,7 @@ def list( instrument_card_last4 (str): Filter by the payment card last 4 digits.. [optional] merchant_processor_id (str): Filter by `Processor` ID.. [optional] type (str): Type of the `Authorization`.. [optional] - after_cursor (str): Return every resource created after the cursor value.. [optional] + finix_version (str): Specify the API version of your request. For more details, see [Versioning.](/guides/developers/versioning/). [optional] if omitted the server will use the default value of '2018-01-01' _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object @@ -756,3 +871,84 @@ def list( fl = FinixList(ret, self.list, **kwargs) return fl + def update( + self, + authorization_id_void_to, + **kwargs + ): + """Void an Authorization # noqa: E501 + + Use a PUT request to void an `Authorization`. If voided successfully, funds get released and the transaction stops from completing. Additionally, voided `Authorization` can no longer be captured. Related Guides: [Creating and Capturing an Authorization](/guides/payments/making-a-payment/creating-and-capturing-an-authorization/), [Level 2 and 3 Processing](/guides/payments/making-a-payment/level-2-and-level-3-processing/), [In-Person Cloud Payments](/guides/payments/in-person-payments/cloud/in-person-cloud-payments/), [Buyer Charges](/guides/payments/making-a-payment/buyer-charges/) # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.update(authorization_id_void_to, async_req=True) + >>> result = thread.get() + + Args: + authorization_id_void_to (str): + + Keyword Args: + accept (str): [optional] if omitted the server will use the default value of 'application/hal+json' + finix_version (str): Specify the API version of your request. For more details, see [Versioning.](/guides/developers/versioning/). [optional] if omitted the server will use the default value of '2018-01-01' + void_authorization (VoidAuthorization): [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + AuthorizationCaptured + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', False + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', False + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['authorization_id_void_to'] = \ + authorization_id_void_to + return self._update_endpoint.call_with_http_info(**kwargs) + diff --git a/finix/api/balance_transfers_api.py b/finix/api/balance_transfers_api.py index 4228522..b63037b 100644 --- a/finix/api/balance_transfers_api.py +++ b/finix/api/balance_transfers_api.py @@ -19,14 +19,14 @@ none_type, validate_and_convert_types ) -from finix.model.balance_transfer import BalanceTransfer -from finix.model.balance_transfer_list import BalanceTransferList -from finix.model.create_balance_transfer_request import CreateBalanceTransferRequest -from finix.model.error401_unauthorized import Error401Unauthorized -from finix.model.error403_forbidden_list import Error403ForbiddenList -from finix.model.error404_not_found_list import Error404NotFoundList -from finix.model.error406_not_acceptable import Error406NotAcceptable -from finix.model.error_generic import ErrorGeneric +from typing_extensions import Annotated +from pydantic import Field, StrictInt, StrictStr + +from typing import Optional + +from finix.models.balance_transfer import BalanceTransfer +from finix.models.balance_transfer_list import BalanceTransferList +from finix.models.create_balance_transfer_request import CreateBalanceTransferRequest from finix.model.finix_utils import FinixList from functools import wraps @@ -75,6 +75,7 @@ def __init__(self, api_client=None): }, params_map={ 'all': [ + 'accept', 'create_balance_transfer_request', ], 'required': [], @@ -91,12 +92,16 @@ def __init__(self, api_client=None): 'allowed_values': { }, 'openapi_types': { + 'accept': + (str,), 'create_balance_transfer_request': (CreateBalanceTransferRequest,), }, 'attribute_map': { + 'accept': 'Accept', }, 'location_map': { + 'accept': 'header', 'create_balance_transfer_request': 'body', }, 'collection_format_map': { @@ -104,10 +109,10 @@ def __init__(self, api_client=None): }, headers_map={ 'accept': [ - 'application/hal+json' + 'application/json' ], 'content_type': [ - 'application/hal+json' + 'application/json' ] }, api_client=api_client @@ -126,6 +131,7 @@ def __init__(self, api_client=None): params_map={ 'all': [ 'balance_transfers_id', + 'accept', ], 'required': [ 'balance_transfers_id', @@ -145,19 +151,23 @@ def __init__(self, api_client=None): 'openapi_types': { 'balance_transfers_id': (str,), + 'accept': + (str,), }, 'attribute_map': { 'balance_transfers_id': 'balance_transfers_id', + 'accept': 'Accept', }, 'location_map': { 'balance_transfers_id': 'path', + 'accept': 'header', }, 'collection_format_map': { } }, headers_map={ 'accept': [ - 'application/hal+json' + 'application/json' ], 'content_type': [], }, @@ -176,8 +186,8 @@ def __init__(self, api_client=None): }, params_map={ 'all': [ + 'accept', 'limit', - 'offset', 'page_number', 'page_size', 'created_at_gte', @@ -206,10 +216,10 @@ def __init__(self, api_client=None): 'allowed_values': { }, 'openapi_types': { + 'accept': + (str,), 'limit': (int,), - 'offset': - (int,), 'page_number': (int,), 'page_size': @@ -238,8 +248,8 @@ def __init__(self, api_client=None): (str,), }, 'attribute_map': { + 'accept': 'Accept', 'limit': 'limit', - 'offset': 'offset', 'page_number': 'pageNumber', 'page_size': 'pageSize', 'created_at_gte': 'created_at.gte', @@ -255,8 +265,8 @@ def __init__(self, api_client=None): 'source': 'source', }, 'location_map': { + 'accept': 'header', 'limit': 'query', - 'offset': 'query', 'page_number': 'query', 'page_size': 'query', 'created_at_gte': 'query', @@ -276,7 +286,7 @@ def __init__(self, api_client=None): }, headers_map={ 'accept': [ - 'application/hal+json' + 'application/json' ], 'content_type': [], }, @@ -298,6 +308,7 @@ def create( Keyword Args: + accept (str): [optional] if omitted the server will use the default value of 'application/hal+json' create_balance_transfer_request (CreateBalanceTransferRequest): [optional] _return_http_data_only (bool): response data without head status code and headers. Default is True. @@ -375,6 +386,7 @@ def get( balance_transfers_id (str): ID of the `balance_transfer` resource. Keyword Args: + accept (str): [optional] if omitted the server will use the default value of 'application/hal+json' _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object @@ -450,8 +462,8 @@ def list( Keyword Args: + accept (str): [optional] if omitted the server will use the default value of 'application/hal+json' limit (int): The numbers of items to return.. [optional] - offset (int): The number of items to skip before starting to collect the result set.. [optional] page_number (int): The page number to list.. [optional] page_size (int): The size of the page.. [optional] created_at_gte (str): Filter where `created_at` is after the given date.. [optional] diff --git a/finix/api/compliance_forms_api.py b/finix/api/compliance_forms_api.py index 4689920..5850d7c 100644 --- a/finix/api/compliance_forms_api.py +++ b/finix/api/compliance_forms_api.py @@ -19,13 +19,14 @@ none_type, validate_and_convert_types ) -from finix.model.compliance_form import ComplianceForm -from finix.model.error401_unauthorized import Error401Unauthorized -from finix.model.error403_forbidden_list import Error403ForbiddenList -from finix.model.error404_not_found_list import Error404NotFoundList -from finix.model.error406_not_acceptable import Error406NotAcceptable -from finix.model.error422_invalid_field_list import Error422InvalidFieldList -from finix.model.update_compliance_form_request import UpdateComplianceFormRequest +from typing_extensions import Annotated +from pydantic import Field, StrictStr + +from typing import Optional + +from finix.models.compliance_form import ComplianceForm +from finix.models.compliance_form_list import ComplianceFormList +from finix.models.update_compliance_form_request import UpdateComplianceFormRequest from finix.model.finix_utils import FinixList from functools import wraps @@ -75,6 +76,7 @@ def __init__(self, api_client=None): params_map={ 'all': [ 'compliance_forms_id', + 'accept', ], 'required': [ 'compliance_forms_id', @@ -94,20 +96,83 @@ def __init__(self, api_client=None): 'openapi_types': { 'compliance_forms_id': (str,), + 'accept': + (str,), }, 'attribute_map': { 'compliance_forms_id': 'compliance_forms_id', + 'accept': 'Accept', }, 'location_map': { 'compliance_forms_id': 'path', + 'accept': 'header', }, 'collection_format_map': { } }, headers_map={ 'accept': [ - 'application/json', - 'application/hal+json' + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self._list_endpoint = finix.api_client.Endpoint( + settings={ + 'response_type': (ComplianceFormList,), + 'auth': [ + 'BasicAuth' + ], + 'endpoint_path': '/compliance_forms', + 'operation_id': 'list', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'accept', + 'state', + ], + 'required': [], + 'nullable': [ + ], + 'enum': [ + 'state', + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + ('state',): { + + "'INCOMPLETE'": 'INCOMPLETE', + "'COMPLETE'": 'COMPLETE' + }, + }, + 'openapi_types': { + 'accept': + (str,), + 'state': + (str,), + }, + 'attribute_map': { + 'accept': 'Accept', + 'state': 'state', + }, + 'location_map': { + 'accept': 'header', + 'state': 'query', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' ], 'content_type': [], }, @@ -127,6 +192,7 @@ def __init__(self, api_client=None): params_map={ 'all': [ 'compliance_forms_id', + 'accept', 'update_compliance_form_request', ], 'required': [ @@ -147,14 +213,18 @@ def __init__(self, api_client=None): 'openapi_types': { 'compliance_forms_id': (str,), + 'accept': + (str,), 'update_compliance_form_request': (UpdateComplianceFormRequest,), }, 'attribute_map': { 'compliance_forms_id': 'compliance_forms_id', + 'accept': 'Accept', }, 'location_map': { 'compliance_forms_id': 'path', + 'accept': 'header', 'update_compliance_form_request': 'body', }, 'collection_format_map': { @@ -162,8 +232,7 @@ def __init__(self, api_client=None): }, headers_map={ 'accept': [ - 'application/json', - 'application/hal+json' + 'application/json' ], 'content_type': [ 'application/json' @@ -177,7 +246,7 @@ def list( compliance_forms_id, **kwargs ): - """View Compliance Forms # noqa: E501 + """Fetch a Compliance Form # noqa: E501 A webhook notifies you when Finix creates a `compliance_form`. Use the ID in the webhook to fetch the `compliance_form` resource from the `/compliance_forms/:COMPLIANCE_FORM_ID:` endpoint. # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -190,6 +259,7 @@ def list( compliance_forms_id (str): ID of the `compliance_form`. Keyword Args: + accept (str): [optional] if omitted the server will use the default value of 'application/hal+json' _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object @@ -250,14 +320,91 @@ def list( compliance_forms_id return self._list_endpoint.call_with_http_info(**kwargs) + def list( + self, + **kwargs + ): + """List Compliance Forms # noqa: E501 + + Retrieves a list of `Compliance Forms`. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.list(async_req=True) + >>> result = thread.get() + + + Keyword Args: + accept (str): [optional] if omitted the server will use the default value of 'application/hal+json' + state (str): Filter by the `state` of the `Compliance Form`.. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + ComplianceFormList + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', False + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', False + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + ret = self._list_endpoint.call_with_http_info(**kwargs) + fl = FinixList(ret, self.list, **kwargs) + return fl + def update( self, compliance_forms_id, **kwargs ): - """Complete Compliance Forms # noqa: E501 + """Complete a Compliance Form # noqa: E501 - As part of onboarding your users, you'll need to build a UI experience that allows users to complete the PCI `compliance_form` and download the form as a PDF if requested. To complete PCI compliance forms: 1. Get the `compliance_form` generated for the merchant using the `ID` from the webhook and present the form to your users when requested. 2. Show your users the [required text](/guides/security-and-compliance/pci-dss-compliance/managing-pci-compliance/#obtaining-compliance-consent) to obtain consent. 3. Submit a PUT API request with the necessary [attestation](/guides/security-and-compliance/pci-dss-compliance/managing-pci-compliance/#completing-the-questionnaire) information. For more information, see [Managing Compliance Forms](/guides/security-and-compliance/pci-dss-compliance/managing-pci-compliance/#completing-compliance-forms). # noqa: E501 + As part of onboarding your users, you'll need to build a UI experience that allows users to complete the PCI `compliance_form` and download the form as a PDF if requested. For more information, see [Managing Compliance Forms](/guides/security-and-compliance/pci-dss-compliance/managing-pci-compliance/#completing-compliance-forms). # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -268,6 +415,7 @@ def update( compliance_forms_id (str): ID of the `compliance_form`. Keyword Args: + accept (str): [optional] if omitted the server will use the default value of 'application/hal+json' update_compliance_form_request (UpdateComplianceFormRequest): [optional] _return_http_data_only (bool): response data without head status code and headers. Default is True. diff --git a/finix/api/default_api.py b/finix/api/default_api.py new file mode 100644 index 0000000..6b7ee13 --- /dev/null +++ b/finix/api/default_api.py @@ -0,0 +1,603 @@ +""" + Finix API + + The version of the OpenAPI document: 2022-02-01 + Contact: support@finixpayments.com +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +import finix.api_client +from finix.model_utils import ( # noqa: F401 + check_allowed_values, + check_validations, + date, + datetime, + file_type, + none_type, + validate_and_convert_types +) +from typing_extensions import Annotated +from pydantic import Field, StrictStr, constr, validator + +from typing import Optional + +from finix.models.application import Application +from finix.models.create_application_request import CreateApplicationRequest +from finix.models.create_settlement_request import CreateSettlementRequest +from finix.models.create_verification_request import CreateVerificationRequest +from finix.models.settlement import Settlement +from finix.models.split_transfers_list import SplitTransfersList +from finix.models.verification import Verification +from finix.model.finix_utils import FinixList + +from functools import wraps + +def operation_decorator(func): + @wraps(func) + def response_convert(*args, **kwargs): + ret = func(*args, **kwargs) + if hasattr(ret, 'embedded'): + tmp = ret.embedded + if isinstance(tmp, dict): + if len(tmp) == 1: + ret_0 = '' + ret_1 = '' + ret_2 = '' + for key in tmp: + ret_0 = tmp[key] + break + if hasattr(ret, 'page'): + ret_1 = ret.page + if hasattr(ret, 'links'): + ret_2 = ret.links + return (ret_0, ret_1, ret_2) + + else: + return ret + + return response_convert + +class DefaultApi(object): + + def __init__(self, api_client=None): + if api_client is None: + api_client = finix.api_client.FinixClient() + self._api_client = api_client + self._create_endpoint = finix.api_client.Endpoint( + settings={ + 'response_type': (Application,), + 'auth': [ + 'BasicAuth' + ], + 'endpoint_path': '/applications', + 'operation_id': 'create', + 'http_method': 'POST', + 'servers': None, + }, + params_map={ + 'all': [ + 'create_application_request', + ], + 'required': [], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'create_application_request': + (CreateApplicationRequest,), + }, + 'attribute_map': { + }, + 'location_map': { + 'create_application_request': 'body', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client + ) + self._create_endpoint = finix.api_client.Endpoint( + settings={ + 'response_type': (Settlement,), + 'auth': [ + 'BasicAuth' + ], + 'endpoint_path': '/identities/{identity_id}/settlements', + 'operation_id': 'create', + 'http_method': 'POST', + 'servers': None, + }, + params_map={ + 'all': [ + 'identity_id', + 'accept', + 'create_settlement_request', + ], + 'required': [ + 'identity_id', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'identity_id': + (str,), + 'accept': + (str,), + 'create_settlement_request': + (CreateSettlementRequest,), + }, + 'attribute_map': { + 'identity_id': 'identity_id', + 'accept': 'Accept', + }, + 'location_map': { + 'identity_id': 'path', + 'accept': 'header', + 'create_settlement_request': 'body', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client + ) + self._create_endpoint = finix.api_client.Endpoint( + settings={ + 'response_type': (Verification,), + 'auth': [ + 'BasicAuth' + ], + 'endpoint_path': '/verifications', + 'operation_id': 'create', + 'http_method': 'POST', + 'servers': None, + }, + params_map={ + 'all': [ + 'create_verification_request', + ], + 'required': [], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'create_verification_request': + (CreateVerificationRequest,), + }, + 'attribute_map': { + }, + 'location_map': { + 'create_verification_request': 'body', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client + ) + self._list_split_transfer_endpoint = finix.api_client.Endpoint( + settings={ + 'response_type': (SplitTransfersList,), + 'auth': [ + 'BasicAuth' + ], + 'endpoint_path': '/split_transfers', + 'operation_id': 'list_split_transfer', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'parent_transfer_id', + 'accept', + ], + 'required': [ + 'parent_transfer_id', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + 'parent_transfer_id', + ] + }, + root_map={ + 'validations': { + ('parent_transfer_id',): { + + 'regex': { + 'pattern': r'TRxxxxxxxxxxxxxxxxxxxxxx', # noqa: E501 + }, + }, + }, + 'allowed_values': { + }, + 'openapi_types': { + 'parent_transfer_id': + (str,), + 'accept': + (str,), + }, + 'attribute_map': { + 'parent_transfer_id': 'parent_transfer_id', + 'accept': 'Accept', + }, + 'location_map': { + 'parent_transfer_id': 'query', + 'accept': 'header', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) + + def create( + self, + **kwargs + ): + """Create an Application # noqa: E501 + + If created successfully, a 201 response gets returned and adds a location header to the response which refers to the new created `Application`. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create(async_req=True) + >>> result = thread.get() + + + Keyword Args: + create_application_request (CreateApplicationRequest): [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + Application + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', False + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', False + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + return self._create_endpoint.call_with_http_info(**kwargs) + + def create( + self, + identity_id, + **kwargs + ): + """Close Current Active Settlement # noqa: E501 + + Close the currently accruing `settlement`. Finix, by default, creates accruing `settlements` then closes them based on your payout configurations. Use this endpoint to manually close the currently accruing settlement. The closed `Settlement` will not accrue any further transactions and gets immediately submitted for approval. - This endpoint is only available to Finix Core customers. If you have any questions, please contact the [Finix Support Team.](mailto:support@finixpayments.com) - Any refunded `Transfers` get included in `Settlements` as a deduction. - **PENDING** `Transfers` don't get included in `Settlements`. - The `total_amount` minus the `total_fee` equals the `net_amount`. The `net_amount` is the amount in cents that gets deposited into the seller's bank account. Related Guides: [Accruing Settlements](/guides/payouts/accruing-settlements/#closing-an-accruing-settlement) # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create(identity_id, async_req=True) + >>> result = thread.get() + + Args: + identity_id (str): ID of the `Identity` for the merchant you want to settle. + + Keyword Args: + accept (str): [optional] if omitted the server will use the default value of 'application/hal+json' + create_settlement_request (CreateSettlementRequest): [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + Settlement + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', False + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', False + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['identity_id'] = \ + identity_id + return self._create_endpoint.call_with_http_info(**kwargs) + + def create( + self, + **kwargs + ): + """Create a Merchant Verification # noqa: E501 + + Create a `Verification` to verify a seller's `Identity`. Verifications can also be created directly on the resources you want to verify. For example: - `POST /merchants/{merchant_id}/verifications` - `POST /payment_instruments/{payment_instrument_id}/verifications` # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create(async_req=True) + >>> result = thread.get() + + + Keyword Args: + create_verification_request (CreateVerificationRequest): [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + Verification + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', False + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', False + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + return self._create_endpoint.call_with_http_info(**kwargs) + + def list_split_transfer( + self, + parent_transfer_id, + **kwargs + ): + """List Split Transfers # noqa: E501 + + Retireve a list of `split_transfers` created for a specifc split `Transfer`. For more information, see [Split a Transaction](/docs/guides/payments/modify/split-transactions/). # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.list_split_transfer(parent_transfer_id, async_req=True) + >>> result = thread.get() + + Args: + parent_transfer_id (str): **ID** of the parent `Transfer` that was split. + + Keyword Args: + accept (str): [optional] if omitted the server will use the default value of 'application/hal+json' + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + SplitTransfersList + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', False + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', False + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['parent_transfer_id'] = \ + parent_transfer_id + ret = self._list_split_transfer_endpoint.call_with_http_info(**kwargs) + fl = FinixList(ret, self.list_split_transfer, **kwargs) + return fl + diff --git a/finix/api/devices_api.py b/finix/api/devices_api.py index 6c6e630..5883022 100644 --- a/finix/api/devices_api.py +++ b/finix/api/devices_api.py @@ -19,14 +19,14 @@ none_type, validate_and_convert_types ) -from finix.model.create_device import CreateDevice -from finix.model.device import Device -from finix.model.error401_unauthorized import Error401Unauthorized -from finix.model.error403_forbidden_list import Error403ForbiddenList -from finix.model.error404_not_found_list import Error404NotFoundList -from finix.model.error406_not_acceptable import Error406NotAcceptable -from finix.model.error_generic import ErrorGeneric -from finix.model.update_device_request import UpdateDeviceRequest +from typing_extensions import Annotated +from pydantic import Field, StrictBool, StrictStr + +from typing import Optional + +from finix.models.create_device import CreateDevice +from finix.models.device import Device +from finix.models.update_device_request import UpdateDeviceRequest from finix.model.finix_utils import FinixList from functools import wraps @@ -76,6 +76,7 @@ def __init__(self, api_client=None): params_map={ 'all': [ 'merchant_id', + 'accept', 'create_device', ], 'required': [ @@ -96,14 +97,18 @@ def __init__(self, api_client=None): 'openapi_types': { 'merchant_id': (str,), + 'accept': + (str,), 'create_device': (CreateDevice,), }, 'attribute_map': { 'merchant_id': 'merchant_id', + 'accept': 'Accept', }, 'location_map': { 'merchant_id': 'path', + 'accept': 'header', 'create_device': 'body', }, 'collection_format_map': { @@ -111,10 +116,10 @@ def __init__(self, api_client=None): }, headers_map={ 'accept': [ - 'application/hal+json' + 'application/json' ], 'content_type': [ - 'application/hal+json' + 'application/json' ] }, api_client=api_client @@ -133,6 +138,7 @@ def __init__(self, api_client=None): params_map={ 'all': [ 'device_id', + 'accept', 'include_connection', ], 'required': [ @@ -153,23 +159,89 @@ def __init__(self, api_client=None): 'openapi_types': { 'device_id': (str,), + 'accept': + (str,), 'include_connection': (bool,), }, 'attribute_map': { 'device_id': 'device_id', + 'accept': 'Accept', 'include_connection': 'include_connection', }, 'location_map': { 'device_id': 'path', + 'accept': 'header', + 'include_connection': 'query', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self._get_endpoint = finix.api_client.Endpoint( + settings={ + 'response_type': (Device,), + 'auth': [ + 'BasicAuth' + ], + 'endpoint_path': '/devices/{device_id_connection}', + 'operation_id': 'get', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'device_id_connection', + 'include_connection', + 'accept', + ], + 'required': [ + 'device_id_connection', + 'include_connection', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'device_id_connection': + (str,), + 'include_connection': + (bool,), + 'accept': + (str,), + }, + 'attribute_map': { + 'device_id_connection': 'device_id_connection', + 'include_connection': 'include_connection', + 'accept': 'Accept', + }, + 'location_map': { + 'device_id_connection': 'path', 'include_connection': 'query', + 'accept': 'header', }, 'collection_format_map': { } }, headers_map={ 'accept': [ - 'application/hal+json' + 'application/json' ], 'content_type': [], }, @@ -189,6 +261,8 @@ def __init__(self, api_client=None): params_map={ 'all': [ 'device_id', + 'finix_version', + 'accept', 'update_device_request', ], 'required': [ @@ -209,14 +283,22 @@ def __init__(self, api_client=None): 'openapi_types': { 'device_id': (str,), + 'finix_version': + (str,), + 'accept': + (str,), 'update_device_request': (UpdateDeviceRequest,), }, 'attribute_map': { 'device_id': 'device_id', + 'finix_version': 'Finix-Version', + 'accept': 'Accept', }, 'location_map': { 'device_id': 'path', + 'finix_version': 'header', + 'accept': 'header', 'update_device_request': 'body', }, 'collection_format_map': { @@ -224,10 +306,10 @@ def __init__(self, api_client=None): }, headers_map={ 'accept': [ - 'application/hal+json' + 'application/json' ], 'content_type': [ - 'application/hal+json' + 'application/json' ] }, api_client=api_client @@ -251,6 +333,7 @@ def create( merchant_id (str): ID of the `Merchant` object. Keyword Args: + accept (str): [optional] if omitted the server will use the default value of 'application/hal+json' create_device (CreateDevice): [optional] _return_http_data_only (bool): response data without head status code and headers. Default is True. @@ -319,7 +402,7 @@ def get( ): """Fetch a Device # noqa: E501 - Retrieve the details of an existing `Device`. To check the connectivity of the device, include `?include_connection\\=true\\` at the end of the request endpoint. # noqa: E501 + Retrieve the details of an existing `Device`. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -330,6 +413,7 @@ def get( device_id (str): ID of the `Device`. Keyword Args: + accept (str): [optional] if omitted the server will use the default value of 'application/hal+json' include_connection (bool): Specifies whether the connection information should be included.. [optional] _return_http_data_only (bool): response data without head status code and headers. Default is True. @@ -391,6 +475,89 @@ def get( device_id return self._get_endpoint.call_with_http_info(**kwargs) + def get( + self, + device_id_connection, + include_connection, + **kwargs + ): + """Check Device Connection # noqa: E501 + + To check the connection of the `Device`, include `?include_connection\\=true\\` at the end of the request endpoint. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get(device_id_connection, include_connection, async_req=True) + >>> result = thread.get() + + Args: + device_id_connection (str): + include_connection (bool): Specifies whether the connection information should be included. + + Keyword Args: + accept (str): [optional] if omitted the server will use the default value of 'application/hal+json' + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + Device + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', False + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', False + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['device_id_connection'] = \ + device_id_connection + kwargs['include_connection'] = \ + include_connection + return self._get_endpoint.call_with_http_info(**kwargs) + def update( self, device_id, @@ -398,7 +565,7 @@ def update( ): """Initiate Action on Device # noqa: E501 - Initiate an action on a `Device`. These actions include activation, rebooting, setting an idle message, or deactivate it. # noqa: E501 + Initiate an action on a `Device`. Actions that are available include: - Activating the `Device` - Rebooting the `Device` - Setting an idle message - Deactivating the `Device` You can also use a PUT request to update the `configuration_details`, `description`, `name`, and `serial_number` of the `Device`. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -409,6 +576,8 @@ def update( device_id (str): ID of the `Device`. Keyword Args: + finix_version (str): Specify the API version of your request. For more details, see [Versioning.](/guides/developers/versioning/). [optional] if omitted the server will use the default value of '2018-01-01' + accept (str): [optional] if omitted the server will use the default value of 'application/hal+json' update_device_request (UpdateDeviceRequest): [optional] _return_http_data_only (bool): response data without head status code and headers. Default is True. diff --git a/finix/api/disputes_api.py b/finix/api/disputes_api.py index 58fa479..f8f226a 100644 --- a/finix/api/disputes_api.py +++ b/finix/api/disputes_api.py @@ -19,16 +19,20 @@ none_type, validate_and_convert_types ) -from finix.model.adjustment_transfers_list import AdjustmentTransfersList -from finix.model.create_dispute_evidence_request import CreateDisputeEvidenceRequest -from finix.model.dispute import Dispute -from finix.model.dispute_evidence import DisputeEvidence -from finix.model.dispute_evidence_list import DisputeEvidenceList -from finix.model.disputes_list import DisputesList -from finix.model.error401_unauthorized import Error401Unauthorized -from finix.model.error403_forbidden_list import Error403ForbiddenList -from finix.model.error404_not_found_list import Error404NotFoundList -from finix.model.error406_not_acceptable import Error406NotAcceptable +from typing_extensions import Annotated +from pydantic import Field, StrictInt, StrictStr + +from typing import Optional, Union + +from finix.models.accept_dispute import AcceptDispute +from finix.models.adjustment_transfers_list import AdjustmentTransfersList +from finix.models.create_dispute_evidence_request import CreateDisputeEvidenceRequest +from finix.models.dispute import Dispute +from finix.models.dispute_evidence import DisputeEvidence +from finix.models.dispute_evidence_list import DisputeEvidenceList +from finix.models.disputes_list import DisputesList +from finix.models.submit_dispute_evidence import SubmitDisputeEvidence +from finix.models.update_dispute_evidence import UpdateDisputeEvidence from finix.model.finix_utils import FinixList from functools import wraps @@ -64,6 +68,68 @@ def __init__(self, api_client=None): if api_client is None: api_client = finix.api_client.FinixClient() self._api_client = api_client + self._post_endpoint = finix.api_client.Endpoint( + settings={ + 'response_type': (Dispute,), + 'auth': [ + 'BasicAuth' + ], + 'endpoint_path': '/disputes/{dispute_id}/accept', + 'operation_id': 'post', + 'http_method': 'POST', + 'servers': None, + }, + params_map={ + 'all': [ + 'dispute_id', + 'accept', + 'accept_dispute', + ], + 'required': [ + 'dispute_id', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'dispute_id': + (str,), + 'accept': + (str,), + 'accept_dispute': + (AcceptDispute,), + }, + 'attribute_map': { + 'dispute_id': 'dispute_id', + 'accept': 'Accept', + }, + 'location_map': { + 'dispute_id': 'path', + 'accept': 'header', + 'accept_dispute': 'body', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client + ) self._create_dispute_evidence_endpoint = finix.api_client.Endpoint( settings={ 'response_type': (DisputeEvidence,), @@ -78,6 +144,7 @@ def __init__(self, api_client=None): params_map={ 'all': [ 'dispute_id', + 'accept', 'create_dispute_evidence_request', ], 'required': [ @@ -98,14 +165,18 @@ def __init__(self, api_client=None): 'openapi_types': { 'dispute_id': (str,), + 'accept': + (str,), 'create_dispute_evidence_request': (CreateDisputeEvidenceRequest,), }, 'attribute_map': { 'dispute_id': 'dispute_id', + 'accept': 'Accept', }, 'location_map': { 'dispute_id': 'path', + 'accept': 'header', 'create_dispute_evidence_request': 'body', }, 'collection_format_map': { @@ -113,7 +184,7 @@ def __init__(self, api_client=None): }, headers_map={ 'accept': [ - 'application/hal+json' + 'application/json' ], 'content_type': [ 'multipart/form-data' @@ -121,6 +192,69 @@ def __init__(self, api_client=None): }, api_client=api_client ) + self._get_endpoint = finix.api_client.Endpoint( + settings={ + 'response_type': (bytearray,), + 'auth': [ + 'BasicAuth' + ], + 'endpoint_path': '/disputes/{dispute_id}/evidence/{evidence_id}/download', + 'operation_id': 'get', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'dispute_id', + 'evidence_id', + 'accept', + ], + 'required': [ + 'dispute_id', + 'evidence_id', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'dispute_id': + (str,), + 'evidence_id': + (str,), + 'accept': + (str,), + }, + 'attribute_map': { + 'dispute_id': 'dispute_id', + 'evidence_id': 'evidence_id', + 'accept': 'Accept', + }, + 'location_map': { + 'dispute_id': 'path', + 'evidence_id': 'path', + 'accept': 'header', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/octet-stream', + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) self._get_endpoint = finix.api_client.Endpoint( settings={ 'response_type': (Dispute,), @@ -135,6 +269,7 @@ def __init__(self, api_client=None): params_map={ 'all': [ 'dispute_id', + 'accept', ], 'required': [ 'dispute_id', @@ -154,19 +289,23 @@ def __init__(self, api_client=None): 'openapi_types': { 'dispute_id': (str,), + 'accept': + (str,), }, 'attribute_map': { 'dispute_id': 'dispute_id', + 'accept': 'Accept', }, 'location_map': { 'dispute_id': 'path', + 'accept': 'header', }, 'collection_format_map': { } }, headers_map={ 'accept': [ - 'application/hal+json' + 'application/json' ], 'content_type': [], }, @@ -187,6 +326,7 @@ def __init__(self, api_client=None): 'all': [ 'dispute_id', 'evidence_id', + 'accept', ], 'required': [ 'dispute_id', @@ -209,21 +349,25 @@ def __init__(self, api_client=None): (str,), 'evidence_id': (str,), + 'accept': + (str,), }, 'attribute_map': { 'dispute_id': 'dispute_id', 'evidence_id': 'evidence_id', + 'accept': 'Accept', }, 'location_map': { 'dispute_id': 'path', 'evidence_id': 'path', + 'accept': 'header', }, 'collection_format_map': { } }, headers_map={ 'accept': [ - 'application/hal+json' + 'application/json' ], 'content_type': [], }, @@ -243,6 +387,7 @@ def __init__(self, api_client=None): params_map={ 'all': [ 'dispute_id', + 'accept', 'limit', 'after_cursor', 'before_cursor', @@ -265,6 +410,8 @@ def __init__(self, api_client=None): 'openapi_types': { 'dispute_id': (str,), + 'accept': + (str,), 'limit': (int,), 'after_cursor': @@ -274,12 +421,14 @@ def __init__(self, api_client=None): }, 'attribute_map': { 'dispute_id': 'dispute_id', + 'accept': 'Accept', 'limit': 'limit', 'after_cursor': 'after_cursor', 'before_cursor': 'before_cursor', }, 'location_map': { 'dispute_id': 'path', + 'accept': 'header', 'limit': 'query', 'after_cursor': 'query', 'before_cursor': 'query', @@ -289,7 +438,7 @@ def __init__(self, api_client=None): }, headers_map={ 'accept': [ - 'application/hal+json' + 'application/json' ], 'content_type': [], }, @@ -308,13 +457,36 @@ def __init__(self, api_client=None): }, params_map={ 'all': [ - 'sort', - 'offset', + 'accept', 'limit', 'created_at_gte', 'created_at_lte', 'updated_at_gte', 'updated_at_lte', + 'transfer_id', + 'adjustment_transfer_id', + 'amount', + 'amount_gte', + 'amount_gt', + 'amount_lt', + 'state', + 'response_state', + 'respond_by_lte', + 'respond_by_gte', + 'instrument_bin', + 'instrument_brand_type', + 'merchant_identity_id', + 'merchant_identity_name', + 'instrument_name', + 'instrument_type', + 'merchant_id', + 'merchant_mid', + 'instrument_card_last4', + 'instrument_card_type', + 'instrument_fingerprint', + 'before_cursor', + 'tags_key', + 'tags_value', ], 'required': [], 'nullable': [ @@ -330,10 +502,8 @@ def __init__(self, api_client=None): 'allowed_values': { }, 'openapi_types': { - 'sort': + 'accept': (str,), - 'offset': - (int,), 'limit': (int,), 'created_at_gte': @@ -344,31 +514,125 @@ def __init__(self, api_client=None): (str,), 'updated_at_lte': (str,), + 'transfer_id': + (str,), + 'adjustment_transfer_id': + (str,), + 'amount': + (int,), + 'amount_gte': + (int,), + 'amount_gt': + (int,), + 'amount_lt': + (int,), + 'state': + (str,), + 'response_state': + (str,), + 'respond_by_lte': + (str,), + 'respond_by_gte': + (str,), + 'instrument_bin': + (str,), + 'instrument_brand_type': + (str,), + 'merchant_identity_id': + (str,), + 'merchant_identity_name': + (str,), + 'instrument_name': + (str,), + 'instrument_type': + (str,), + 'merchant_id': + (str,), + 'merchant_mid': + (str,), + 'instrument_card_last4': + (str,), + 'instrument_card_type': + (str,), + 'instrument_fingerprint': + (str,), + 'before_cursor': + (str,), + 'tags_key': + (str,), + 'tags_value': + (str,), }, 'attribute_map': { - 'sort': 'sort', - 'offset': 'offset', + 'accept': 'Accept', 'limit': 'limit', 'created_at_gte': 'created_at.gte', 'created_at_lte': 'created_at.lte', 'updated_at_gte': 'updated_at.gte', 'updated_at_lte': 'updated_at.lte', + 'transfer_id': 'transfer_id', + 'adjustment_transfer_id': 'adjustment_transfer_id', + 'amount': 'amount', + 'amount_gte': 'amount.gte', + 'amount_gt': 'amount.gt', + 'amount_lt': 'amount.lt', + 'state': 'state', + 'response_state': 'response_state', + 'respond_by_lte': 'respond_by.lte', + 'respond_by_gte': 'respond_by.gte', + 'instrument_bin': 'instrument_bin', + 'instrument_brand_type': 'instrument_brand_type', + 'merchant_identity_id': 'merchant_identity_id', + 'merchant_identity_name': 'merchant_identity_name', + 'instrument_name': 'instrument_name', + 'instrument_type': 'instrument_type', + 'merchant_id': 'merchant_id', + 'merchant_mid': 'merchant_mid', + 'instrument_card_last4': 'instrument_card_last4', + 'instrument_card_type': 'instrument_card_type', + 'instrument_fingerprint': 'instrument_fingerprint', + 'before_cursor': 'before_cursor', + 'tags_key': 'tags.key', + 'tags_value': 'tags.value', }, 'location_map': { - 'sort': 'query', - 'offset': 'query', + 'accept': 'header', 'limit': 'query', 'created_at_gte': 'query', 'created_at_lte': 'query', 'updated_at_gte': 'query', 'updated_at_lte': 'query', + 'transfer_id': 'query', + 'adjustment_transfer_id': 'query', + 'amount': 'query', + 'amount_gte': 'query', + 'amount_gt': 'query', + 'amount_lt': 'query', + 'state': 'query', + 'response_state': 'query', + 'respond_by_lte': 'query', + 'respond_by_gte': 'query', + 'instrument_bin': 'query', + 'instrument_brand_type': 'query', + 'merchant_identity_id': 'query', + 'merchant_identity_name': 'query', + 'instrument_name': 'query', + 'instrument_type': 'query', + 'merchant_id': 'query', + 'merchant_mid': 'query', + 'instrument_card_last4': 'query', + 'instrument_card_type': 'query', + 'instrument_fingerprint': 'query', + 'before_cursor': 'query', + 'tags_key': 'query', + 'tags_value': 'query', }, 'collection_format_map': { } }, headers_map={ 'accept': [ - 'application/hal+json' + 'application/json' ], 'content_type': [], }, @@ -388,6 +652,7 @@ def __init__(self, api_client=None): params_map={ 'all': [ 'dispute_id', + 'accept', 'limit', 'after_cursor', 'before_cursor', @@ -410,6 +675,8 @@ def __init__(self, api_client=None): 'openapi_types': { 'dispute_id': (str,), + 'accept': + (str,), 'limit': (int,), 'after_cursor': @@ -419,12 +686,14 @@ def __init__(self, api_client=None): }, 'attribute_map': { 'dispute_id': 'dispute_id', + 'accept': 'Accept', 'limit': 'limit', 'after_cursor': 'after_cursor', 'before_cursor': 'before_cursor', }, 'location_map': { 'dispute_id': 'path', + 'accept': 'header', 'limit': 'query', 'after_cursor': 'query', 'before_cursor': 'query', @@ -434,32 +703,401 @@ def __init__(self, api_client=None): }, headers_map={ 'accept': [ - 'application/hal+json' + 'application/json' ], 'content_type': [], }, api_client=api_client ) + self._post_endpoint = finix.api_client.Endpoint( + settings={ + 'response_type': (Dispute,), + 'auth': [ + 'BasicAuth' + ], + 'endpoint_path': '/disputes/{dispute_id}/submit', + 'operation_id': 'post', + 'http_method': 'POST', + 'servers': None, + }, + params_map={ + 'all': [ + 'dispute_id', + 'accept', + 'finix_version', + 'submit_dispute_evidence', + ], + 'required': [ + 'dispute_id', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'dispute_id': + (str,), + 'accept': + (str,), + 'finix_version': + (str,), + 'submit_dispute_evidence': + (SubmitDisputeEvidence,), + }, + 'attribute_map': { + 'dispute_id': 'dispute_id', + 'accept': 'Accept', + 'finix_version': 'Finix-Version', + }, + 'location_map': { + 'dispute_id': 'path', + 'accept': 'header', + 'finix_version': 'header', + 'submit_dispute_evidence': 'body', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client + ) + self._update_dispute_endpoint = finix.api_client.Endpoint( + settings={ + 'response_type': (Dispute,), + 'auth': [ + 'BasicAuth' + ], + 'endpoint_path': '/disputes/{dispute_id}', + 'operation_id': 'update_dispute', + 'http_method': 'PUT', + 'servers': None, + }, + params_map={ + 'all': [ + 'dispute_id', + 'accept', + 'finix_version', + 'update_dispute_evidence', + ], + 'required': [ + 'dispute_id', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'dispute_id': + (str,), + 'accept': + (str,), + 'finix_version': + (str,), + 'update_dispute_evidence': + (UpdateDisputeEvidence,), + }, + 'attribute_map': { + 'dispute_id': 'dispute_id', + 'accept': 'Accept', + 'finix_version': 'Finix-Version', + }, + 'location_map': { + 'dispute_id': 'path', + 'accept': 'header', + 'finix_version': 'header', + 'update_dispute_evidence': 'body', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client + ) + self._update_dispute_evidence_endpoint = finix.api_client.Endpoint( + settings={ + 'response_type': (DisputeEvidence,), + 'auth': [ + 'BasicAuth' + ], + 'endpoint_path': '/disputes/{dispute_id}/evidence/{evidence_id}', + 'operation_id': 'update_dispute_evidence', + 'http_method': 'PUT', + 'servers': None, + }, + params_map={ + 'all': [ + 'dispute_id', + 'evidence_id', + 'accept', + 'finix_version', + 'update_dispute_evidence', + ], + 'required': [ + 'dispute_id', + 'evidence_id', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'dispute_id': + (str,), + 'evidence_id': + (str,), + 'accept': + (str,), + 'finix_version': + (str,), + 'update_dispute_evidence': + (UpdateDisputeEvidence,), + }, + 'attribute_map': { + 'dispute_id': 'dispute_id', + 'evidence_id': 'evidence_id', + 'accept': 'Accept', + 'finix_version': 'Finix-Version', + }, + 'location_map': { + 'dispute_id': 'path', + 'evidence_id': 'path', + 'accept': 'header', + 'finix_version': 'header', + 'update_dispute_evidence': 'body', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client + ) + + def post( + self, + dispute_id, + **kwargs + ): + """Accept a Dispute # noqa: E501 + + You can accept a `Dispute` to prevent a long (and potentially expensive) process. When you accept a `Dispute`, you concede that the Dispute is not worth challenging or representing. Related guides: [Accepting a Dispute](/guides/after-the-payment/disputes/accepting-disputes/) # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.post(dispute_id, async_req=True) + >>> result = thread.get() + + Args: + dispute_id (str): ID of `Dispute` to move forward and submit evidence. + + Keyword Args: + accept (str): [optional] if omitted the server will use the default value of 'application/hal+json' + accept_dispute (AcceptDispute): [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + Dispute + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', False + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', False + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['dispute_id'] = \ + dispute_id + return self._post_endpoint.call_with_http_info(**kwargs) + + def create_dispute_evidence( + self, + dispute_id, + **kwargs + ): + """Upload Files as Dispute Evidence # noqa: E501 + + Upload a file as evidence for a `Dispute`. - You can upload up to 8 files; the total size of the uploaded files combined cannot exceed 10 MB. - The allowed file formats include JPG, PNG, PDF, or TIFF. - Individual PNG and JPEG files can't exceed 50 KB; PDF and TIFF files can't exceed 1 MB. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_dispute_evidence(dispute_id, async_req=True) + >>> result = thread.get() + + Args: + dispute_id (str): ID of `Dispute` to mange evidence for. + + Keyword Args: + accept (str): [optional] if omitted the server will use the default value of 'application/hal+json' + create_dispute_evidence_request (CreateDisputeEvidenceRequest): [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + DisputeEvidence + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', False + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', False + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['dispute_id'] = \ + dispute_id + return self._create_dispute_evidence_endpoint.call_with_http_info(**kwargs) - def create_dispute_evidence( + def get( self, dispute_id, + evidence_id, **kwargs ): - """Upload Dispute Evidence # noqa: E501 + """Download Dispute Evidence # noqa: E501 - Upload dispute evidence for a `Dispute`. - You can upload up to 8 files; the total size of the uploaded files combined cannot exceed 10 MB. - The allowed file formats include JPG, PNG, PDF, or TIFF. - Individual PNG and JPEG files can't exceed 50 KB; PDF and TIFF files can't exceed 1 MB. # noqa: E501 + Download a file uploaded as `Dispute Evidence`. **Note**: The file extension included in `output` must match the extension of the original uploaded file. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.create_dispute_evidence(dispute_id, async_req=True) + >>> thread = api.get(dispute_id, evidence_id, async_req=True) >>> result = thread.get() Args: - dispute_id (str): ID of `Dispute` to mange evidence for. + dispute_id (str): ID of `Dispute` to download evidence from. + evidence_id (str): ID of `evidence` to download. Keyword Args: - create_dispute_evidence_request (CreateDisputeEvidenceRequest): [optional] + accept (str): [optional] if omitted the server will use the default value of 'application/hal+json' _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object @@ -488,7 +1126,7 @@ def create_dispute_evidence( async_req (bool): execute request asynchronously Returns: - DisputeEvidence + bytearray If the method is called asynchronously, returns the request thread. """ @@ -518,7 +1156,9 @@ def create_dispute_evidence( kwargs['_host_index'] = kwargs.get('_host_index') kwargs['dispute_id'] = \ dispute_id - return self._create_dispute_evidence_endpoint.call_with_http_info(**kwargs) + kwargs['evidence_id'] = \ + evidence_id + return self._get_endpoint.call_with_http_info(**kwargs) def get( self, @@ -535,9 +1175,10 @@ def get( >>> result = thread.get() Args: - dispute_id (str): ID of `Dispute` to fetch. + dispute_id (str): ID of `Dispute`. Keyword Args: + accept (str): [optional] if omitted the server will use the default value of 'application/hal+json' _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object @@ -618,6 +1259,7 @@ def get_dispute_evidence( evidence_id (str): ID of `evidence` to fetch. Keyword Args: + accept (str): [optional] if omitted the server will use the default value of 'application/hal+json' _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object @@ -698,6 +1340,7 @@ def list_dispute_evidence_by_dispute_id( dispute_id (str): ID of `Dispute` to mange evidence for. Keyword Args: + accept (str): [optional] if omitted the server will use the default value of 'application/hal+json' limit (int): The numbers of items to return.. [optional] after_cursor (str): Return every resource created after the cursor value.. [optional] before_cursor (str): Return every resource created before the cursor value.. [optional] @@ -778,13 +1421,36 @@ def list( Keyword Args: - sort (str): Specify key to be used for sorting the collection.. [optional] - offset (int): The number of items to skip before starting to collect the result set.. [optional] + accept (str): Body Header. [optional] if omitted the server will use the default value of 'application/hal+json' limit (int): The numbers of items to return.. [optional] created_at_gte (str): Filter where `created_at` is after the given date.. [optional] created_at_lte (str): Filter where `created_at` is before the given date.. [optional] updated_at_gte (str): Filter where `updated_at` is after the given date.. [optional] updated_at_lte (str): Filter where `updated_at` is before the given date.. [optional] + transfer_id (str): Filter by the ID of the `Transfer` that's being disputed.

**Note**: If included, all other filter parameters are ignored.. [optional] + adjustment_transfer_id (str): Filter by the ID of the adjustment `Transfer`.

**Note**: If included, all other filter parameters are ignored.. [optional] + amount (int): Filter by an amount equal to the given value.. [optional] + amount_gte (int): Filter by an amount greater than or equal.. [optional] + amount_gt (int): Filter by an amount greater than.. [optional] + amount_lt (int): Filter by an amount less than.. [optional] + state (str): Filter by the state of the `Dispute`.. [optional] + response_state (str): Filter by the `response_state` of the `Dispute`.. [optional] + respond_by_lte (str): Filter where `respond_by` is before the given date.. [optional] + respond_by_gte (str): Filter where `respond_by` is after the given date.. [optional] + instrument_bin (str): Filter by the Bank Identification Number (BIN). The BIN is the first 6 digits of the masked account number.. [optional] + instrument_brand_type (str): Filter by the card brand used.. [optional] + merchant_identity_id (str): Filter by the ID of the `Identity` used by the `Merchant`.. [optional] + merchant_identity_name (str): Filter by the name used by the `Merchant`.. [optional] + instrument_name (str): Filter by the name of the `Payment Instrument`.. [optional] + instrument_type (str): Filter by `Payment Instrument` type.. [optional] + merchant_id (str): Filter by the ID of the `Merchant`.. [optional] + merchant_mid (str): Filter by the MID of the `Merchant`.. [optional] + instrument_card_last4 (str): Filter by the last 4 digits of the card used.. [optional] + instrument_card_type (str): Filter by the card type.. [optional] + instrument_fingerprint (str): Filter by the fingerprint of the `Payment Instrument`.. [optional] + before_cursor (str): Returns every `Dispute` created before the cursor value.. [optional] + tags_key (str): Filter by the [`key` of a `Tag`](/api/overview/#section/Tags).. [optional] + tags_value (str): Filter by the [value of a `Tag`](https://finix.com/docs/api/overview/#section/Tags).. [optional] _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object @@ -863,6 +1529,7 @@ def list_disputes_adjustments( dispute_id (str): ID of the `Dispute` resource. Keyword Args: + accept (str): [optional] if omitted the server will use the default value of 'application/hal+json' limit (int): The numbers of items to return.. [optional] after_cursor (str): Return every resource created after the cursor value.. [optional] before_cursor (str): Return every resource created before the cursor value.. [optional] @@ -928,3 +1595,250 @@ def list_disputes_adjustments( fl = FinixList(ret, self.list_disputes_adjustments, **kwargs) return fl + def post( + self, + dispute_id, + **kwargs + ): + """Submit Dispute Evidence # noqa: E501 + + You can manually submit evidence to the issuing bank to manually move a dispute forward. Use the `/disputes/DISPUTE_ID/submit` endpoint to submit evidence. Making a POST request lets the issuing bank know the seller has completed submitting evidence and is prepared to move forward with the dispute. Related guides: [Responding to Disputes](/guides/after-the-payment/disputes/responding-disputes/). # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.post(dispute_id, async_req=True) + >>> result = thread.get() + + Args: + dispute_id (str): ID of `Dispute` to move forward and submit evidence. + + Keyword Args: + accept (str): [optional] if omitted the server will use the default value of 'application/hal+json' + finix_version (str): Specify the API version of your request. For more details, see [Versioning.](/guides/developers/versioning/). [optional] if omitted the server will use the default value of '2018-01-01' + submit_dispute_evidence (SubmitDisputeEvidence): [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + Dispute + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', False + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', False + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['dispute_id'] = \ + dispute_id + return self._post_endpoint.call_with_http_info(**kwargs) + + def update_dispute( + self, + dispute_id, + **kwargs + ): + """Update a Dispute # noqa: E501 + + Update `tags` on `Disputes`. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.update_dispute(dispute_id, async_req=True) + >>> result = thread.get() + + Args: + dispute_id (str): ID of `Dispute`. + + Keyword Args: + accept (str): [optional] if omitted the server will use the default value of 'application/hal+json' + finix_version (str): Specify the API version of your request. For more details, see [Versioning.](/guides/developers/versioning/). [optional] if omitted the server will use the default value of '2018-01-01' + update_dispute_evidence (UpdateDisputeEvidence): [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + Dispute + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', False + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', False + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['dispute_id'] = \ + dispute_id + return self._update_dispute_endpoint.call_with_http_info(**kwargs) + + def update_dispute_evidence( + self, + dispute_id, + evidence_id, + **kwargs + ): + """Update Dispute Evidence # noqa: E501 + + Update tags on `Dispute` evidence. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.update_dispute_evidence(dispute_id, evidence_id, async_req=True) + >>> result = thread.get() + + Args: + dispute_id (str): ID of `Dispute` to fetch evidence for. + evidence_id (str): ID of `evidence` to fetch. + + Keyword Args: + accept (str): [optional] if omitted the server will use the default value of 'application/hal+json' + finix_version (str): Specify the API version of your request. For more details, see [Versioning.](/guides/developers/versioning/). [optional] if omitted the server will use the default value of '2018-01-01' + update_dispute_evidence (UpdateDisputeEvidence): [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + DisputeEvidence + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', False + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', False + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['dispute_id'] = \ + dispute_id + kwargs['evidence_id'] = \ + evidence_id + return self._update_dispute_evidence_endpoint.call_with_http_info(**kwargs) + diff --git a/finix/api/fee_profiles_api.py b/finix/api/fee_profiles_api.py index dfa2e21..e814dba 100644 --- a/finix/api/fee_profiles_api.py +++ b/finix/api/fee_profiles_api.py @@ -19,14 +19,14 @@ none_type, validate_and_convert_types ) -from finix.model.create_fee_profile_request import CreateFeeProfileRequest -from finix.model.error401_unauthorized import Error401Unauthorized -from finix.model.error403_forbidden_list import Error403ForbiddenList -from finix.model.error404_not_found_list import Error404NotFoundList -from finix.model.error406_not_acceptable import Error406NotAcceptable -from finix.model.error422_invalid_field_list import Error422InvalidFieldList -from finix.model.fee_profile import FeeProfile -from finix.model.fee_profiles_list import FeeProfilesList +from typing_extensions import Annotated +from pydantic import Field, StrictInt, StrictStr + +from typing import Optional + +from finix.models.create_fee_profile_request import CreateFeeProfileRequest +from finix.models.fee_profile import FeeProfile +from finix.models.fee_profiles_list import FeeProfilesList from finix.model.finix_utils import FinixList from functools import wraps @@ -104,10 +104,10 @@ def __init__(self, api_client=None): }, headers_map={ 'accept': [ - 'application/hal+json' + 'application/json' ], 'content_type': [ - 'application/hal+json' + 'application/json' ] }, api_client=api_client @@ -126,6 +126,7 @@ def __init__(self, api_client=None): params_map={ 'all': [ 'fee_profile_id', + 'accept', ], 'required': [ 'fee_profile_id', @@ -145,19 +146,23 @@ def __init__(self, api_client=None): 'openapi_types': { 'fee_profile_id': (str,), + 'accept': + (str,), }, 'attribute_map': { 'fee_profile_id': 'fee_profile_id', + 'accept': 'Accept', }, 'location_map': { 'fee_profile_id': 'path', + 'accept': 'header', }, 'collection_format_map': { } }, headers_map={ 'accept': [ - 'application/hal+json' + 'application/json' ], 'content_type': [], }, @@ -176,6 +181,7 @@ def __init__(self, api_client=None): }, params_map={ 'all': [ + 'accept', 'after_cursor', 'before_cursor', 'limit', @@ -194,6 +200,8 @@ def __init__(self, api_client=None): 'allowed_values': { }, 'openapi_types': { + 'accept': + (str,), 'after_cursor': (str,), 'before_cursor': @@ -202,11 +210,13 @@ def __init__(self, api_client=None): (int,), }, 'attribute_map': { + 'accept': 'Accept', 'after_cursor': 'after_cursor', 'before_cursor': 'before_cursor', 'limit': 'limit', }, 'location_map': { + 'accept': 'header', 'after_cursor': 'query', 'before_cursor': 'query', 'limit': 'query', @@ -216,7 +226,7 @@ def __init__(self, api_client=None): }, headers_map={ 'accept': [ - 'application/hal+json' + 'application/json' ], 'content_type': [], }, @@ -315,6 +325,7 @@ def get( fee_profile_id (str): The ID of the `fee_profile`. Keyword Args: + accept (str): [optional] if omitted the server will use the default value of 'application/hal+json' _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object @@ -390,6 +401,7 @@ def list( Keyword Args: + accept (str): Body Header. [optional] if omitted the server will use the default value of 'application/hal+json' after_cursor (str): Return every resource created after the cursor value.. [optional] before_cursor (str): Return every resource created before the cursor value.. [optional] limit (int): The numbers of items to return.. [optional] diff --git a/finix/api/files_api.py b/finix/api/files_api.py index a4e0793..9dc6d0f 100644 --- a/finix/api/files_api.py +++ b/finix/api/files_api.py @@ -19,17 +19,18 @@ none_type, validate_and_convert_types ) -from finix.model.create_external_link_request import CreateExternalLinkRequest -from finix.model.create_file_request import CreateFileRequest -from finix.model.error401_unauthorized import Error401Unauthorized -from finix.model.error403_forbidden_list import Error403ForbiddenList -from finix.model.error404_not_found_list import Error404NotFoundList -from finix.model.error406_not_acceptable import Error406NotAcceptable -from finix.model.external_link import ExternalLink -from finix.model.external_links_list import ExternalLinksList -from finix.model.file import File -from finix.model.files_list import FilesList -from finix.model.upload_file_request import UploadFileRequest +from typing_extensions import Annotated +from pydantic import Field, StrictInt, StrictStr + +from typing import Optional, Union + +from finix.models.create_external_link_request import CreateExternalLinkRequest +from finix.models.create_file_request import CreateFileRequest +from finix.models.external_link import ExternalLink +from finix.models.external_links_list import ExternalLinksList +from finix.models.file import File +from finix.models.files_list import FilesList +from finix.models.upload_file_request import UploadFileRequest from finix.model.finix_utils import FinixList from functools import wraps @@ -79,6 +80,7 @@ def __init__(self, api_client=None): params_map={ 'all': [ 'file_id', + 'accept', 'create_external_link_request', ], 'required': [ @@ -99,14 +101,18 @@ def __init__(self, api_client=None): 'openapi_types': { 'file_id': (str,), + 'accept': + (str,), 'create_external_link_request': (CreateExternalLinkRequest,), }, 'attribute_map': { 'file_id': 'file_id', + 'accept': 'Accept', }, 'location_map': { 'file_id': 'path', + 'accept': 'header', 'create_external_link_request': 'body', }, 'collection_format_map': { @@ -114,11 +120,10 @@ def __init__(self, api_client=None): }, headers_map={ 'accept': [ - 'application/vnd.api+json', - 'application/hal+json' + 'application/json' ], 'content_type': [ - 'application/vnd.api+json' + 'application/json' ] }, api_client=api_client @@ -165,18 +170,17 @@ def __init__(self, api_client=None): }, headers_map={ 'accept': [ - 'application/vnd.api+json', - 'application/hal+json' + 'application/json' ], 'content_type': [ - 'application/vnd.api+json' + 'application/json' ] }, api_client=api_client ) self._download_endpoint = finix.api_client.Endpoint( settings={ - 'response_type': (file_type,), + 'response_type': (bytearray,), 'auth': [ 'BasicAuth' ], @@ -188,6 +192,8 @@ def __init__(self, api_client=None): params_map={ 'all': [ 'file_id', + 'accept', + 'stream', ], 'required': [ 'file_id', @@ -195,6 +201,7 @@ def __init__(self, api_client=None): 'nullable': [ ], 'enum': [ + 'stream', ], 'validation': [ ] @@ -203,16 +210,29 @@ def __init__(self, api_client=None): 'validations': { }, 'allowed_values': { + ('stream',): { + + "'true'": 'true', + "'false'": 'false' + }, }, 'openapi_types': { 'file_id': (str,), + 'accept': + (str,), + 'stream': + (str,), }, 'attribute_map': { 'file_id': 'file_id', + 'accept': 'Accept', + 'stream': 'stream', }, 'location_map': { 'file_id': 'path', + 'accept': 'header', + 'stream': 'query', }, 'collection_format_map': { } @@ -220,7 +240,7 @@ def __init__(self, api_client=None): headers_map={ 'accept': [ 'application/octet-stream', - 'application/hal+json' + 'application/json' ], 'content_type': [], }, @@ -241,6 +261,7 @@ def __init__(self, api_client=None): 'all': [ 'file_id', 'external_link_id', + 'accept', ], 'required': [ 'file_id', @@ -263,22 +284,25 @@ def __init__(self, api_client=None): (str,), 'external_link_id': (str,), + 'accept': + (str,), }, 'attribute_map': { 'file_id': 'file_id', 'external_link_id': 'external_link_id', + 'accept': 'Accept', }, 'location_map': { 'file_id': 'path', 'external_link_id': 'path', + 'accept': 'header', }, 'collection_format_map': { } }, headers_map={ 'accept': [ - 'application/vnd.api+json', - 'application/hal+json' + 'application/json' ], 'content_type': [], }, @@ -298,6 +322,7 @@ def __init__(self, api_client=None): params_map={ 'all': [ 'file_id', + 'accept', ], 'required': [ 'file_id', @@ -317,20 +342,23 @@ def __init__(self, api_client=None): 'openapi_types': { 'file_id': (str,), + 'accept': + (str,), }, 'attribute_map': { 'file_id': 'file_id', + 'accept': 'Accept', }, 'location_map': { 'file_id': 'path', + 'accept': 'header', }, 'collection_format_map': { } }, headers_map={ 'accept': [ - 'application/vnd.api+json', - 'application/hal+json' + 'application/json' ], 'content_type': [], }, @@ -350,7 +378,7 @@ def __init__(self, api_client=None): params_map={ 'all': [ 'file_id', - 'sort', + 'accept', 'after_cursor', 'limit', 'id', @@ -378,7 +406,7 @@ def __init__(self, api_client=None): 'openapi_types': { 'file_id': (str,), - 'sort': + 'accept': (str,), 'after_cursor': (str,), @@ -399,7 +427,7 @@ def __init__(self, api_client=None): }, 'attribute_map': { 'file_id': 'file_id', - 'sort': 'sort', + 'accept': 'Accept', 'after_cursor': 'after_cursor', 'limit': 'limit', 'id': 'id', @@ -411,7 +439,7 @@ def __init__(self, api_client=None): }, 'location_map': { 'file_id': 'path', - 'sort': 'query', + 'accept': 'header', 'after_cursor': 'query', 'limit': 'query', 'id': 'query', @@ -426,8 +454,7 @@ def __init__(self, api_client=None): }, headers_map={ 'accept': [ - 'application/vnd.api+json', - 'application/hal+json' + 'application/json' ], 'content_type': [], }, @@ -446,7 +473,6 @@ def __init__(self, api_client=None): }, params_map={ 'all': [ - 'sort', 'after_cursor', 'limit', 'id', @@ -470,8 +496,6 @@ def __init__(self, api_client=None): 'allowed_values': { }, 'openapi_types': { - 'sort': - (str,), 'after_cursor': (str,), 'limit': @@ -490,7 +514,6 @@ def __init__(self, api_client=None): (str,), }, 'attribute_map': { - 'sort': 'sort', 'after_cursor': 'after_cursor', 'limit': 'limit', 'id': 'id', @@ -501,7 +524,6 @@ def __init__(self, api_client=None): 'before_cursor': 'before_cursor', }, 'location_map': { - 'sort': 'query', 'after_cursor': 'query', 'limit': 'query', 'id': 'query', @@ -516,8 +538,7 @@ def __init__(self, api_client=None): }, headers_map={ 'accept': [ - 'application/vnd.api+json', - 'application/hal+json' + 'application/json' ], 'content_type': [], }, @@ -537,6 +558,7 @@ def __init__(self, api_client=None): params_map={ 'all': [ 'file_id', + 'accept', 'upload_file_request', ], 'required': [ @@ -557,14 +579,18 @@ def __init__(self, api_client=None): 'openapi_types': { 'file_id': (str,), + 'accept': + (str,), 'upload_file_request': (UploadFileRequest,), }, 'attribute_map': { 'file_id': 'file_id', + 'accept': 'Accept', }, 'location_map': { 'file_id': 'path', + 'accept': 'header', 'upload_file_request': 'body', }, 'collection_format_map': { @@ -572,8 +598,7 @@ def __init__(self, api_client=None): }, headers_map={ 'accept': [ - 'application/vnd.api+json', - 'application/hal+json' + 'application/json' ], 'content_type': [ 'multipart/form-data' @@ -589,7 +614,7 @@ def create_external_link( ): """Create an External Link # noqa: E501 - Create an `external_link` resource to share with users so they can upload files directly from their browser. For more info, see [Uploading files to Finix](/docs/guides/onboarding/uploading-files-to-finix/). Once created, you can request the user to upload a file to the `external_link` resource: [Upload files to External Link](#operation/uploadExternalLink) # noqa: E501 + Create an `external_link` resource to share with users so they can upload files directly from their browser. For more info, see [Uploading files to Finix](/guides/onboarding/uploading-files-to-finix/). # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -600,6 +625,7 @@ def create_external_link( file_id (str): Your `File` ID. Keyword Args: + accept (str): [optional] if omitted the server will use the default value of 'application/hal+json' create_external_link_request (CreateExternalLinkRequest): [optional] _return_http_data_only (bool): response data without head status code and headers. Default is True. @@ -667,7 +693,7 @@ def create( ): """Create a File # noqa: E501 - Before uploading a file, you need to create a `File` resource. Once created, you can [upload](/#operation/uploadFile) your file to the new `File` resource. # noqa: E501 + Before uploading a file, you need to create a `File` resource. Once created, you can [upload](/guides/onboarding/uploading-files-to-finix/#how-to-upload-a-file-to-finix) your file to the new `File` resource. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -740,9 +766,9 @@ def download( file_id, **kwargs ): - """Download a file # noqa: E501 + """Download a File # noqa: E501 - Download a file that was uploaded to a `File` resource. For more info, see [Uploading files to Finix](/guides/onboarding/uploading-files-to-finix). # noqa: E501 + Download a file that was uploaded to a `File` resource. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -753,6 +779,8 @@ def download( file_id (str): The ID of the `File` that was created to upload the file. Keyword Args: + accept (str): [optional] if omitted the server will use the default value of 'application/hal+json' + stream (str): Stream the contents of the `File` so it's displayed inline in the user's web browser.. [optional] _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object @@ -781,7 +809,7 @@ def download( async_req (bool): execute request asynchronously Returns: - file_type + bytearray If the method is called asynchronously, returns the request thread. """ @@ -821,7 +849,7 @@ def get_external_link( ): """Fetch an External LInk # noqa: E501 - Fetch a previously created `external_link` resource. For more info see [Uploading files to Finix](/guides/onboarding/uploading-files-to-finix/#create-an-external-link). # noqa: E501 + Fetch a previously created `external_link` resource. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -833,6 +861,7 @@ def get_external_link( external_link_id (str): The ID of the `external_link` that you want to retireve. Keyword Args: + accept (str): [optional] if omitted the server will use the default value of 'application/hal+json' _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object @@ -902,7 +931,7 @@ def get( ): """Fetch a File # noqa: E501 - Retrieve the details of a `File` resource. For more info see [Uploading files to Finix](/guides/onboarding/uploading-files-to-finix/#create-an-external-link). # noqa: E501 + Retrieve the details of a `File` resource. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -913,6 +942,7 @@ def get( file_id (str): Your `File` ID. Keyword Args: + accept (str): [optional] if omitted the server will use the default value of 'application/hal+json' _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object @@ -980,7 +1010,7 @@ def list_external_links( ): """List All External Links # noqa: E501 - List the previously created `external_links` for a `File`. For more info, see [Uploading files to Finix](/guides/onboarding/uploading-files-to-finix/#create-an-external-link). # noqa: E501 + List the previously created `external_links` for a `File`. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -991,7 +1021,7 @@ def list_external_links( file_id (str): Your `File` ID. Keyword Args: - sort (str): Specify key to be used for sorting the collection.. [optional] + accept (str): [optional] if omitted the server will use the default value of 'application/hal+json' after_cursor (str): Return every resource created after the cursor value.. [optional] limit (int): The numbers of items to return.. [optional] id (str): Filter by `id`.. [optional] @@ -1068,7 +1098,7 @@ def list( ): """List All Files # noqa: E501 - List all the `File` resources you've created. For more info, see [Uploading files to Finix](/guides/onboarding/uploading-files-to-finix/#step-1-create-a-file). # noqa: E501 + List all the `File` resources you've created. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -1077,7 +1107,6 @@ def list( Keyword Args: - sort (str): Specify key to be used for sorting the collection.. [optional] after_cursor (str): Return every resource created after the cursor value.. [optional] limit (int): The numbers of items to return.. [optional] id (str): Filter by `id`.. [optional] @@ -1153,7 +1182,7 @@ def upload( ): """Upload files Directly # noqa: E501 - Upload files directly with a `multipart/form-data` request. For more info see, [Uploading files to Finix](/guides/onboarding/uploading-files-to-finix/#step-2-upload-the-file). # noqa: E501 + Upload files directly with a `multipart/form-data` request. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -1164,6 +1193,7 @@ def upload( file_id (str): The ID of the `File` that was created to upload the file. Keyword Args: + accept (str): [optional] if omitted the server will use the default value of 'application/hal+json' upload_file_request (UploadFileRequest): [optional] _return_http_data_only (bool): response data without head status code and headers. Default is True. diff --git a/finix/api/identities_api.py b/finix/api/identities_api.py index 0ac0d8d..9de8015 100644 --- a/finix/api/identities_api.py +++ b/finix/api/identities_api.py @@ -19,18 +19,16 @@ none_type, validate_and_convert_types ) -from finix.model.create_associated_identity_request import CreateAssociatedIdentityRequest -from finix.model.create_identity_request import CreateIdentityRequest -from finix.model.create_verification_request import CreateVerificationRequest -from finix.model.error401_unauthorized import Error401Unauthorized -from finix.model.error403_forbidden_list import Error403ForbiddenList -from finix.model.error404_not_found_list import Error404NotFoundList -from finix.model.error406_not_acceptable import Error406NotAcceptable -from finix.model.error_generic import ErrorGeneric -from finix.model.identities_list import IdentitiesList -from finix.model.identity import Identity -from finix.model.update_identity_request import UpdateIdentityRequest -from finix.model.verification import Verification +from typing_extensions import Annotated +from pydantic import Field, StrictInt, StrictStr + +from typing import Optional + +from finix.models.create_associated_identity_request import CreateAssociatedIdentityRequest +from finix.models.create_identity_request import CreateIdentityRequest +from finix.models.identities_list import IdentitiesList +from finix.models.identity import Identity +from finix.models.update_identity_request import UpdateIdentityRequest from finix.model.finix_utils import FinixList from functools import wraps @@ -80,6 +78,7 @@ def __init__(self, api_client=None): params_map={ 'all': [ 'identity_id', + 'accept', 'create_associated_identity_request', ], 'required': [ @@ -100,14 +99,18 @@ def __init__(self, api_client=None): 'openapi_types': { 'identity_id': (str,), + 'accept': + (str,), 'create_associated_identity_request': (CreateAssociatedIdentityRequest,), }, 'attribute_map': { 'identity_id': 'identity_id', + 'accept': 'Accept', }, 'location_map': { 'identity_id': 'path', + 'accept': 'header', 'create_associated_identity_request': 'body', }, 'collection_format_map': { @@ -115,10 +118,10 @@ def __init__(self, api_client=None): }, headers_map={ 'accept': [ - 'application/hal+json' + 'application/json' ], 'content_type': [ - 'application/hal+json' + 'application/json' ] }, api_client=api_client @@ -136,6 +139,8 @@ def __init__(self, api_client=None): }, params_map={ 'all': [ + 'accept', + 'finix_version', 'create_identity_request', ], 'required': [], @@ -152,12 +157,20 @@ def __init__(self, api_client=None): 'allowed_values': { }, 'openapi_types': { + 'accept': + (str,), + 'finix_version': + (str,), 'create_identity_request': (CreateIdentityRequest,), }, 'attribute_map': { + 'accept': 'Accept', + 'finix_version': 'Finix-Version', }, 'location_map': { + 'accept': 'header', + 'finix_version': 'header', 'create_identity_request': 'body', }, 'collection_format_map': { @@ -165,67 +178,10 @@ def __init__(self, api_client=None): }, headers_map={ 'accept': [ - 'application/hal+json' - ], - 'content_type': [ - 'application/hal+json' - ] - }, - api_client=api_client - ) - self._create_identity_verification_endpoint = finix.api_client.Endpoint( - settings={ - 'response_type': (Verification,), - 'auth': [ - 'BasicAuth' - ], - 'endpoint_path': '/identities/{identity_id}/verifications', - 'operation_id': 'create_identity_verification', - 'http_method': 'POST', - 'servers': None, - }, - params_map={ - 'all': [ - 'identity_id', - 'create_verification_request', - ], - 'required': [ - 'identity_id', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'identity_id': - (str,), - 'create_verification_request': - (CreateVerificationRequest,), - }, - 'attribute_map': { - 'identity_id': 'identity_id', - }, - 'location_map': { - 'identity_id': 'path', - 'create_verification_request': 'body', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/hal+json' + 'application/json' ], 'content_type': [ - 'application/hal+json' + 'application/json' ] }, api_client=api_client @@ -244,6 +200,7 @@ def __init__(self, api_client=None): params_map={ 'all': [ 'identity_id', + 'accept', ], 'required': [ 'identity_id', @@ -263,19 +220,23 @@ def __init__(self, api_client=None): 'openapi_types': { 'identity_id': (str,), + 'accept': + (str,), }, 'attribute_map': { 'identity_id': 'identity_id', + 'accept': 'Accept', }, 'location_map': { 'identity_id': 'path', + 'accept': 'header', }, 'collection_format_map': { } }, headers_map={ 'accept': [ - 'application/hal+json' + 'application/json' ], 'content_type': [], }, @@ -294,7 +255,7 @@ def __init__(self, api_client=None): }, params_map={ 'all': [ - 'sort', + 'accept', 'after_cursor', 'limit', 'id', @@ -308,6 +269,8 @@ def __init__(self, api_client=None): 'last_name', 'title', 'before_cursor', + 'tags_key', + 'tags_value', ], 'required': [], 'nullable': [ @@ -323,7 +286,7 @@ def __init__(self, api_client=None): 'allowed_values': { }, 'openapi_types': { - 'sort': + 'accept': (str,), 'after_cursor': (str,), @@ -351,9 +314,13 @@ def __init__(self, api_client=None): (str,), 'before_cursor': (str,), + 'tags_key': + (str,), + 'tags_value': + (str,), }, 'attribute_map': { - 'sort': 'sort', + 'accept': 'Accept', 'after_cursor': 'after_cursor', 'limit': 'limit', 'id': 'id', @@ -367,9 +334,11 @@ def __init__(self, api_client=None): 'last_name': 'last_name', 'title': 'title', 'before_cursor': 'before_cursor', + 'tags_key': 'tags.key', + 'tags_value': 'tags.value', }, 'location_map': { - 'sort': 'query', + 'accept': 'header', 'after_cursor': 'query', 'limit': 'query', 'id': 'query', @@ -383,13 +352,15 @@ def __init__(self, api_client=None): 'last_name': 'query', 'title': 'query', 'before_cursor': 'query', + 'tags_key': 'query', + 'tags_value': 'query', }, 'collection_format_map': { } }, headers_map={ 'accept': [ - 'application/hal+json' + 'application/json' ], 'content_type': [], }, @@ -409,6 +380,7 @@ def __init__(self, api_client=None): params_map={ 'all': [ 'identity_id', + 'accept', 'limit', 'after_cursor', 'before_cursor', @@ -431,6 +403,8 @@ def __init__(self, api_client=None): 'openapi_types': { 'identity_id': (str,), + 'accept': + (str,), 'limit': (int,), 'after_cursor': @@ -440,12 +414,14 @@ def __init__(self, api_client=None): }, 'attribute_map': { 'identity_id': 'identity_id', + 'accept': 'Accept', 'limit': 'limit', 'after_cursor': 'after_cursor', 'before_cursor': 'before_cursor', }, 'location_map': { 'identity_id': 'path', + 'accept': 'header', 'limit': 'query', 'after_cursor': 'query', 'before_cursor': 'query', @@ -455,7 +431,7 @@ def __init__(self, api_client=None): }, headers_map={ 'accept': [ - 'application/hal+json' + 'application/json' ], 'content_type': [], }, @@ -475,6 +451,7 @@ def __init__(self, api_client=None): params_map={ 'all': [ 'identity_id', + 'accept', 'update_identity_request', ], 'required': [ @@ -495,14 +472,18 @@ def __init__(self, api_client=None): 'openapi_types': { 'identity_id': (str,), + 'accept': + (str,), 'update_identity_request': (UpdateIdentityRequest,), }, 'attribute_map': { 'identity_id': 'identity_id', + 'accept': 'Accept', }, 'location_map': { 'identity_id': 'path', + 'accept': 'header', 'update_identity_request': 'body', }, 'collection_format_map': { @@ -510,10 +491,10 @@ def __init__(self, api_client=None): }, headers_map={ 'accept': [ - 'application/hal+json' + 'application/json' ], 'content_type': [ - 'application/hal+json' + 'application/json' ] }, api_client=api_client @@ -526,7 +507,7 @@ def create_associated_identity( ): """Create an Associated Identity # noqa: E501 - Create an associated `Identity` for [every owner with 25% or more ownership](/guides/onboarding/#step-3-add-associated-identities) over the merchant. # noqa: E501 + Create an associated `Identity` for [every owner with 25% or more ownership](/guides/onboarding/onboarding-with-api#step-3-add-associated-identities) over the merchant. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -537,6 +518,7 @@ def create_associated_identity( identity_id (str): ID of `Identity` to associate object with. Keyword Args: + accept (str): [optional] if omitted the server will use the default value of 'application/hal+json' create_associated_identity_request (CreateAssociatedIdentityRequest): [optional] _return_http_data_only (bool): response data without head status code and headers. Default is True. @@ -604,7 +586,7 @@ def create( ): """Create an Identity # noqa: E501 - Create an `Identity` for your merchant or buyer. All fields for a buyer's `Identity` are optional. Providing `business_type` indicates that the `Identity` is being created for a Merchant. Creating `Identities` for merchants requires they provide [KYC details](/docs/guides/getting-started/). - When creating an `Identity` for a buyer , don't pass the `business_type` field. Including a value for `business_type` configures the created `Identity` to get processed as a merchant. - When creating an `Identity` for a buyer, all fields are optional . Related Guides: [Getting Started](/docs/guides/getting-started/), [Onboarding](/docs/guides/onboarding/) # noqa: E501 + Create an `Identity` for your seller or buyer. All fields for a buyer's `Identity` are optional. Providing `business_type` indicates that the `Identity` is being created for a Merchant. Related Guides: [Getting Started](/guides/getting-started/), [Onboarding](/guides/onboarding/) # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -613,6 +595,8 @@ def create( Keyword Args: + accept (str): [optional] if omitted the server will use the default value of 'application/hal+json' + finix_version (str): Specify the API version of your request. For more details, see [Versioning.](/guides/developers/versioning/). [optional] if omitted the server will use the default value of '2018-01-01' create_identity_request (CreateIdentityRequest): . [optional] _return_http_data_only (bool): response data without head status code and headers. Default is True. @@ -672,85 +656,6 @@ def create( kwargs['_host_index'] = kwargs.get('_host_index') return self._create_endpoint.call_with_http_info(**kwargs) - def create_identity_verification( - self, - identity_id, - **kwargs - ): - """Verify an Identity # noqa: E501 - - Verify an `Identity`. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.create_identity_verification(identity_id, async_req=True) - >>> result = thread.get() - - Args: - identity_id (str): ID of `Identity` to verify. - - Keyword Args: - create_verification_request (CreateVerificationRequest): [optional] - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - async_req (bool): execute request asynchronously - - Returns: - Verification - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', False - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', False - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['identity_id'] = \ - identity_id - return self._create_identity_verification_endpoint.call_with_http_info(**kwargs) - def get( self, identity_id, @@ -769,6 +674,7 @@ def get( identity_id (str): ID of the `Identity` to fetch. Keyword Args: + accept (str): [optional] if omitted the server will use the default value of 'application/hal+json' _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object @@ -835,7 +741,7 @@ def list( ): """List Identities # noqa: E501 - Retrieves a list of `Identities`. # noqa: E501 + Retrieve a list of `Identities`. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -844,7 +750,7 @@ def list( Keyword Args: - sort (str): Specify key to be used for sorting the collection.. [optional] + accept (str): Body Header. [optional] if omitted the server will use the default value of 'application/hal+json' after_cursor (str): Return every resource created after the cursor value.. [optional] limit (int): The numbers of items to return.. [optional] id (str): Filter by `id`.. [optional] @@ -858,6 +764,8 @@ def list( last_name (str): Filter by the last name of the person associated to the `Identity`.. [optional] title (str): Filter by the title if available.. [optional] before_cursor (str): Return every resource created before the cursor value.. [optional] + tags_key (str): Filter by the [`key` of a `Tag`](/api/overview/#section/Tags).. [optional] + tags_value (str): Filter by the [value of a `Tag`](https://finix.com/docs/api/overview/#section/Tags).. [optional] _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object @@ -936,6 +844,7 @@ def list_associated_identities( identity_id (str): ID of `Identity` to associate object with. Keyword Args: + accept (str): [optional] if omitted the server will use the default value of 'application/hal+json' limit (int): The number of entries to return.. [optional] after_cursor (str): Return every resource created after the cursor value.. [optional] before_cursor (str): Return every resource created before the cursor value.. [optional] @@ -1008,7 +917,7 @@ def update( ): """Update an Identity # noqa: E501 - Update an existing `Identity`. If you are updating the `Identity` of a `Merchant` that’s already been onboarded, you need to [verify the merchant again](#operation/createMerchantVerification). # noqa: E501 + Update an existing `Identity`. If you are updating the `Identity` of a `Merchant` that’s already been onboarded, you need to [verify the merchant again](/api/tag/Merchants/#tag/Merchants/operation/createMerchantVerification). # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -1019,6 +928,7 @@ def update( identity_id (str): ID of the `Identity` to fetch. Keyword Args: + accept (str): [optional] if omitted the server will use the default value of 'application/hal+json' update_identity_request (UpdateIdentityRequest): [optional] _return_http_data_only (bool): response data without head status code and headers. Default is True. diff --git a/finix/api/instrument_updates_api.py b/finix/api/instrument_updates_api.py index bcae549..59b0e8e 100644 --- a/finix/api/instrument_updates_api.py +++ b/finix/api/instrument_updates_api.py @@ -19,13 +19,13 @@ none_type, validate_and_convert_types ) -from finix.model.create_instrument_update_request import CreateInstrumentUpdateRequest -from finix.model.error401_unauthorized import Error401Unauthorized -from finix.model.error403_forbidden_list import Error403ForbiddenList -from finix.model.error404_not_found_list import Error404NotFoundList -from finix.model.error406_not_acceptable import Error406NotAcceptable -from finix.model.error_generic import ErrorGeneric -from finix.model.instrument_update import InstrumentUpdate +from typing_extensions import Annotated +from pydantic import Field, StrictStr + +from typing import Optional, Union + +from finix.models.create_instrument_update_request import CreateInstrumentUpdateRequest +from finix.models.instrument_update import InstrumentUpdate from finix.model.finix_utils import FinixList from functools import wraps @@ -74,6 +74,7 @@ def __init__(self, api_client=None): }, params_map={ 'all': [ + 'accept', 'create_instrument_update_request', ], 'required': [], @@ -90,12 +91,16 @@ def __init__(self, api_client=None): 'allowed_values': { }, 'openapi_types': { + 'accept': + (str,), 'create_instrument_update_request': (CreateInstrumentUpdateRequest,), }, 'attribute_map': { + 'accept': 'Accept', }, 'location_map': { + 'accept': 'header', 'create_instrument_update_request': 'body', }, 'collection_format_map': { @@ -103,7 +108,7 @@ def __init__(self, api_client=None): }, headers_map={ 'accept': [ - 'application/hal+json' + 'application/json' ], 'content_type': [ 'multipart/form-data' @@ -113,7 +118,7 @@ def __init__(self, api_client=None): ) self._download_endpoint = finix.api_client.Endpoint( settings={ - 'response_type': (file_type,), + 'response_type': (bytearray,), 'auth': [ 'BasicAuth' ], @@ -125,6 +130,7 @@ def __init__(self, api_client=None): params_map={ 'all': [ 'instrument_updates_id', + 'accept', 'format', ], 'required': [ @@ -145,15 +151,19 @@ def __init__(self, api_client=None): 'openapi_types': { 'instrument_updates_id': (str,), + 'accept': + (str,), 'format': (str,), }, 'attribute_map': { 'instrument_updates_id': 'instrument_updates_id', + 'accept': 'Accept', 'format': 'format', }, 'location_map': { 'instrument_updates_id': 'path', + 'accept': 'header', 'format': 'query', }, 'collection_format_map': { @@ -161,8 +171,7 @@ def __init__(self, api_client=None): }, headers_map={ 'accept': [ - 'application/json', - 'application/hal+json' + 'application/json' ], 'content_type': [], }, @@ -182,6 +191,7 @@ def __init__(self, api_client=None): params_map={ 'all': [ 'instrument_updates_id', + 'accept', ], 'required': [ 'instrument_updates_id', @@ -201,19 +211,23 @@ def __init__(self, api_client=None): 'openapi_types': { 'instrument_updates_id': (str,), + 'accept': + (str,), }, 'attribute_map': { 'instrument_updates_id': 'instrument_updates_id', + 'accept': 'Accept', }, 'location_map': { 'instrument_updates_id': 'path', + 'accept': 'header', }, 'collection_format_map': { } }, headers_map={ 'accept': [ - 'application/hal+json' + 'application/json' ], 'content_type': [], }, @@ -235,6 +249,7 @@ def create( Keyword Args: + accept (str): [optional] if omitted the server will use the default value of 'application/hal+json' create_instrument_update_request (CreateInstrumentUpdateRequest): . [optional] _return_http_data_only (bool): response data without head status code and headers. Default is True. @@ -312,6 +327,7 @@ def download( instrument_updates_id (str): The ID of the `instrument_updates` resource. This ID was returned when initially creating the `instrument_updates` object. Keyword Args: + accept (str): [optional] if omitted the server will use the default value of 'application/hal+json' format (str): Specify the format you'd like to download the response in (JSON is the only other format available for download).. [optional] _return_http_data_only (bool): response data without head status code and headers. Default is True. @@ -341,7 +357,7 @@ def download( async_req (bool): execute request asynchronously Returns: - file_type + bytearray If the method is called asynchronously, returns the request thread. """ @@ -380,7 +396,7 @@ def get( ): """Fetch an Instrument Update # noqa: E501 - Fetch a specific `instrument_update` from an `instrument_updates` resource. For more information, see the guide on using our [Account Updater](/guides/payments/account-updater). # noqa: E501 + Fetch a specific `instrument_update` from an `instrument_updates` resource. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -391,6 +407,7 @@ def get( instrument_updates_id (str): The ID of the `instrument_update`. Keyword Args: + accept (str): [optional] if omitted the server will use the default value of 'application/hal+json' _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object diff --git a/finix/api/merchant_profiles_api.py b/finix/api/merchant_profiles_api.py index 3cd264f..e81998a 100644 --- a/finix/api/merchant_profiles_api.py +++ b/finix/api/merchant_profiles_api.py @@ -19,13 +19,14 @@ none_type, validate_and_convert_types ) -from finix.model.error401_unauthorized import Error401Unauthorized -from finix.model.error403_forbidden_list import Error403ForbiddenList -from finix.model.error404_not_found_list import Error404NotFoundList -from finix.model.error406_not_acceptable import Error406NotAcceptable -from finix.model.merchant_profile import MerchantProfile -from finix.model.merchant_profiles_list import MerchantProfilesList -from finix.model.update_merchant_profile_request import UpdateMerchantProfileRequest +from typing_extensions import Annotated +from pydantic import Field, StrictInt, StrictStr + +from typing import Optional + +from finix.models.merchant_profile import MerchantProfile +from finix.models.merchant_profiles_list import MerchantProfilesList +from finix.models.update_merchant_profile_request import UpdateMerchantProfileRequest from finix.model.finix_utils import FinixList from functools import wraps @@ -75,6 +76,7 @@ def __init__(self, api_client=None): params_map={ 'all': [ 'merchant_profile_id', + 'accept', ], 'required': [ 'merchant_profile_id', @@ -94,19 +96,23 @@ def __init__(self, api_client=None): 'openapi_types': { 'merchant_profile_id': (str,), + 'accept': + (str,), }, 'attribute_map': { 'merchant_profile_id': 'merchant_profile_id', + 'accept': 'Accept', }, 'location_map': { 'merchant_profile_id': 'path', + 'accept': 'header', }, 'collection_format_map': { } }, headers_map={ 'accept': [ - 'application/hal+json' + 'application/json' ], 'content_type': [], }, @@ -125,6 +131,7 @@ def __init__(self, api_client=None): }, params_map={ 'all': [ + 'accept', 'id', 'before_cursor', 'limit', @@ -144,6 +151,8 @@ def __init__(self, api_client=None): 'allowed_values': { }, 'openapi_types': { + 'accept': + (str,), 'id': (str,), 'before_cursor': @@ -154,12 +163,14 @@ def __init__(self, api_client=None): (str,), }, 'attribute_map': { + 'accept': 'Accept', 'id': 'id', 'before_cursor': 'before_cursor', 'limit': 'limit', 'after_cursor': 'after_cursor', }, 'location_map': { + 'accept': 'header', 'id': 'query', 'before_cursor': 'query', 'limit': 'query', @@ -170,7 +181,7 @@ def __init__(self, api_client=None): }, headers_map={ 'accept': [ - 'application/hal+json' + 'application/json' ], 'content_type': [], }, @@ -190,6 +201,7 @@ def __init__(self, api_client=None): params_map={ 'all': [ 'merchant_profile_id', + 'accept', 'update_merchant_profile_request', ], 'required': [ @@ -210,14 +222,18 @@ def __init__(self, api_client=None): 'openapi_types': { 'merchant_profile_id': (str,), + 'accept': + (str,), 'update_merchant_profile_request': (UpdateMerchantProfileRequest,), }, 'attribute_map': { 'merchant_profile_id': 'merchant_profile_id', + 'accept': 'Accept', }, 'location_map': { 'merchant_profile_id': 'path', + 'accept': 'header', 'update_merchant_profile_request': 'body', }, 'collection_format_map': { @@ -225,10 +241,10 @@ def __init__(self, api_client=None): }, headers_map={ 'accept': [ - 'application/hal+json' + 'application/json' ], 'content_type': [ - 'application/hal+json' + 'application/json' ] }, api_client=api_client @@ -252,6 +268,7 @@ def get( merchant_profile_id (str): ID of `merchant_profile`. Keyword Args: + accept (str): [optional] if omitted the server will use the default value of 'application/hal+json' _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object @@ -327,6 +344,7 @@ def list( Keyword Args: + accept (str): Body Header. [optional] if omitted the server will use the default value of 'application/hal+json' id (str): Filter by `id`.. [optional] before_cursor (str): Return every resource created before the cursor value.. [optional] limit (int): The numbers of items to return.. [optional] @@ -409,6 +427,7 @@ def update( merchant_profile_id (str): ID of `merchant_profile`. Keyword Args: + accept (str): [optional] if omitted the server will use the default value of 'application/hal+json' update_merchant_profile_request (UpdateMerchantProfileRequest): [optional] _return_http_data_only (bool): response data without head status code and headers. Default is True. diff --git a/finix/api/merchants_api.py b/finix/api/merchants_api.py index ea8b6c9..236adc3 100644 --- a/finix/api/merchants_api.py +++ b/finix/api/merchants_api.py @@ -19,17 +19,17 @@ none_type, validate_and_convert_types ) -from finix.model.create_merchant_underwriting_request import CreateMerchantUnderwritingRequest -from finix.model.create_verification_request import CreateVerificationRequest -from finix.model.error401_unauthorized import Error401Unauthorized -from finix.model.error403_forbidden_list import Error403ForbiddenList -from finix.model.error404_not_found_list import Error404NotFoundList -from finix.model.error406_not_acceptable import Error406NotAcceptable -from finix.model.error_generic import ErrorGeneric -from finix.model.merchant import Merchant -from finix.model.merchants_list import MerchantsList -from finix.model.update_merchant_request import UpdateMerchantRequest -from finix.model.verification import Verification +from typing_extensions import Annotated +from pydantic import Field, StrictInt, StrictStr + +from typing import Optional + +from finix.models.create_merchant_underwriting_request import CreateMerchantUnderwritingRequest +from finix.models.create_verification_request import CreateVerificationRequest +from finix.models.merchant import Merchant +from finix.models.merchants_list import MerchantsList +from finix.models.update_merchant_request import UpdateMerchantRequest +from finix.models.verification import Verification from finix.model.finix_utils import FinixList from functools import wraps @@ -79,6 +79,8 @@ def __init__(self, api_client=None): params_map={ 'all': [ 'identity_id', + 'accept', + 'finix_version', 'create_merchant_underwriting_request', ], 'required': [ @@ -99,14 +101,22 @@ def __init__(self, api_client=None): 'openapi_types': { 'identity_id': (str,), + 'accept': + (str,), + 'finix_version': + (str,), 'create_merchant_underwriting_request': (CreateMerchantUnderwritingRequest,), }, 'attribute_map': { 'identity_id': 'identity_id', + 'accept': 'Accept', + 'finix_version': 'Finix-Version', }, 'location_map': { 'identity_id': 'path', + 'accept': 'header', + 'finix_version': 'header', 'create_merchant_underwriting_request': 'body', }, 'collection_format_map': { @@ -114,28 +124,30 @@ def __init__(self, api_client=None): }, headers_map={ 'accept': [ - 'application/hal+json' + 'application/json' ], 'content_type': [ - 'application/hal+json' + 'application/json' ] }, api_client=api_client ) - self._create_merchant_verification_endpoint = finix.api_client.Endpoint( + self._create_endpoint = finix.api_client.Endpoint( settings={ 'response_type': (Verification,), 'auth': [ 'BasicAuth' ], 'endpoint_path': '/merchants/{merchant_id}/verifications', - 'operation_id': 'create_merchant_verification', + 'operation_id': 'create', 'http_method': 'POST', 'servers': None, }, params_map={ 'all': [ 'merchant_id', + 'accept', + 'finix_version', 'create_verification_request', ], 'required': [ @@ -156,14 +168,22 @@ def __init__(self, api_client=None): 'openapi_types': { 'merchant_id': (str,), + 'accept': + (str,), + 'finix_version': + (str,), 'create_verification_request': (CreateVerificationRequest,), }, 'attribute_map': { 'merchant_id': 'merchant_id', + 'accept': 'Accept', + 'finix_version': 'Finix-Version', }, 'location_map': { 'merchant_id': 'path', + 'accept': 'header', + 'finix_version': 'header', 'create_verification_request': 'body', }, 'collection_format_map': { @@ -171,10 +191,10 @@ def __init__(self, api_client=None): }, headers_map={ 'accept': [ - 'application/hal+json' + 'application/json' ], 'content_type': [ - 'application/hal+json' + 'application/json' ] }, api_client=api_client @@ -193,6 +213,7 @@ def __init__(self, api_client=None): params_map={ 'all': [ 'merchant_id', + 'accept', ], 'required': [ 'merchant_id', @@ -212,19 +233,23 @@ def __init__(self, api_client=None): 'openapi_types': { 'merchant_id': (str,), + 'accept': + (str,), }, 'attribute_map': { 'merchant_id': 'merchant_id', + 'accept': 'Accept', }, 'location_map': { 'merchant_id': 'path', + 'accept': 'header', }, 'collection_format_map': { } }, headers_map={ 'accept': [ - 'application/hal+json' + 'application/json' ], 'content_type': [], }, @@ -243,13 +268,15 @@ def __init__(self, api_client=None): }, params_map={ 'all': [ + 'accept', 'id', - 'created_at_gte', - 'created_at_lte', 'after_cursor', 'before_cursor', + 'created_at_gte', + 'created_at_lte', 'limit', - 'sort', + 'updated_at_gte', + 'updated_at_lte', ], 'required': [], 'nullable': [ @@ -265,45 +292,53 @@ def __init__(self, api_client=None): 'allowed_values': { }, 'openapi_types': { - 'id': - (str,), - 'created_at_gte': + 'accept': (str,), - 'created_at_lte': + 'id': (str,), 'after_cursor': (str,), 'before_cursor': (str,), + 'created_at_gte': + (str,), + 'created_at_lte': + (str,), 'limit': (int,), - 'sort': + 'updated_at_gte': + (str,), + 'updated_at_lte': (str,), }, 'attribute_map': { + 'accept': 'Accept', 'id': 'id', - 'created_at_gte': 'created_at.gte', - 'created_at_lte': 'created_at.lte', 'after_cursor': 'after_cursor', 'before_cursor': 'before_cursor', + 'created_at_gte': 'created_at.gte', + 'created_at_lte': 'created_at.lte', 'limit': 'limit', - 'sort': 'sort', + 'updated_at_gte': 'updated_at.gte', + 'updated_at_lte': 'updated_at.lte', }, 'location_map': { + 'accept': 'header', 'id': 'query', - 'created_at_gte': 'query', - 'created_at_lte': 'query', 'after_cursor': 'query', 'before_cursor': 'query', + 'created_at_gte': 'query', + 'created_at_lte': 'query', 'limit': 'query', - 'sort': 'query', + 'updated_at_gte': 'query', + 'updated_at_lte': 'query', }, 'collection_format_map': { } }, headers_map={ 'accept': [ - 'application/hal+json' + 'application/json' ], 'content_type': [], }, @@ -323,6 +358,8 @@ def __init__(self, api_client=None): params_map={ 'all': [ 'merchant_id', + 'accept', + 'finix_version', 'update_merchant_request', ], 'required': [ @@ -343,14 +380,22 @@ def __init__(self, api_client=None): 'openapi_types': { 'merchant_id': (str,), + 'accept': + (str,), + 'finix_version': + (str,), 'update_merchant_request': (UpdateMerchantRequest,), }, 'attribute_map': { 'merchant_id': 'merchant_id', + 'accept': 'Accept', + 'finix_version': 'Finix-Version', }, 'location_map': { 'merchant_id': 'path', + 'accept': 'header', + 'finix_version': 'header', 'update_merchant_request': 'body', }, 'collection_format_map': { @@ -358,10 +403,10 @@ def __init__(self, api_client=None): }, headers_map={ 'accept': [ - 'application/hal+json' + 'application/json' ], 'content_type': [ - 'application/hal+json' + 'application/json' ] }, api_client=api_client @@ -374,7 +419,7 @@ def create( ): """Create a Merchant # noqa: E501 - Create a `Merchant` to start the underwriting (also called provisioning) process for your merchant. `Merchants` must be created under an [`Identity`](#tag/Identities). > A bank account must be associated with the previously created `Identity` before a `Merchant` can be succefully onboarded and verified. `Merchant` resources can have three possible `onboarding_states`: 1. **PROVISIONING**: The request is pending (the state can change after two minutes). * `processing_enabled`: **False** * `settlement_enabled`: **False** 1. **APPROVED**: The `Merchant` has been approved and can begin processing payments. * `processing_enabled`: **True** * `settlement_enabled`: **True** 1. **REJECTED**: The `Merchant` was rejected by the processor because of invalid information or it failed a regulatory and/or compliance check (e.g. KYC, OFAC, or MATCH). Make any changes that are needed, and [try verifying the `Merchant` again](#operation/createMerchantVerification). * `processing_enabled`: **False** * `settlement_enabled`: **False** > Provisioning a `Merchant` account is an asynchronous request. We recommend creating a [`Webhook`](#tag/Webhooks) to listen for the state change. # noqa: E501 + Create a `Merchant` to start the underwriting (also called provisioning) process for your seller. `Merchants` must be created under an [`Identity`](/api/tag/Identities). A bank account must be associated with the previously created `Identity` before a `Merchant` can be successfully onboarded and verified. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -385,6 +430,8 @@ def create( identity_id (str): ID of `Identity` to fetch. Keyword Args: + accept (str): [optional] if omitted the server will use the default value of 'application/hal+json' + finix_version (str): Specify the API version of your request. For more details, see [Versioning.](/guides/developers/versioning/). [optional] if omitted the server will use the default value of '2018-01-01' create_merchant_underwriting_request (CreateMerchantUnderwritingRequest): [optional] _return_http_data_only (bool): response data without head status code and headers. Default is True. @@ -446,24 +493,26 @@ def create( identity_id return self._create_endpoint.call_with_http_info(**kwargs) - def create_merchant_verification( + def create( self, merchant_id, **kwargs ): """Verify a Merchant # noqa: E501 - If the `onboarding_state` for a `Merchant` returns **FAILED**, correct the `Identity` information saved for the `Merchant`. Once corrected, try verifying (also called provisioning) the `Merchant` again with another request. # noqa: E501 + Verify a `Merchant` if the `onboarding_state` for a `Merchant` returns **FAILED**, or if the correct the seller needs to update the saved in their information `Identity`. Related Guides: [Onboarding Process](/guides/onboarding/onboarding-process/#reverify-a-merchant) # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.create_merchant_verification(merchant_id, async_req=True) + >>> thread = api.create(merchant_id, async_req=True) >>> result = thread.get() Args: merchant_id (str): ID of `Merchant` object. Keyword Args: + accept (str): [optional] if omitted the server will use the default value of 'application/hal+json' + finix_version (str): Specify the API version of your request. For more details, see [Versioning.](/guides/developers/versioning/). [optional] if omitted the server will use the default value of '2018-01-01' create_verification_request (CreateVerificationRequest): [optional] _return_http_data_only (bool): response data without head status code and headers. Default is True. @@ -523,7 +572,7 @@ def create_merchant_verification( kwargs['_host_index'] = kwargs.get('_host_index') kwargs['merchant_id'] = \ merchant_id - return self._create_merchant_verification_endpoint.call_with_http_info(**kwargs) + return self._create_endpoint.call_with_http_info(**kwargs) def get( self, @@ -543,6 +592,7 @@ def get( merchant_id (str): ID of `Merchant`. Keyword Args: + accept (str): [optional] if omitted the server will use the default value of 'application/hal+json' _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object @@ -618,13 +668,15 @@ def list( Keyword Args: + accept (str): Body Header. [optional] if omitted the server will use the default value of 'application/hal+json' id (str): Filter by `id`.. [optional] - created_at_gte (str): Filter where `created_at` is after the given date.. [optional] - created_at_lte (str): Filter where `created_at` is before the given date.. [optional] after_cursor (str): Return every resource created after the cursor value.. [optional] before_cursor (str): Return every resource created before the cursor value.. [optional] + created_at_gte (str): Filter where `created_at` is after the given date.. [optional] + created_at_lte (str): Filter where `created_at` is before the given date.. [optional] limit (int): The numbers of items to return.. [optional] - sort (str): Specify key to be used for sorting the collection.. [optional] + updated_at_gte (str): Filter where `updated_at` is after the given date.. [optional] + updated_at_lte (str): Filter where `updated_at` is before the given date.. [optional] _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object @@ -692,7 +744,7 @@ def update( ): """Update a Merchant # noqa: E501 - Update a `Merchant` to: - Change the `Identity` information saved with the underlying processor - Enable Level 2/3 processing - Enable [Buyer Chages](/guides/payments/buyer-charges/) # noqa: E501 + Update a `Merchant` to: - Change the `Identity` information saved with the underlying processor - [Enable Level 2/3 processing](/guides/payments/making-a-payment/level-2-and-level-3-processing/) - Enable [buyer charges](/guides/payments/making-a-payment/buyer-charges/) - Disable a `Merchant` so the seller can't create new `Transfers` and `Authorizations`. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -703,6 +755,8 @@ def update( merchant_id (str): ID of `Merchant`. Keyword Args: + accept (str): [optional] if omitted the server will use the default value of 'application/hal+json' + finix_version (str): Specify the API version of your request. For more details, see [Versioning.](/guides/developers/versioning/). [optional] if omitted the server will use the default value of '2018-01-01' update_merchant_request (UpdateMerchantRequest): [optional] _return_http_data_only (bool): response data without head status code and headers. Default is True. diff --git a/finix/api/onboarding_forms_api.py b/finix/api/onboarding_forms_api.py index 0255a56..27d95cf 100644 --- a/finix/api/onboarding_forms_api.py +++ b/finix/api/onboarding_forms_api.py @@ -19,15 +19,15 @@ none_type, validate_and_convert_types ) -from finix.model.create_onboarding_form_link_request import CreateOnboardingFormLinkRequest -from finix.model.create_onboarding_form_request import CreateOnboardingFormRequest -from finix.model.error401_unauthorized import Error401Unauthorized -from finix.model.error403_forbidden_list import Error403ForbiddenList -from finix.model.error404_not_found_list import Error404NotFoundList -from finix.model.error406_not_acceptable import Error406NotAcceptable -from finix.model.error422_invalid_field_list import Error422InvalidFieldList -from finix.model.onboarding_form import OnboardingForm -from finix.model.onboarding_form_link import OnboardingFormLink +from typing_extensions import Annotated +from pydantic import Field, StrictStr + +from typing import Optional + +from finix.models.create_onboarding_form_link_request import CreateOnboardingFormLinkRequest +from finix.models.create_onboarding_form_request import CreateOnboardingFormRequest +from finix.models.onboarding_form import OnboardingForm +from finix.models.onboarding_form_link import OnboardingFormLink from finix.model.finix_utils import FinixList from functools import wraps @@ -105,8 +105,7 @@ def __init__(self, api_client=None): }, headers_map={ 'accept': [ - 'application/json', - 'application/hal+json' + 'application/json' ], 'content_type': [ 'application/json' @@ -128,6 +127,7 @@ def __init__(self, api_client=None): params_map={ 'all': [ 'onboarding_form_id', + 'accept', 'create_onboarding_form_link_request', ], 'required': [ @@ -148,14 +148,18 @@ def __init__(self, api_client=None): 'openapi_types': { 'onboarding_form_id': (str,), + 'accept': + (str,), 'create_onboarding_form_link_request': (CreateOnboardingFormLinkRequest,), }, 'attribute_map': { 'onboarding_form_id': 'onboarding_form_id', + 'accept': 'Accept', }, 'location_map': { 'onboarding_form_id': 'path', + 'accept': 'header', 'create_onboarding_form_link_request': 'body', }, 'collection_format_map': { @@ -163,8 +167,7 @@ def __init__(self, api_client=None): }, headers_map={ 'accept': [ - 'application/json', - 'application/hal+json' + 'application/json' ], 'content_type': [ 'application/json' @@ -186,6 +189,7 @@ def __init__(self, api_client=None): params_map={ 'all': [ 'onboarding_form_id', + 'accept', ], 'required': [ 'onboarding_form_id', @@ -205,20 +209,23 @@ def __init__(self, api_client=None): 'openapi_types': { 'onboarding_form_id': (str,), + 'accept': + (str,), }, 'attribute_map': { 'onboarding_form_id': 'onboarding_form_id', + 'accept': 'Accept', }, 'location_map': { 'onboarding_form_id': 'path', + 'accept': 'header', }, 'collection_format_map': { } }, headers_map={ 'accept': [ - 'application/json', - 'application/hal+json' + 'application/json' ], 'content_type': [], }, @@ -231,7 +238,7 @@ def create( ): """Create an Onboarding Form # noqa: E501 - Create an onboarding_form with the name of the processor you plan to onboard users to and the links they get redirected to when completing or moving away from the Finix Onboarding Form. > Use your **ROLE_PARTNER** credentials to create an `onboarding_form`. # noqa: E501 + Create an `onboarding_form` with the name of the processor you plan to onboard users to and the links they` get redirected to when completing or moving away from the Finix Onboarding Form. Only **ROLE_PARTNER** credentials can be used to create an `onboarding_form`. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -306,7 +313,7 @@ def create_link( ): """Create an Onboarding Form Link # noqa: E501 - You can use the `onboarding_forms` API to create a link that can return users to where they left off completing their Finix Onboarding Form. # noqa: E501 + Use the `onboarding_forms` API to create a link that can return users to where they left off completing their Finix Onboarding Form. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -317,6 +324,7 @@ def create_link( onboarding_form_id (str): The ID of the `onboarding_form` resource. Keyword Args: + accept (str): [optional] if omitted the server will use the default value of 'application/hal+json' create_onboarding_form_link_request (CreateOnboardingFormLinkRequest): [optional] _return_http_data_only (bool): response data without head status code and headers. Default is True. @@ -396,6 +404,7 @@ def get( onboarding_form_id (str): The id of the `onboarding_form`. Keyword Args: + accept (str): [optional] if omitted the server will use the default value of 'application/hal+json' _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object diff --git a/finix/api/payment_instruments_api.py b/finix/api/payment_instruments_api.py index d9889a8..d00be67 100644 --- a/finix/api/payment_instruments_api.py +++ b/finix/api/payment_instruments_api.py @@ -19,19 +19,17 @@ none_type, validate_and_convert_types ) -from finix.model.apple_pay_session import ApplePaySession -from finix.model.apple_pay_session_request import ApplePaySessionRequest -from finix.model.create_payment_instrument_request import CreatePaymentInstrumentRequest -from finix.model.error401_unauthorized import Error401Unauthorized -from finix.model.error403_forbidden_list import Error403ForbiddenList -from finix.model.error404_not_found_list import Error404NotFoundList -from finix.model.error406_not_acceptable import Error406NotAcceptable -from finix.model.error422_invalid_field_list import Error422InvalidFieldList -from finix.model.error_generic import ErrorGeneric -from finix.model.payment_instrument import PaymentInstrument -from finix.model.payment_instrument_updates_list import PaymentInstrumentUpdatesList -from finix.model.payment_instruments_list import PaymentInstrumentsList -from finix.model.update_payment_instrument_request import UpdatePaymentInstrumentRequest +from typing_extensions import Annotated +from pydantic import Field, StrictInt, StrictStr + +from typing import Optional + +from finix.models.apple_pay_session import ApplePaySession +from finix.models.apple_pay_session_request import ApplePaySessionRequest +from finix.models.create_payment_instrument_request import CreatePaymentInstrumentRequest +from finix.models.payment_instrument import PaymentInstrument +from finix.models.payment_instruments_list import PaymentInstrumentsList +from finix.models.update_payment_instrument_request import UpdatePaymentInstrumentRequest from finix.model.finix_utils import FinixList from functools import wraps @@ -109,10 +107,10 @@ def __init__(self, api_client=None): }, headers_map={ 'accept': [ - 'application/hal+json' + 'application/json' ], 'content_type': [ - 'application/hal+json' + 'application/json' ] }, api_client=api_client @@ -130,6 +128,8 @@ def __init__(self, api_client=None): }, params_map={ 'all': [ + 'accept', + 'finix_version', 'create_payment_instrument_request', ], 'required': [], @@ -146,12 +146,20 @@ def __init__(self, api_client=None): 'allowed_values': { }, 'openapi_types': { + 'accept': + (str,), + 'finix_version': + (str,), 'create_payment_instrument_request': (CreatePaymentInstrumentRequest,), }, 'attribute_map': { + 'accept': 'Accept', + 'finix_version': 'Finix-Version', }, 'location_map': { + 'accept': 'header', + 'finix_version': 'header', 'create_payment_instrument_request': 'body', }, 'collection_format_map': { @@ -159,10 +167,10 @@ def __init__(self, api_client=None): }, headers_map={ 'accept': [ - 'application/hal+json' + 'application/json' ], 'content_type': [ - 'application/hal+json' + 'application/json' ] }, api_client=api_client @@ -181,6 +189,7 @@ def __init__(self, api_client=None): params_map={ 'all': [ 'payment_instrument_id', + 'accept', ], 'required': [ 'payment_instrument_id', @@ -200,85 +209,23 @@ def __init__(self, api_client=None): 'openapi_types': { 'payment_instrument_id': (str,), - }, - 'attribute_map': { - 'payment_instrument_id': 'payment_instrument_id', - }, - 'location_map': { - 'payment_instrument_id': 'path', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/hal+json' - ], - 'content_type': [], - }, - api_client=api_client - ) - self._list_updates_by_payment_instrument_id_endpoint = finix.api_client.Endpoint( - settings={ - 'response_type': (PaymentInstrumentUpdatesList,), - 'auth': [ - 'BasicAuth' - ], - 'endpoint_path': '/payment_instruments/{payment_instrument_id}/updates', - 'operation_id': 'list_updates_by_payment_instrument_id', - 'http_method': 'GET', - 'servers': None, - }, - params_map={ - 'all': [ - 'payment_instrument_id', - 'limit', - 'offset', - 'page_size', - ], - 'required': [ - 'payment_instrument_id', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'payment_instrument_id': + 'accept': (str,), - 'limit': - (int,), - 'offset': - (int,), - 'page_size': - (int,), }, 'attribute_map': { 'payment_instrument_id': 'payment_instrument_id', - 'limit': 'limit', - 'offset': 'offset', - 'page_size': 'pageSize', + 'accept': 'Accept', }, 'location_map': { 'payment_instrument_id': 'path', - 'limit': 'query', - 'offset': 'query', - 'page_size': 'query', + 'accept': 'header', }, 'collection_format_map': { } }, headers_map={ 'accept': [ - 'application/hal+json' + 'application/json' ], 'content_type': [], }, @@ -297,6 +244,7 @@ def __init__(self, api_client=None): }, params_map={ 'all': [ + 'accept', 'account_last4', 'account_routing_number', 'after_cursor', @@ -307,11 +255,13 @@ def __init__(self, api_client=None): 'created_at_lte', 'expiration_month', 'expiration_year', - 'last_four', + 'last4', 'limit', 'name', 'owner_identity_id', 'type', + 'tags_key', + 'tags_value', ], 'required': [], 'nullable': [ @@ -328,12 +278,14 @@ def __init__(self, api_client=None): 'allowed_values': { ('type',): { - "ALL": "ALL", - "BANK_ACCOUNT": "BANK_ACCOUNT", - "PAYMENT_CARD": "PAYMENT_CARD" + "'ALL'": 'ALL', + "'BANK_ACCOUNT'": 'BANK_ACCOUNT', + "'PAYMENT_CARD'": 'PAYMENT_CARD' }, }, 'openapi_types': { + 'accept': + (str,), 'account_last4': (str,), 'account_routing_number': @@ -354,7 +306,7 @@ def __init__(self, api_client=None): (str,), 'expiration_year': (str,), - 'last_four': + 'last4': (str,), 'limit': (int,), @@ -364,8 +316,13 @@ def __init__(self, api_client=None): (str,), 'type': (str,), + 'tags_key': + (str,), + 'tags_value': + (str,), }, 'attribute_map': { + 'accept': 'Accept', 'account_last4': 'account_last4', 'account_routing_number': 'account_routing_number', 'after_cursor': 'after_cursor', @@ -376,13 +333,16 @@ def __init__(self, api_client=None): 'created_at_lte': 'created_at.lte', 'expiration_month': 'expiration_month', 'expiration_year': 'expiration_year', - 'last_four': 'last_four', + 'last4': 'last4', 'limit': 'limit', 'name': 'name', 'owner_identity_id': 'owner_identity_id', 'type': 'type', + 'tags_key': 'tags.key', + 'tags_value': 'tags.value', }, 'location_map': { + 'accept': 'header', 'account_last4': 'query', 'account_routing_number': 'query', 'after_cursor': 'query', @@ -393,18 +353,20 @@ def __init__(self, api_client=None): 'created_at_lte': 'query', 'expiration_month': 'query', 'expiration_year': 'query', - 'last_four': 'query', + 'last4': 'query', 'limit': 'query', 'name': 'query', 'owner_identity_id': 'query', 'type': 'query', + 'tags_key': 'query', + 'tags_value': 'query', }, 'collection_format_map': { } }, headers_map={ 'accept': [ - 'application/hal+json' + 'application/json' ], 'content_type': [], }, @@ -424,6 +386,8 @@ def __init__(self, api_client=None): params_map={ 'all': [ 'payment_instrument_id', + 'accept', + 'finix_version', 'update_payment_instrument_request', ], 'required': [ @@ -444,14 +408,22 @@ def __init__(self, api_client=None): 'openapi_types': { 'payment_instrument_id': (str,), + 'accept': + (str,), + 'finix_version': + (str,), 'update_payment_instrument_request': (UpdatePaymentInstrumentRequest,), }, 'attribute_map': { 'payment_instrument_id': 'payment_instrument_id', + 'accept': 'Accept', + 'finix_version': 'Finix-Version', }, 'location_map': { 'payment_instrument_id': 'path', + 'accept': 'header', + 'finix_version': 'header', 'update_payment_instrument_request': 'body', }, 'collection_format_map': { @@ -459,10 +431,10 @@ def __init__(self, api_client=None): }, headers_map={ 'accept': [ - 'application/hal+json' + 'application/json' ], 'content_type': [ - 'application/hal+json' + 'application/json' ] }, api_client=api_client @@ -474,7 +446,7 @@ def create_apple_pay_session( ): """Create an Apple Pay Session # noqa: E501 - Create an `apple_pay_session` to process Apple Pay transactions on the web. To create an Apple Pay Session, pass the unique `validation_url` (provided by Apple) while creating an `apple_pay_sessions` resource. Finix returns a `merchantSession` object that you can use to create a payment. For more information, see [Apple Pay](/docs/guides/payments/alternative-payment-methods/apple-pay/). # noqa: E501 + Create an `apple_pay_session` to process Apple Pay transactions on the web. To create an Apple Pay Session, pass the unique `validation_url` (provided by Apple) while creating an `apple_pay_sessions` resource. Finix returns a `merchantSession` object that you can use to create a payment. For more information, see [Apple Pay](/guides/payments/alternative-payment-methods/apple-pay/). # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -548,7 +520,7 @@ def create( ): """Create a Payment Instrument # noqa: E501 - Create a `Payment Instrument` resource using a card or bank account. To accept payment details, review our guide on how to [tokenize cards using hosted fields](/guides/payments/tokenization-with-hosted-fields). - The creation of `Payment Instruments` directly via Finix's API should only be done for testing purposes. You must use the Hosted Tokenization fields or the javascript client to remain out of PCI scope. # noqa: E501 + Create a `Payment Instrument` resource using a card or bank account. - The creation of `Payment Instruments` directly via Finix's API should only be done for testing purposes. You must use [our hosted fields](/guides/payments/making-a-payment/using-hosted-fields/) or the javascript client to remain out of PCI scope. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -557,6 +529,8 @@ def create( Keyword Args: + accept (str): [optional] if omitted the server will use the default value of 'application/hal+json' + finix_version (str): Specify the API version of your request. For more details, see [Versioning.](/guides/developers/versioning/). [optional] if omitted the server will use the default value of '2018-01-01' create_payment_instrument_request (CreatePaymentInstrumentRequest): . [optional] _return_http_data_only (bool): response data without head status code and headers. Default is True. @@ -634,6 +608,7 @@ def get( payment_instrument_id (str): ID of object Keyword Args: + accept (str): [optional] if omitted the server will use the default value of 'application/hal+json' _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object @@ -694,89 +669,6 @@ def get( payment_instrument_id return self._get_endpoint.call_with_http_info(**kwargs) - def list_updates_by_payment_instrument_id( - self, - payment_instrument_id, - **kwargs - ): - """List Payment Instrument Updates # noqa: E501 - - List the updates on a `Payment Instrument`. When using the [account updater](/guides/payments/account-updater), `Payment Instrument` details that are updated are represented by an `Update`. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.list_updates_by_payment_instrument_id(payment_instrument_id, async_req=True) - >>> result = thread.get() - - Args: - payment_instrument_id (str): ID of `Payment Instrument` object. - - Keyword Args: - limit (int): The number of entries to return.. [optional] - offset (int): The number of items to skip before starting to collect the result set.. [optional] - page_size (int): The size of the page.. [optional] - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - async_req (bool): execute request asynchronously - - Returns: - PaymentInstrumentUpdatesList - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', False - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', False - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['payment_instrument_id'] = \ - payment_instrument_id - ret = self._list_updates_by_payment_instrument_id_endpoint.call_with_http_info(**kwargs) - fl = FinixList(ret, self.list_updates_by_payment_instrument_id, **kwargs) - return fl - def list( self, **kwargs @@ -792,6 +684,7 @@ def list( Keyword Args: + accept (str): Body Header. [optional] if omitted the server will use the default value of 'application/hal+json' account_last4 (str): Filter by the last 4 digits of the account if available.. [optional] account_routing_number (str): Filter by the account routing number if available.. [optional] after_cursor (str): Return every resource created after the cursor value.. [optional] @@ -802,11 +695,13 @@ def list( created_at_lte (str): Filter where `created_at` is before the given date.. [optional] expiration_month (str): Filter by the expiration month associated with the `Payment Instrument` if applicable. This filter only applies to payment cards.. [optional] expiration_year (str): Filter by the 4 digit expiration year associated with the Payment Instrument if applicable. This filter only applies to payment cards.. [optional] - last_four (str): Filter by the last 4 digits of the `Payment Instrument` card. This filter only applies to payment cards.. [optional] + last4 (str): Filter by the last 4 digits of the `Payment Instrument` card. This filter only applies to payment cards.. [optional] limit (int): The numbers of items to return.. [optional] name (str): Filter by the name.. [optional] owner_identity_id (str): Filter by the owner id of the associated `Identity`.. [optional] type (str): Filter by the `Payment Instrument` type.. [optional] + tags_key (str): Filter by the [`key` of a `Tag`](/api/overview/#section/Tags).. [optional] + tags_value (str): Filter by the [value of a `Tag`](https://finix.com/docs/api/overview/#section/Tags).. [optional] _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object @@ -874,7 +769,7 @@ def update( ): """Update a Payment Instrument # noqa: E501 - Update a `Payment Instrument`. # noqa: E501 + Update a `Payment Instrument` to: - Change the **billing address** in case the account holder moved (`instrument_type`:**PAYMENT_CARD** only). - Disable the `Payment Instrument` resource so it can't be used in requests. - Update the `name` on the `Payment Instrument`. - Change the `tags`. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -885,6 +780,8 @@ def update( payment_instrument_id (str): ID of object Keyword Args: + accept (str): [optional] if omitted the server will use the default value of 'application/hal+json' + finix_version (str): Specify the API version of your request. For more details, see [Versioning.](/guides/developers/versioning/). [optional] if omitted the server will use the default value of '2018-01-01' update_payment_instrument_request (UpdatePaymentInstrumentRequest): [optional] _return_http_data_only (bool): response data without head status code and headers. Default is True. diff --git a/finix/api/payout_profiles_api.py b/finix/api/payout_profiles_api.py new file mode 100644 index 0000000..8ca502f --- /dev/null +++ b/finix/api/payout_profiles_api.py @@ -0,0 +1,608 @@ +""" + Finix API + + The version of the OpenAPI document: 2022-02-01 + Contact: support@finixpayments.com +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +import finix.api_client +from finix.model_utils import ( # noqa: F401 + check_allowed_values, + check_validations, + date, + datetime, + file_type, + none_type, + validate_and_convert_types +) +from typing_extensions import Annotated +from pydantic import Field, StrictInt, StrictStr + +from typing import Optional + +from finix.models.payout_profile import PayoutProfile +from finix.models.payout_profiles_list import PayoutProfilesList +from finix.models.update_payout_profile_request import UpdatePayoutProfileRequest +from finix.model.finix_utils import FinixList + +from functools import wraps + +def operation_decorator(func): + @wraps(func) + def response_convert(*args, **kwargs): + ret = func(*args, **kwargs) + if hasattr(ret, 'embedded'): + tmp = ret.embedded + if isinstance(tmp, dict): + if len(tmp) == 1: + ret_0 = '' + ret_1 = '' + ret_2 = '' + for key in tmp: + ret_0 = tmp[key] + break + if hasattr(ret, 'page'): + ret_1 = ret.page + if hasattr(ret, 'links'): + ret_2 = ret.links + return (ret_0, ret_1, ret_2) + + else: + return ret + + return response_convert + +class PayoutProfilesApi(object): + + def __init__(self, api_client=None): + if api_client is None: + api_client = finix.api_client.FinixClient() + self._api_client = api_client + self._get_by_merchant_id_endpoint = finix.api_client.Endpoint( + settings={ + 'response_type': (PayoutProfile,), + 'auth': [ + 'BasicAuth' + ], + 'endpoint_path': '/merchants/{merchant_id}/payout_profile', + 'operation_id': 'get_by_merchant_id', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'merchant_id', + 'accept', + ], + 'required': [ + 'merchant_id', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'merchant_id': + (str,), + 'accept': + (str,), + }, + 'attribute_map': { + 'merchant_id': 'merchant_id', + 'accept': 'Accept', + }, + 'location_map': { + 'merchant_id': 'path', + 'accept': 'header', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self._get_endpoint = finix.api_client.Endpoint( + settings={ + 'response_type': (PayoutProfile,), + 'auth': [ + 'BasicAuth' + ], + 'endpoint_path': '/payout_profiles/{payout_profile_id}', + 'operation_id': 'get', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'payout_profile_id', + 'accept', + ], + 'required': [ + 'payout_profile_id', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'payout_profile_id': + (str,), + 'accept': + (str,), + }, + 'attribute_map': { + 'payout_profile_id': 'payout_profile_id', + 'accept': 'Accept', + }, + 'location_map': { + 'payout_profile_id': 'path', + 'accept': 'header', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self._list_endpoint = finix.api_client.Endpoint( + settings={ + 'response_type': (PayoutProfilesList,), + 'auth': [ + 'BasicAuth' + ], + 'endpoint_path': '/payout_profiles', + 'operation_id': 'list', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'after_cursor', + 'limit', + ], + 'required': [], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'after_cursor': + (str,), + 'limit': + (int,), + }, + 'attribute_map': { + 'after_cursor': 'after_cursor', + 'limit': 'limit', + }, + 'location_map': { + 'after_cursor': 'query', + 'limit': 'query', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self._update_endpoint = finix.api_client.Endpoint( + settings={ + 'response_type': (PayoutProfile,), + 'auth': [ + 'BasicAuth' + ], + 'endpoint_path': '/payout_profiles/{payout_profile_id}', + 'operation_id': 'update', + 'http_method': 'PUT', + 'servers': None, + }, + params_map={ + 'all': [ + 'payout_profile_id', + 'accept', + 'update_payout_profile_request', + ], + 'required': [ + 'payout_profile_id', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'payout_profile_id': + (str,), + 'accept': + (str,), + 'update_payout_profile_request': + (UpdatePayoutProfileRequest,), + }, + 'attribute_map': { + 'payout_profile_id': 'payout_profile_id', + 'accept': 'Accept', + }, + 'location_map': { + 'payout_profile_id': 'path', + 'accept': 'header', + 'update_payout_profile_request': 'body', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client + ) + + def get_by_merchant_id( + self, + merchant_id, + **kwargs + ): + """Fetch Payout Profile by Merchant # noqa: E501 + + Fetch the the `Payout Profile` createrd for a specific `Merchant`. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_by_merchant_id(merchant_id, async_req=True) + >>> result = thread.get() + + Args: + merchant_id (str): ID of the `Merchant`. + + Keyword Args: + accept (str): [optional] if omitted the server will use the default value of 'application/hal+json' + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + PayoutProfile + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', False + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', False + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['merchant_id'] = \ + merchant_id + return self._get_by_merchant_id_endpoint.call_with_http_info(**kwargs) + + def get( + self, + payout_profile_id, + **kwargs + ): + """Fetch a Payout Profile # noqa: E501 + + Retrieve the details of a previously created `Payout Profile`. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get(payout_profile_id, async_req=True) + >>> result = thread.get() + + Args: + payout_profile_id (str): ID of the `Payout Profile`. + + Keyword Args: + accept (str): [optional] if omitted the server will use the default value of 'application/hal+json' + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + PayoutProfile + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', False + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', False + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['payout_profile_id'] = \ + payout_profile_id + return self._get_endpoint.call_with_http_info(**kwargs) + + def list( + self, + **kwargs + ): + """List Payout Profiles # noqa: E501 + + List all `Payout Profiles`. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.list(async_req=True) + >>> result = thread.get() + + + Keyword Args: + after_cursor (str): Return every resource created after the cursor value.. [optional] + limit (int): The numbers of items to return.. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + PayoutProfilesList + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', False + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', False + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + ret = self._list_endpoint.call_with_http_info(**kwargs) + fl = FinixList(ret, self.list, **kwargs) + return fl + + def update( + self, + payout_profile_id, + **kwargs + ): + """Update a Payout Profile # noqa: E501 + + Update a `Payout Profile` to configure how fees and payouts get calculated, credited, and debited. By default, `Merchants` get configured with daily net settlements. Payouts get submitted using the **Next-Day ACH** `rail`. Contact [Finix Support](/guides/getting-started/support-at-finix/) to configure payouts on a custom schedule. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.update(payout_profile_id, async_req=True) + >>> result = thread.get() + + Args: + payout_profile_id (str): ID of the `Payout Profile`. + + Keyword Args: + accept (str): [optional] if omitted the server will use the default value of 'application/hal+json' + update_payout_profile_request (UpdatePayoutProfileRequest): [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + PayoutProfile + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', False + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', False + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['payout_profile_id'] = \ + payout_profile_id + return self._update_endpoint.call_with_http_info(**kwargs) + diff --git a/finix/api/settlements_api.py b/finix/api/settlements_api.py index 00be706..d9ccee2 100644 --- a/finix/api/settlements_api.py +++ b/finix/api/settlements_api.py @@ -19,17 +19,16 @@ none_type, validate_and_convert_types ) -from finix.model.create_settlement_request import CreateSettlementRequest -from finix.model.error401_unauthorized import Error401Unauthorized -from finix.model.error403_forbidden_list import Error403ForbiddenList -from finix.model.error404_not_found_list import Error404NotFoundList -from finix.model.error406_not_acceptable import Error406NotAcceptable -from finix.model.error422_invalid_field_list import Error422InvalidFieldList -from finix.model.error_generic import ErrorGeneric -from finix.model.remove_settlement_transfer import RemoveSettlementTransfer -from finix.model.settlement import Settlement -from finix.model.settlements_list import SettlementsList -from finix.model.transfers_list import TransfersList +from typing_extensions import Annotated +from pydantic import Field, StrictInt, StrictStr + +from typing import Optional + +from finix.models.close_settlement import CloseSettlement +from finix.models.remove_settlement_transfer import RemoveSettlementTransfer +from finix.models.settlement import Settlement +from finix.models.settlements_list import SettlementsList +from finix.models.transfers_list import TransfersList from finix.model.finix_utils import FinixList from functools import wraps @@ -65,24 +64,26 @@ def __init__(self, api_client=None): if api_client is None: api_client = finix.api_client.FinixClient() self._api_client = api_client - self._create_endpoint = finix.api_client.Endpoint( + self._put_endpoint = finix.api_client.Endpoint( settings={ 'response_type': (Settlement,), 'auth': [ 'BasicAuth' ], - 'endpoint_path': '/identities/{identity_id}/settlements', - 'operation_id': 'create', - 'http_method': 'POST', + 'endpoint_path': '/settlements/{settlement_id}', + 'operation_id': 'put', + 'http_method': 'PUT', 'servers': None, }, params_map={ 'all': [ - 'identity_id', - 'create_settlement_request', + 'settlement_id', + 'accept', + 'finix_version', + 'close_settlement', ], 'required': [ - 'identity_id', + 'settlement_id', ], 'nullable': [ ], @@ -97,27 +98,35 @@ def __init__(self, api_client=None): 'allowed_values': { }, 'openapi_types': { - 'identity_id': + 'settlement_id': + (str,), + 'accept': (str,), - 'create_settlement_request': - (CreateSettlementRequest,), + 'finix_version': + (str,), + 'close_settlement': + (CloseSettlement,), }, 'attribute_map': { - 'identity_id': 'identity_id', + 'settlement_id': 'settlement_id', + 'accept': 'Accept', + 'finix_version': 'Finix-Version', }, 'location_map': { - 'identity_id': 'path', - 'create_settlement_request': 'body', + 'settlement_id': 'path', + 'accept': 'header', + 'finix_version': 'header', + 'close_settlement': 'body', }, 'collection_format_map': { } }, headers_map={ 'accept': [ - 'application/hal+json' + 'application/json' ], 'content_type': [ - 'application/hal+json' + 'application/json' ] }, api_client=api_client @@ -136,6 +145,7 @@ def __init__(self, api_client=None): params_map={ 'all': [ 'settlement_id', + 'accept', ], 'required': [ 'settlement_id', @@ -155,19 +165,23 @@ def __init__(self, api_client=None): 'openapi_types': { 'settlement_id': (str,), + 'accept': + (str,), }, 'attribute_map': { 'settlement_id': 'settlement_id', + 'accept': 'Accept', }, 'location_map': { 'settlement_id': 'path', + 'accept': 'header', }, 'collection_format_map': { } }, headers_map={ 'accept': [ - 'application/hal+json' + 'application/json' ], 'content_type': [], }, @@ -187,9 +201,8 @@ def __init__(self, api_client=None): params_map={ 'all': [ 'settlement_id', + 'accept', 'limit', - 'after_cursor', - 'before_cursor', ], 'required': [ 'settlement_id', @@ -209,31 +222,27 @@ def __init__(self, api_client=None): 'openapi_types': { 'settlement_id': (str,), + 'accept': + (str,), 'limit': (int,), - 'after_cursor': - (str,), - 'before_cursor': - (str,), }, 'attribute_map': { 'settlement_id': 'settlement_id', + 'accept': 'Accept', 'limit': 'limit', - 'after_cursor': 'after_cursor', - 'before_cursor': 'before_cursor', }, 'location_map': { 'settlement_id': 'path', + 'accept': 'header', 'limit': 'query', - 'after_cursor': 'query', - 'before_cursor': 'query', }, 'collection_format_map': { } }, headers_map={ 'accept': [ - 'application/hal+json' + 'application/json' ], 'content_type': [], }, @@ -253,9 +262,8 @@ def __init__(self, api_client=None): params_map={ 'all': [ 'settlement_id', + 'accept', 'limit', - 'after_cursor', - 'before_cursor', ], 'required': [ 'settlement_id', @@ -275,31 +283,27 @@ def __init__(self, api_client=None): 'openapi_types': { 'settlement_id': (str,), + 'accept': + (str,), 'limit': (int,), - 'after_cursor': - (str,), - 'before_cursor': - (str,), }, 'attribute_map': { 'settlement_id': 'settlement_id', + 'accept': 'Accept', 'limit': 'limit', - 'after_cursor': 'after_cursor', - 'before_cursor': 'before_cursor', }, 'location_map': { 'settlement_id': 'path', + 'accept': 'header', 'limit': 'query', - 'after_cursor': 'query', - 'before_cursor': 'query', }, 'collection_format_map': { } }, headers_map={ 'accept': [ - 'application/hal+json' + 'application/json' ], 'content_type': [], }, @@ -320,17 +324,21 @@ def __init__(self, api_client=None): 'all': [ 'created_at_gte', 'created_at_lte', - 'updated_at_gte', - 'updated_at_lte', - 'id', - 'limit', - 'after_cursor', - 'before_cursor', + 'amount', + 'amount_gt', + 'amount_gte', + 'amount_lt', + 'amount_lte', + 'status', + 'transfer_id', + 'funding_transfer_id', + 'accept', ], 'required': [], 'nullable': [ ], 'enum': [ + 'status', ], 'validation': [ ] @@ -339,51 +347,69 @@ def __init__(self, api_client=None): 'validations': { }, 'allowed_values': { + ('status',): { + + "'PENDING'": 'PENDING', + "'AWAITING_APPROVAL'": 'AWAITING_APPROVAL', + "'APPROVED'": 'APPROVED' + }, }, 'openapi_types': { 'created_at_gte': (str,), 'created_at_lte': (str,), - 'updated_at_gte': - (str,), - 'updated_at_lte': + 'amount': + (int,), + 'amount_gt': + (int,), + 'amount_gte': + (int,), + 'amount_lt': + (int,), + 'amount_lte': + (int,), + 'status': (str,), - 'id': + 'transfer_id': (str,), - 'limit': - (int,), - 'after_cursor': + 'funding_transfer_id': (str,), - 'before_cursor': + 'accept': (str,), }, 'attribute_map': { 'created_at_gte': 'created_at.gte', 'created_at_lte': 'created_at.lte', - 'updated_at_gte': 'updated_at.gte', - 'updated_at_lte': 'updated_at.lte', - 'id': 'id', - 'limit': 'limit', - 'after_cursor': 'after_cursor', - 'before_cursor': 'before_cursor', + 'amount': 'amount', + 'amount_gt': 'amount.gt', + 'amount_gte': 'amount.gte', + 'amount_lt': 'amount.lt', + 'amount_lte': 'amount.lte', + 'status': 'status', + 'transfer_id': 'transfer_id', + 'funding_transfer_id': 'funding_transfer_id', + 'accept': 'Accept', }, 'location_map': { 'created_at_gte': 'query', 'created_at_lte': 'query', - 'updated_at_gte': 'query', - 'updated_at_lte': 'query', - 'id': 'query', - 'limit': 'query', - 'after_cursor': 'query', - 'before_cursor': 'query', + 'amount': 'query', + 'amount_gt': 'query', + 'amount_gte': 'query', + 'amount_lt': 'query', + 'amount_lte': 'query', + 'status': 'query', + 'transfer_id': 'query', + 'funding_transfer_id': 'query', + 'accept': 'header', }, 'collection_format_map': { } }, headers_map={ 'accept': [ - 'application/hal+json' + 'application/json' ], 'content_type': [], }, @@ -403,6 +429,7 @@ def __init__(self, api_client=None): params_map={ 'all': [ 'settlement_id', + 'accept', 'remove_settlement_transfer', ], 'required': [ @@ -423,14 +450,18 @@ def __init__(self, api_client=None): 'openapi_types': { 'settlement_id': (str,), + 'accept': + (str,), 'remove_settlement_transfer': (RemoveSettlementTransfer,), }, 'attribute_map': { 'settlement_id': 'settlement_id', + 'accept': 'Accept', }, 'location_map': { 'settlement_id': 'path', + 'accept': 'header', 'remove_settlement_transfer': 'body', }, 'collection_format_map': { @@ -438,34 +469,36 @@ def __init__(self, api_client=None): }, headers_map={ 'accept': [ - 'application/hal+json' + 'application/json' ], 'content_type': [ - 'application/hal+json' + 'application/json' ] }, api_client=api_client ) - def create( + def put( self, - identity_id, + settlement_id, **kwargs ): - """Close Current Active Settlement # noqa: E501 + """Close a Settlement # noqa: E501 - Close the currently accruing `settlement`. Finix, by default, creates accruing `settlements` then closes them based on your payout configurations. Use this endpoint to manually close the currently accruing settlement. The closed `Settlement` will not accrue any further transactions and gets immediately submitted for approval. - Any refunded `Transfers` get included in `Settlements` as a deduction. - **PENDING** `Transfers` don't get included in `Settlements`. - The `total_amount` minus the `total_fee` equals the `net_amount`. The `net_amount` is the amount in cents that gets deposited into the merchant's bank account. Related Guides: [Accruing Settlements](/guides/payouts/~accruing-settlements/#closing-an-accruing-settlement) # noqa: E501 + Close an accruing `settlement`. Finix, by default, creates accruing `settlements` then closes them based on your payout configurations. Use this endpoint to manually close a specific `settlement`. The closed `Settlement` will not accrue any further transactions and gets immediately submitted for approval. - This endpoint is only available to Finix Core customers. If you have any questions, please contact the [Finix Support Team](mailto:support@finixpayments.com). - Any refunded `Transfers` get included in `Settlements` as a deduction. - **PENDING** `Transfers` don't get included in `Settlements`. - The `total_amount` minus the `total_fee` equals the `net_amount`. The `net_amount` is the amount in cents that gets deposited into the seller's bank account. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.create(identity_id, async_req=True) + >>> thread = api.put(settlement_id, async_req=True) >>> result = thread.get() Args: - identity_id (str): ID of the `Identity` for the merchant you want to settle. + settlement_id (str): ID of `Settlement` object. Keyword Args: - create_settlement_request (CreateSettlementRequest): [optional] + accept (str): [optional] if omitted the server will use the default value of 'application/hal+json' + finix_version (str): Specify the API version of your request. For more details, see [Versioning.](/guides/developers/versioning/). [optional] if omitted the server will use the default value of '2018-01-01' + close_settlement (CloseSettlement): [optional] _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object @@ -522,9 +555,9 @@ def create( kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['identity_id'] = \ - identity_id - return self._create_endpoint.call_with_http_info(**kwargs) + kwargs['settlement_id'] = \ + settlement_id + return self._put_endpoint.call_with_http_info(**kwargs) def get( self, @@ -544,6 +577,7 @@ def get( settlement_id (str): ID of `Settlement` object. Keyword Args: + accept (str): [optional] if omitted the server will use the default value of 'application/hal+json' _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object @@ -622,9 +656,8 @@ def list_funding_transfers( settlement_id (str): ID of `Settlement` object. Keyword Args: + accept (str): Body Header. [optional] if omitted the server will use the default value of 'application/hal+json' limit (int): The numbers of items to return.. [optional] - after_cursor (str): Return every resource created after the cursor value.. [optional] - before_cursor (str): Return every resource created before the cursor value.. [optional] _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object @@ -692,7 +725,7 @@ def list_transfers_by_settlement_id( settlement_id, **kwargs ): - """List Settlement Transfers # noqa: E501 + """List all Transfers in a Settlement # noqa: E501 Retrieve a list of every `Transfer` in a `Settlement` that has `type` **DEBIT** or **REFUND**. # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -705,9 +738,8 @@ def list_transfers_by_settlement_id( settlement_id (str): ID of `Settlement` object. Keyword Args: + accept (str): [optional] if omitted the server will use the default value of 'application/hal+json' limit (int): The numbers of items to return.. [optional] - after_cursor (str): Return every resource created after the cursor value.. [optional] - before_cursor (str): Return every resource created before the cursor value.. [optional] _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object @@ -787,12 +819,15 @@ def list( Keyword Args: created_at_gte (str): Filter where `created_at` is after the given date.. [optional] created_at_lte (str): Filter where `created_at` is before the given date.. [optional] - updated_at_gte (str): Filter where `updated_at` is after the given date.. [optional] - updated_at_lte (str): Filter where `updated_at` is before the given date.. [optional] - id (str): Filter by `id`.. [optional] - limit (int): The numbers of items to return.. [optional] - after_cursor (str): Return every resource created after the cursor value.. [optional] - before_cursor (str): Return every resource created before the cursor value.. [optional] + amount (int): Filter by an amount equal to the given value.. [optional] + amount_gt (int): Filter by an amount greater than.. [optional] + amount_gte (int): Filter by an amount greater than or equal.. [optional] + amount_lt (int): Filter by an amount less than.. [optional] + amount_lte (int): Filter by an amount less than or equal.. [optional] + status (str): Filter by the status of the `Settlement`. Available values include: Merchants only receive payouts when `Settlements` are **APPROVED**. For more information, see [Payouts](/docs/guides/payouts/payouts/).. [optional] + transfer_id (str): Filter by a `transfer_id` a `Settlement` has accrued. Please note this filter is only available for non-versioned requests, or requests using `-H 'Finix-Version: 2018-01-01'`. We're actively working on making this filter available for later versions. For more details, see [Versioning](/guides/developers/versioning/).. [optional] + funding_transfer_id (str): Filter by a `funding_transfer` a `Settlement` has created.. [optional] + accept (str): Body Header. [optional] if omitted the server will use the default value of 'application/hal+json' _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object @@ -871,6 +906,7 @@ def remove_transfers_from_settlement( settlement_id (str): ID of `Settlement` object. Keyword Args: + accept (str): [optional] if omitted the server will use the default value of 'application/hal+json' remove_settlement_transfer (RemoveSettlementTransfer): [optional] _return_http_data_only (bool): response data without head status code and headers. Default is True. diff --git a/finix/api/split_transfers_api.py b/finix/api/split_transfers_api.py new file mode 100644 index 0000000..e1b9b5e --- /dev/null +++ b/finix/api/split_transfers_api.py @@ -0,0 +1,333 @@ +""" + Finix API + + The version of the OpenAPI document: 2022-02-01 + Contact: support@finixpayments.com +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +import finix.api_client +from finix.model_utils import ( # noqa: F401 + check_allowed_values, + check_validations, + date, + datetime, + file_type, + none_type, + validate_and_convert_types +) +from pydantic import StrictStr + +from typing import Optional + +from finix.models.split_transfer import SplitTransfer +from finix.models.transfers_list import TransfersList +from finix.model.finix_utils import FinixList + +from functools import wraps + +def operation_decorator(func): + @wraps(func) + def response_convert(*args, **kwargs): + ret = func(*args, **kwargs) + if hasattr(ret, 'embedded'): + tmp = ret.embedded + if isinstance(tmp, dict): + if len(tmp) == 1: + ret_0 = '' + ret_1 = '' + ret_2 = '' + for key in tmp: + ret_0 = tmp[key] + break + if hasattr(ret, 'page'): + ret_1 = ret.page + if hasattr(ret, 'links'): + ret_2 = ret.links + return (ret_0, ret_1, ret_2) + + else: + return ret + + return response_convert + +class SplitTransfersApi(object): + + def __init__(self, api_client=None): + if api_client is None: + api_client = finix.api_client.FinixClient() + self._api_client = api_client + self._get_split_transfer_endpoint = finix.api_client.Endpoint( + settings={ + 'response_type': (SplitTransfer,), + 'auth': [ + 'BasicAuth' + ], + 'endpoint_path': '/split_transfers/{split_transfer_id}', + 'operation_id': 'get_split_transfer', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'split_transfer_id', + 'accept', + ], + 'required': [ + 'split_transfer_id', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'split_transfer_id': + (str,), + 'accept': + (str,), + }, + 'attribute_map': { + 'split_transfer_id': 'split_transfer_id', + 'accept': 'Accept', + }, + 'location_map': { + 'split_transfer_id': 'path', + 'accept': 'header', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self._get_split_transfer_fees_endpoint = finix.api_client.Endpoint( + settings={ + 'response_type': (TransfersList,), + 'auth': [ + 'BasicAuth' + ], + 'endpoint_path': '/split_transfers/{split_transfer_id}/fees', + 'operation_id': 'get_split_transfer_fees', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'split_transfer_id', + 'accept', + ], + 'required': [ + 'split_transfer_id', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'split_transfer_id': + (str,), + 'accept': + (str,), + }, + 'attribute_map': { + 'split_transfer_id': 'split_transfer_id', + 'accept': 'Accept', + }, + 'location_map': { + 'split_transfer_id': 'path', + 'accept': 'header', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) + + def get_split_transfer( + self, + split_transfer_id, + **kwargs + ): + """Fetch a Split Transfer # noqa: E501 + + Fetch a `split_transfer` that was created from a split transaction. For more information, see [Split a Transaction](/docs/guides/payments/modify/split-transactions/). # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_split_transfer(split_transfer_id, async_req=True) + >>> result = thread.get() + + Args: + split_transfer_id (str): + + Keyword Args: + accept (str): [optional] if omitted the server will use the default value of 'application/hal+json' + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + SplitTransfer + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', False + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', False + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['split_transfer_id'] = \ + split_transfer_id + return self._get_split_transfer_endpoint.call_with_http_info(**kwargs) + + def get_split_transfer_fees( + self, + split_transfer_id, + **kwargs + ): + """Fetch Split Transfer Fees # noqa: E501 + + Fetch the fees associated with a `split_transfer`. For more information, see [Split a Transaction](/docs/guides/payments/modify/split-transactions/). # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_split_transfer_fees(split_transfer_id, async_req=True) + >>> result = thread.get() + + Args: + split_transfer_id (str): + + Keyword Args: + accept (str): [optional] if omitted the server will use the default value of 'application/hal+json' + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + TransfersList + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', False + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', False + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['split_transfer_id'] = \ + split_transfer_id + return self._get_split_transfer_fees_endpoint.call_with_http_info(**kwargs) + diff --git a/finix/api/transfers_api.py b/finix/api/transfers_api.py index 1214dcd..559f0ec 100644 --- a/finix/api/transfers_api.py +++ b/finix/api/transfers_api.py @@ -19,18 +19,16 @@ none_type, validate_and_convert_types ) -from finix.model.create_reversal_request import CreateReversalRequest -from finix.model.create_transfer_request import CreateTransferRequest -from finix.model.error401_unauthorized import Error401Unauthorized -from finix.model.error402_payment_required import Error402PaymentRequired -from finix.model.error403_forbidden_list import Error403ForbiddenList -from finix.model.error404_not_found_list import Error404NotFoundList -from finix.model.error406_not_acceptable import Error406NotAcceptable -from finix.model.error422_invalid_field_list import Error422InvalidFieldList -from finix.model.error_generic import ErrorGeneric -from finix.model.transfer import Transfer -from finix.model.transfers_list import TransfersList -from finix.model.update_transfer_request import UpdateTransferRequest +from typing_extensions import Annotated +from pydantic import Field, StrictInt, StrictStr + +from typing import Optional + +from finix.models.create_reversal_request import CreateReversalRequest +from finix.models.create_transfer_request import CreateTransferRequest +from finix.models.transfer import Transfer +from finix.models.transfers_list import TransfersList +from finix.models.update_transfer_request import UpdateTransferRequest from finix.model.finix_utils import FinixList from functools import wraps @@ -79,6 +77,8 @@ def __init__(self, api_client=None): }, params_map={ 'all': [ + 'accept', + 'finix_version', 'create_transfer_request', ], 'required': [], @@ -95,12 +95,20 @@ def __init__(self, api_client=None): 'allowed_values': { }, 'openapi_types': { + 'accept': + (str,), + 'finix_version': + (str,), 'create_transfer_request': (CreateTransferRequest,), }, 'attribute_map': { + 'accept': 'Accept', + 'finix_version': 'Finix-Version', }, 'location_map': { + 'accept': 'header', + 'finix_version': 'header', 'create_transfer_request': 'body', }, 'collection_format_map': { @@ -108,10 +116,10 @@ def __init__(self, api_client=None): }, headers_map={ 'accept': [ - 'application/hal+json' + 'application/json' ], 'content_type': [ - 'application/hal+json' + 'application/json' ] }, api_client=api_client @@ -130,6 +138,7 @@ def __init__(self, api_client=None): params_map={ 'all': [ 'transfer_id', + 'finix_version', 'create_reversal_request', ], 'required': [ @@ -150,14 +159,18 @@ def __init__(self, api_client=None): 'openapi_types': { 'transfer_id': (str,), + 'finix_version': + (str,), 'create_reversal_request': (CreateReversalRequest,), }, 'attribute_map': { 'transfer_id': 'transfer_id', + 'finix_version': 'Finix-Version', }, 'location_map': { 'transfer_id': 'path', + 'finix_version': 'header', 'create_reversal_request': 'body', }, 'collection_format_map': { @@ -165,10 +178,10 @@ def __init__(self, api_client=None): }, headers_map={ 'accept': [ - 'application/hal+json' + 'application/json' ], 'content_type': [ - 'application/hal+json' + 'application/json' ] }, api_client=api_client @@ -187,6 +200,7 @@ def __init__(self, api_client=None): params_map={ 'all': [ 'transfer_id', + 'accept', ], 'required': [ 'transfer_id', @@ -206,19 +220,23 @@ def __init__(self, api_client=None): 'openapi_types': { 'transfer_id': (str,), + 'accept': + (str,), }, 'attribute_map': { 'transfer_id': 'transfer_id', + 'accept': 'Accept', }, 'location_map': { 'transfer_id': 'path', + 'accept': 'header', }, 'collection_format_map': { } }, headers_map={ 'accept': [ - 'application/hal+json' + 'application/json' ], 'content_type': [], }, @@ -238,6 +256,7 @@ def __init__(self, api_client=None): params_map={ 'all': [ 'transfer_id', + 'accept', 'limit', 'after_cursor', 'before_cursor', @@ -260,6 +279,8 @@ def __init__(self, api_client=None): 'openapi_types': { 'transfer_id': (str,), + 'accept': + (str,), 'limit': (int,), 'after_cursor': @@ -269,12 +290,14 @@ def __init__(self, api_client=None): }, 'attribute_map': { 'transfer_id': 'transfer_id', + 'accept': 'Accept', 'limit': 'limit', 'after_cursor': 'after_cursor', 'before_cursor': 'before_cursor', }, 'location_map': { 'transfer_id': 'path', + 'accept': 'header', 'limit': 'query', 'after_cursor': 'query', 'before_cursor': 'query', @@ -284,7 +307,7 @@ def __init__(self, api_client=None): }, headers_map={ 'accept': [ - 'application/hal+json' + 'application/json' ], 'content_type': [], }, @@ -303,7 +326,7 @@ def __init__(self, api_client=None): }, params_map={ 'all': [ - 'sort', + 'accept', 'after_cursor', 'limit', 'amount', @@ -315,9 +338,9 @@ def __init__(self, api_client=None): 'created_at_lte', 'idempotency_id', 'id', - 'state', 'ready_to_settle_at_gte', 'ready_to_settle_at_lte', + 'state', 'statement_descriptor', 'trace_id', 'updated_at_gte', @@ -335,6 +358,8 @@ def __init__(self, api_client=None): 'merchant_processor_id', 'type', 'before_cursor', + 'tags_key', + 'tags_value', ], 'required': [], 'nullable': [ @@ -352,23 +377,23 @@ def __init__(self, api_client=None): 'allowed_values': { ('state',): { - "ALL": "ALL", - "SUCCEEDED": "SUCCEEDED", - "FAILED": "FAILED", - "PENDING": "PENDING", - "CANCELED": "CANCELED" + "'ALL'": 'ALL', + "'SUCCEEDED'": 'SUCCEEDED', + "'FAILED'": 'FAILED', + "'PENDING'": 'PENDING', + "'CANCELED'": 'CANCELED' }, ('type',): { - "ALL": "ALL", - "DEBITS": "DEBITS", - "CREDITS": "CREDITS", - "REVERSAL": "REVERSAL", - "SETTLEMENT": "SETTLEMENT" + "'ALL'": 'ALL', + "'DEBITS'": 'DEBITS', + "'CREDITS'": 'CREDITS', + "'REVERSAL'": 'REVERSAL', + "'SETTLEMENT'": 'SETTLEMENT' }, }, 'openapi_types': { - 'sort': + 'accept': (str,), 'after_cursor': (str,), @@ -392,12 +417,12 @@ def __init__(self, api_client=None): (str,), 'id': (str,), - 'state': - (str,), 'ready_to_settle_at_gte': (str,), 'ready_to_settle_at_lte': (str,), + 'state': + (str,), 'statement_descriptor': (int,), 'trace_id': @@ -432,9 +457,13 @@ def __init__(self, api_client=None): (str,), 'before_cursor': (str,), + 'tags_key': + (str,), + 'tags_value': + (str,), }, 'attribute_map': { - 'sort': 'sort', + 'accept': 'Accept', 'after_cursor': 'after_cursor', 'limit': 'limit', 'amount': 'amount', @@ -446,9 +475,9 @@ def __init__(self, api_client=None): 'created_at_lte': 'created_at.lte', 'idempotency_id': 'idempotency_id', 'id': 'id', - 'state': 'state', 'ready_to_settle_at_gte': 'ready_to_settle_at.gte', 'ready_to_settle_at_lte': 'ready_to_settle_at.lte', + 'state': 'state', 'statement_descriptor': 'statement_descriptor', 'trace_id': 'trace_id', 'updated_at_gte': 'updated_at.gte', @@ -466,9 +495,11 @@ def __init__(self, api_client=None): 'merchant_processor_id': 'merchant_processor_id', 'type': 'type', 'before_cursor': 'before_cursor', + 'tags_key': 'tags.key', + 'tags_value': 'tags.value', }, 'location_map': { - 'sort': 'query', + 'accept': 'header', 'after_cursor': 'query', 'limit': 'query', 'amount': 'query', @@ -480,9 +511,9 @@ def __init__(self, api_client=None): 'created_at_lte': 'query', 'idempotency_id': 'query', 'id': 'query', - 'state': 'query', 'ready_to_settle_at_gte': 'query', 'ready_to_settle_at_lte': 'query', + 'state': 'query', 'statement_descriptor': 'query', 'trace_id': 'query', 'updated_at_gte': 'query', @@ -500,13 +531,15 @@ def __init__(self, api_client=None): 'merchant_processor_id': 'query', 'type': 'query', 'before_cursor': 'query', + 'tags_key': 'query', + 'tags_value': 'query', }, 'collection_format_map': { } }, headers_map={ 'accept': [ - 'application/hal+json' + 'application/json' ], 'content_type': [], }, @@ -526,6 +559,7 @@ def __init__(self, api_client=None): params_map={ 'all': [ 'transfer_id', + 'accept', 'update_transfer_request', ], 'required': [ @@ -546,14 +580,18 @@ def __init__(self, api_client=None): 'openapi_types': { 'transfer_id': (str,), + 'accept': + (str,), 'update_transfer_request': (UpdateTransferRequest,), }, 'attribute_map': { 'transfer_id': 'transfer_id', + 'accept': 'Accept', }, 'location_map': { 'transfer_id': 'path', + 'accept': 'header', 'update_transfer_request': 'body', }, 'collection_format_map': { @@ -561,10 +599,10 @@ def __init__(self, api_client=None): }, headers_map={ 'accept': [ - 'application/hal+json' + 'application/json' ], 'content_type': [ - 'application/hal+json' + 'application/json' ] }, api_client=api_client @@ -576,7 +614,7 @@ def create( ): """Create a Transfer # noqa: E501 - Create a `Transfer`. > By default, Finix implements a 3 (business) day delay when debiting bank accounts (i.e. eChecks). # noqa: E501 + Create a `Transfer`. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -585,6 +623,8 @@ def create( Keyword Args: + accept (str): [optional] if omitted the server will use the default value of 'application/hal+json' + finix_version (str): Specify the API version of your request. For more details, see [Versioning.](/guides/developers/versioning/). [optional] if omitted the server will use the default value of '2018-01-01' create_transfer_request (CreateTransferRequest): [optional] _return_http_data_only (bool): response data without head status code and headers. Default is True. @@ -651,7 +691,7 @@ def create_transfer_reversal( ): """Refund or Reverse a Transfer # noqa: E501 - Reverse a transfer with a `type` of **DEBIT**. This reversal creates a new `Transfer` resource with a `type` of **REVERSAL**. The refund can get delivered in most cases without the physical card. The card only needs to be swiped (to receive the refund) when: - The payment type is **DEBIT**, and the transaction is no longer in the Settlement batch. - The payment type is **CREDIT**, and the transaction is no longer in the batch and is older than 45 days. # noqa: E501 + Reverse a transfer with a `type` of **DEBIT**. This reversal creates a new `Transfer` resource with a `type` of **REVERSAL**. Related Guides: [Refunding Payments](/guides/after-the-payment/refunding-and-cancelling-payments/) # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -662,6 +702,7 @@ def create_transfer_reversal( transfer_id (str): ID of `Transfer` object. Keyword Args: + finix_version (str): Specify the API version of your request. For more details, see [Versioning.](/guides/developers/versioning/). [optional] if omitted the server will use the default value of '2018-01-01' create_reversal_request (CreateReversalRequest): [optional] _return_http_data_only (bool): response data without head status code and headers. Default is True. @@ -741,6 +782,7 @@ def get( transfer_id (str): ID of `Transfer` resource. Keyword Args: + accept (str): [optional] if omitted the server will use the default value of 'application/hal+json' _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object @@ -819,6 +861,7 @@ def list_transfers_reversals( transfer_id (str): ID of `Transfer` object. Keyword Args: + accept (str): Body Header. [optional] if omitted the server will use the default value of 'application/hal+json' limit (int): The number of entries to return.. [optional] after_cursor (str): Return every resource created after the cursor value.. [optional] before_cursor (str): Return every resource created before the cursor value.. [optional] @@ -899,7 +942,7 @@ def list( Keyword Args: - sort (str): Specify key to be used for sorting the collection.. [optional] + accept (str): Body Header. [optional] if omitted the server will use the default value of 'application/hal+json' after_cursor (str): Return every resource created after the cursor value.. [optional] limit (int): The numbers of items to return.. [optional] amount (int): Filter by an amount equal to the given value.. [optional] @@ -911,9 +954,9 @@ def list( created_at_lte (str): Filter where `created_at` is before the given date.. [optional] idempotency_id (str): Filter by `idempotency_id`.. [optional] id (str): Filter by `id`.. [optional] + ready_to_settle_at_gte (str): Filter where `ready_to_settle_at` is after the given date. Only available on `Finix-Version: 2022-02-01`. For more details, see [Versioning](/guides/developers/versioning/).. [optional] + ready_to_settle_at_lte (str): Filter where `ready_to_settle_at` is before the given date. Only available on `Finix-Version: 2022-02-01`. For more details, see [Versioning](/guides/developers/versioning/).. [optional] state (str): Filter by Transaction state.. [optional] - ready_to_settle_at_gte (str): Filter by `ready_to_settle_at`.. [optional] - ready_to_settle_at_lte (str): Filter by `ready_to_settle_at`.. [optional] statement_descriptor (int): Filter by `statement_descriptor`.. [optional] trace_id (str): Filter by `trace_id`.. [optional] updated_at_gte (str): Filter where `updated_at` is after the given date.. [optional] @@ -931,6 +974,8 @@ def list( merchant_processor_id (str): Filter by `Processor` ID.. [optional] type (str): Filter by `Transfer` type. Available type filters include: All, Debits, Refunds, or Credits.. [optional] before_cursor (str): Return every resource created before the cursor value.. [optional] + tags_key (str): Filter by the [`key` of a `Tag`](/api/overview/#section/Tags).. [optional] + tags_value (str): Filter by the [value of a `Tag`](https://finix.com/docs/api/overview/#section/Tags).. [optional] _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object @@ -1009,6 +1054,7 @@ def update( transfer_id (str): ID of `Transfer` resource. Keyword Args: + accept (str): [optional] if omitted the server will use the default value of 'application/hal+json' update_transfer_request (UpdateTransferRequest): [optional] _return_http_data_only (bool): response data without head status code and headers. Default is True. diff --git a/finix/api/verifications_api.py b/finix/api/verifications_api.py index a563c9c..81a7218 100644 --- a/finix/api/verifications_api.py +++ b/finix/api/verifications_api.py @@ -19,15 +19,13 @@ none_type, validate_and_convert_types ) -from finix.model.create_verification_request import CreateVerificationRequest -from finix.model.error401_unauthorized import Error401Unauthorized -from finix.model.error403_forbidden_list import Error403ForbiddenList -from finix.model.error404_not_found_list import Error404NotFoundList -from finix.model.error406_not_acceptable import Error406NotAcceptable -from finix.model.error422_invalid_field_list import Error422InvalidFieldList -from finix.model.error_generic import ErrorGeneric -from finix.model.verification import Verification -from finix.model.verifications_list import VerificationsList +from typing_extensions import Annotated +from pydantic import Field, StrictInt, StrictStr + +from typing import Optional + +from finix.models.verification import Verification +from finix.models.verifications_list import VerificationsList from finix.model.finix_utils import FinixList from functools import wraps @@ -63,56 +61,6 @@ def __init__(self, api_client=None): if api_client is None: api_client = finix.api_client.FinixClient() self._api_client = api_client - self._create_endpoint = finix.api_client.Endpoint( - settings={ - 'response_type': (Verification,), - 'auth': [ - 'BasicAuth' - ], - 'endpoint_path': '/verifications', - 'operation_id': 'create', - 'http_method': 'POST', - 'servers': None, - }, - params_map={ - 'all': [ - 'create_verification_request', - ], - 'required': [], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'create_verification_request': - (CreateVerificationRequest,), - }, - 'attribute_map': { - }, - 'location_map': { - 'create_verification_request': 'body', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/hal+json' - ], - 'content_type': [ - 'application/hal+json' - ] - }, - api_client=api_client - ) self._get_endpoint = finix.api_client.Endpoint( settings={ 'response_type': (Verification,), @@ -127,6 +75,7 @@ def __init__(self, api_client=None): params_map={ 'all': [ 'verification_id', + 'accept', ], 'required': [ 'verification_id', @@ -146,19 +95,23 @@ def __init__(self, api_client=None): 'openapi_types': { 'verification_id': (str,), + 'accept': + (str,), }, 'attribute_map': { 'verification_id': 'verification_id', + 'accept': 'Accept', }, 'location_map': { 'verification_id': 'path', + 'accept': 'header', }, 'collection_format_map': { } }, headers_map={ 'accept': [ - 'application/hal+json' + 'application/json' ], 'content_type': [], }, @@ -178,6 +131,7 @@ def __init__(self, api_client=None): params_map={ 'all': [ 'merchant_id', + 'accept', 'limit', 'after_cursor', 'before_cursor', @@ -200,6 +154,8 @@ def __init__(self, api_client=None): 'openapi_types': { 'merchant_id': (str,), + 'accept': + (str,), 'limit': (int,), 'after_cursor': @@ -209,12 +165,14 @@ def __init__(self, api_client=None): }, 'attribute_map': { 'merchant_id': 'merchant_id', + 'accept': 'Accept', 'limit': 'limit', 'after_cursor': 'after_cursor', 'before_cursor': 'before_cursor', }, 'location_map': { 'merchant_id': 'path', + 'accept': 'header', 'limit': 'query', 'after_cursor': 'query', 'before_cursor': 'query', @@ -224,7 +182,7 @@ def __init__(self, api_client=None): }, headers_map={ 'accept': [ - 'application/hal+json' + 'application/json' ], 'content_type': [], }, @@ -236,21 +194,22 @@ def __init__(self, api_client=None): 'auth': [ 'BasicAuth' ], - 'endpoint_path': '/payment_instruments/{payment_instrument_id}/verifications', + 'endpoint_path': '/payment_instruments/{payment_instrument_id_verify}', 'operation_id': 'list_by_payment_instrument_id', 'http_method': 'GET', 'servers': None, }, params_map={ 'all': [ - 'payment_instrument_id', + 'payment_instrument_id_verify', + 'accept', 'limit', 'offset', 'page_number', 'page_size', ], 'required': [ - 'payment_instrument_id', + 'payment_instrument_id_verify', ], 'nullable': [ ], @@ -265,7 +224,9 @@ def __init__(self, api_client=None): 'allowed_values': { }, 'openapi_types': { - 'payment_instrument_id': + 'payment_instrument_id_verify': + (str,), + 'accept': (str,), 'limit': (int,), @@ -277,14 +238,16 @@ def __init__(self, api_client=None): (int,), }, 'attribute_map': { - 'payment_instrument_id': 'payment_instrument_id', + 'payment_instrument_id_verify': 'payment_instrument_id_verify', + 'accept': 'Accept', 'limit': 'limit', 'offset': 'offset', 'page_number': 'pageNumber', 'page_size': 'pageSize', }, 'location_map': { - 'payment_instrument_id': 'path', + 'payment_instrument_id_verify': 'path', + 'accept': 'header', 'limit': 'query', 'offset': 'query', 'page_number': 'query', @@ -295,7 +258,7 @@ def __init__(self, api_client=None): }, headers_map={ 'accept': [ - 'application/hal+json' + 'application/json' ], 'content_type': [], }, @@ -314,6 +277,7 @@ def __init__(self, api_client=None): }, params_map={ 'all': [ + 'accept', 'limit', 'after_cursor', 'before_cursor', @@ -332,6 +296,8 @@ def __init__(self, api_client=None): 'allowed_values': { }, 'openapi_types': { + 'accept': + (str,), 'limit': (int,), 'after_cursor': @@ -340,11 +306,13 @@ def __init__(self, api_client=None): (str,), }, 'attribute_map': { + 'accept': 'Accept', 'limit': 'limit', 'after_cursor': 'after_cursor', 'before_cursor': 'before_cursor', }, 'location_map': { + 'accept': 'header', 'limit': 'query', 'after_cursor': 'query', 'before_cursor': 'query', @@ -354,87 +322,13 @@ def __init__(self, api_client=None): }, headers_map={ 'accept': [ - 'application/hal+json' + 'application/json' ], 'content_type': [], }, api_client=api_client ) - def create( - self, - **kwargs - ): - """Create a Merchant Verification # noqa: E501 - - Create a `Verification` to verify a merchant's `Identity`. Verifications can also be created directly on the resources you want to verify: - `POST /merchants/{merchant_id}/verifications` Verify `Payment Instruments` directly on the resource: - `POST /payment_instruments/{payment_instrument_id}/verifications` # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.create(async_req=True) - >>> result = thread.get() - - - Keyword Args: - create_verification_request (CreateVerificationRequest): [optional] - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - async_req (bool): execute request asynchronously - - Returns: - Verification - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', False - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', False - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - return self._create_endpoint.call_with_http_info(**kwargs) - def get( self, verification_id, @@ -453,6 +347,7 @@ def get( verification_id (str): ID of `Verification` object. Keyword Args: + accept (str): [optional] if omitted the server will use the default value of 'application/hal+json' _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object @@ -531,6 +426,7 @@ def list_by_merchant_id( merchant_id (str): ID of `Merchant` object. Keyword Args: + accept (str): [optional] if omitted the server will use the default value of 'application/hal+json' limit (int): The number of entries to return.. [optional] after_cursor (str): Return every resource created after the cursor value.. [optional] before_cursor (str): Return every resource created before the cursor value.. [optional] @@ -598,7 +494,7 @@ def list_by_merchant_id( def list_by_payment_instrument_id( self, - payment_instrument_id, + payment_instrument_id_verify, **kwargs ): """List Payment Instrument Verifications # noqa: E501 @@ -607,13 +503,14 @@ def list_by_payment_instrument_id( This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_by_payment_instrument_id(payment_instrument_id, async_req=True) + >>> thread = api.list_by_payment_instrument_id(payment_instrument_id_verify, async_req=True) >>> result = thread.get() Args: - payment_instrument_id (str): ID of `Payment Instrument `object. + payment_instrument_id_verify (str): Keyword Args: + accept (str): [optional] if omitted the server will use the default value of 'application/hal+json' limit (int): The number of entries to return.. [optional] offset (int): The number of items to skip before starting to collect the result set.. [optional] page_number (int): The page number to list.. [optional] @@ -674,8 +571,8 @@ def list_by_payment_instrument_id( kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['payment_instrument_id'] = \ - payment_instrument_id + kwargs['payment_instrument_id_verify'] = \ + payment_instrument_id_verify ret = self._list_by_payment_instrument_id_endpoint.call_with_http_info(**kwargs) fl = FinixList(ret, self.list_by_payment_instrument_id, **kwargs) return fl @@ -695,6 +592,7 @@ def list( Keyword Args: + accept (str): Body Header. [optional] if omitted the server will use the default value of 'application/hal+json' limit (int): The numbers of items to return.. [optional] after_cursor (str): Return every resource created after the cursor value.. [optional] before_cursor (str): Return every resource created before the cursor value.. [optional] diff --git a/finix/api/webhooks_api.py b/finix/api/webhooks_api.py index 3c51743..82caba0 100644 --- a/finix/api/webhooks_api.py +++ b/finix/api/webhooks_api.py @@ -19,16 +19,15 @@ none_type, validate_and_convert_types ) -from finix.model.create_webhook_request import CreateWebhookRequest -from finix.model.error401_unauthorized import Error401Unauthorized -from finix.model.error403_forbidden_list import Error403ForbiddenList -from finix.model.error404_not_found_list import Error404NotFoundList -from finix.model.error406_not_acceptable import Error406NotAcceptable -from finix.model.error422_invalid_field_list import Error422InvalidFieldList -from finix.model.error_generic import ErrorGeneric -from finix.model.update_webhook_request import UpdateWebhookRequest -from finix.model.webhook import Webhook -from finix.model.webhooks_list import WebhooksList +from typing_extensions import Annotated +from pydantic import Field, StrictInt, StrictStr + +from typing import Optional + +from finix.models.create_webhook_request import CreateWebhookRequest +from finix.models.update_webhook_request import UpdateWebhookRequest +from finix.models.webhook import Webhook +from finix.models.webhooks_list import WebhooksList from finix.model.finix_utils import FinixList from functools import wraps @@ -77,6 +76,8 @@ def __init__(self, api_client=None): }, params_map={ 'all': [ + 'accept', + 'finix_version', 'create_webhook_request', ], 'required': [], @@ -93,12 +94,20 @@ def __init__(self, api_client=None): 'allowed_values': { }, 'openapi_types': { + 'accept': + (str,), + 'finix_version': + (str,), 'create_webhook_request': (CreateWebhookRequest,), }, 'attribute_map': { + 'accept': 'Accept', + 'finix_version': 'Finix-Version', }, 'location_map': { + 'accept': 'header', + 'finix_version': 'header', 'create_webhook_request': 'body', }, 'collection_format_map': { @@ -106,10 +115,10 @@ def __init__(self, api_client=None): }, headers_map={ 'accept': [ - 'application/hal+json' + 'application/json' ], 'content_type': [ - 'application/hal+json' + 'application/json' ] }, api_client=api_client @@ -128,6 +137,7 @@ def __init__(self, api_client=None): params_map={ 'all': [ 'webhook_id', + 'accept', ], 'required': [ 'webhook_id', @@ -147,19 +157,23 @@ def __init__(self, api_client=None): 'openapi_types': { 'webhook_id': (str,), + 'accept': + (str,), }, 'attribute_map': { 'webhook_id': 'webhook_id', + 'accept': 'Accept', }, 'location_map': { 'webhook_id': 'path', + 'accept': 'header', }, 'collection_format_map': { } }, headers_map={ 'accept': [ - 'application/hal+json' + 'application/json' ], 'content_type': [], }, @@ -218,7 +232,7 @@ def __init__(self, api_client=None): }, headers_map={ 'accept': [ - 'application/hal+json' + 'application/json' ], 'content_type': [], }, @@ -238,6 +252,8 @@ def __init__(self, api_client=None): params_map={ 'all': [ 'webhook_id', + 'accept', + 'finix_version', 'update_webhook_request', ], 'required': [ @@ -258,14 +274,22 @@ def __init__(self, api_client=None): 'openapi_types': { 'webhook_id': (str,), + 'accept': + (str,), + 'finix_version': + (str,), 'update_webhook_request': (UpdateWebhookRequest,), }, 'attribute_map': { 'webhook_id': 'webhook_id', + 'accept': 'Accept', + 'finix_version': 'Finix-Version', }, 'location_map': { 'webhook_id': 'path', + 'accept': 'header', + 'finix_version': 'header', 'update_webhook_request': 'body', }, 'collection_format_map': { @@ -273,10 +297,10 @@ def __init__(self, api_client=None): }, headers_map={ 'accept': [ - 'application/hal+json' + 'application/json' ], 'content_type': [ - 'application/hal+json' + 'application/json' ] }, api_client=api_client @@ -297,6 +321,8 @@ def create( Keyword Args: + accept (str): [optional] if omitted the server will use the default value of 'application/hal+json' + finix_version (str): Specify the API version of your request. For more details, see [Versioning.](/guides/developers/versioning/). [optional] if omitted the server will use the default value of '2018-01-01' create_webhook_request (CreateWebhookRequest): [optional] _return_http_data_only (bool): response data without head status code and headers. Default is True. @@ -374,6 +400,7 @@ def get( webhook_id (str): ID of `Webhook` object. Keyword Args: + accept (str): [optional] if omitted the server will use the default value of 'application/hal+json' _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object @@ -519,7 +546,7 @@ def update( ): """Update a Webhook # noqa: E501 - Update an existing `Webhook`. # noqa: E501 + Update an existing `Webhook`to: - Disable or enable an endpoint URL to recieve webhook events. - Add [authentication to a `Webhook`](/guides/developers/webhooks/#authenticating-webhooks). - Filter the [webhook events sent to an endpoint URL](/guides/developers/webhooks/#webhook-event-filtering). # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -530,6 +557,8 @@ def update( webhook_id (str): ID of `Webhook` object. Keyword Args: + accept (str): [optional] if omitted the server will use the default value of 'application/hal+json' + finix_version (str): Specify the API version of your request. For more details, see [Versioning.](/guides/developers/versioning/). [optional] if omitted the server will use the default value of '2018-01-01' update_webhook_request (UpdateWebhookRequest): [optional] _return_http_data_only (bool): response data without head status code and headers. Default is True. diff --git a/finix/api_client.py b/finix/api_client.py index 7b63697..9679c3a 100644 --- a/finix/api_client.py +++ b/finix/api_client.py @@ -31,10 +31,13 @@ import finix.api.merchants_api import finix.api.onboarding_forms_api import finix.api.payment_instruments_api +import finix.api.payout_profiles_api import finix.api.settlements_api +import finix.api.split_transfers_api import finix.api.transfers_api import finix.api.verifications_api import finix.api.webhooks_api +import finix.api.default_api from finix import rest from finix.configuration import Configuration @@ -104,10 +107,13 @@ def __init__(self, configuration=None, header_name=None, header_value=None, self.merchants = finix.api.merchants_api.MerchantsApi(self) self.onboarding_forms = finix.api.onboarding_forms_api.OnboardingFormsApi(self) self.payment_instruments = finix.api.payment_instruments_api.PaymentInstrumentsApi(self) + self.payout_profiles = finix.api.payout_profiles_api.PayoutProfilesApi(self) self.settlements = finix.api.settlements_api.SettlementsApi(self) + self.split_transfers = finix.api.split_transfers_api.SplitTransfersApi(self) self.transfers = finix.api.transfers_api.TransfersApi(self) self.verifications = finix.api.verifications_api.VerificationsApi(self) self.webhooks = finix.api.webhooks_api.WebhooksApi(self) + self.default = finix.api.default_api.DefaultApi(self) def __enter__(self): return self diff --git a/finix/api_response.py b/finix/api_response.py new file mode 100644 index 0000000..a0b62b9 --- /dev/null +++ b/finix/api_response.py @@ -0,0 +1,25 @@ +"""API response object.""" + +from __future__ import annotations +from typing import Any, Dict, Optional +from pydantic import Field, StrictInt, StrictStr + +class ApiResponse: + """ + API response object + """ + + status_code: Optional[StrictInt] = Field(None, description="HTTP status code") + headers: Optional[Dict[StrictStr, StrictStr]] = Field(None, description="HTTP headers") + data: Optional[Any] = Field(None, description="Deserialized data given the data type") + raw_data: Optional[Any] = Field(None, description="Raw data (HTTP response body)") + + def __init__(self, + status_code=None, + headers=None, + data=None, + raw_data=None) -> None: + self.status_code = status_code + self.headers = headers + self.data = data + self.raw_data = raw_data diff --git a/finix/model/__init__.py b/finix/model/__init__.py deleted file mode 100644 index cfe32b7..0000000 --- a/finix/model/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# we can not import model classes here because that would create a circular -# reference which would not work in python2 -# do not import all models into this module because that uses a lot of memory and stack frames -# if you need the ability to import all models from one package, import them with -# from {{packageName}.models import ModelA, ModelB diff --git a/finix/model/country.py b/finix/model/country.py deleted file mode 100644 index 999b8db..0000000 --- a/finix/model/country.py +++ /dev/null @@ -1,525 +0,0 @@ -""" - Finix API - - The version of the OpenAPI document: 2022-02-01 - Contact: support@finixpayments.com -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from finix.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from finix.exceptions import ApiAttributeError - - - -class Country(ModelSimple): - """ - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - ('value',): { - 'None': None, - 'ABW': "ABW", - 'AFG': "AFG", - 'AGO': "AGO", - 'AIA': "AIA", - 'ALA': "ALA", - 'ALB': "ALB", - 'AND': "AND", - 'ARE': "ARE", - 'ARG': "ARG", - 'ARM': "ARM", - 'ASM': "ASM", - 'ATA': "ATA", - 'ATF': "ATF", - 'ATG': "ATG", - 'AUS': "AUS", - 'AUT': "AUT", - 'AZE': "AZE", - 'BDI': "BDI", - 'BEL': "BEL", - 'BEN': "BEN", - 'BES': "BES", - 'BFA': "BFA", - 'BGD': "BGD", - 'BGR': "BGR", - 'BHR': "BHR", - 'BHS': "BHS", - 'BIH': "BIH", - 'BLM': "BLM", - 'BLR': "BLR", - 'BLZ': "BLZ", - 'BMU': "BMU", - 'BOL': "BOL", - 'BRA': "BRA", - 'BRB': "BRB", - 'BRN': "BRN", - 'BTN': "BTN", - 'BVT': "BVT", - 'BWA': "BWA", - 'CAF': "CAF", - 'CAN': "CAN", - 'CCK': "CCK", - 'CHE': "CHE", - 'CHL': "CHL", - 'CHN': "CHN", - 'CIV': "CIV", - 'CMR': "CMR", - 'COD': "COD", - 'COG': "COG", - 'COK': "COK", - 'COL': "COL", - 'COM': "COM", - 'CPV': "CPV", - 'CRI': "CRI", - 'CUB': "CUB", - 'CUW': "CUW", - 'CXR': "CXR", - 'CYM': "CYM", - 'CYP': "CYP", - 'CZE': "CZE", - 'DEU': "DEU", - 'DJI': "DJI", - 'DMA': "DMA", - 'DNK': "DNK", - 'DOM': "DOM", - 'DZA': "DZA", - 'ECU': "ECU", - 'EGY': "EGY", - 'ERI': "ERI", - 'ESH': "ESH", - 'ESP': "ESP", - 'EST': "EST", - 'ETH': "ETH", - 'FIN': "FIN", - 'FJI': "FJI", - 'FLK': "FLK", - 'FRA': "FRA", - 'FRO': "FRO", - 'FSM': "FSM", - 'GAB': "GAB", - 'GBR': "GBR", - 'GEO': "GEO", - 'GGY': "GGY", - 'GHA': "GHA", - 'GIB': "GIB", - 'GIN': "GIN", - 'GLP': "GLP", - 'GMB': "GMB", - 'GNB': "GNB", - 'GNQ': "GNQ", - 'GRC': "GRC", - 'GRD': "GRD", - 'GRL': "GRL", - 'GTM': "GTM", - 'GUF': "GUF", - 'GUM': "GUM", - 'GUY': "GUY", - 'HKG': "HKG", - 'HMD': "HMD", - 'HND': "HND", - 'HRV': "HRV", - 'HTI': "HTI", - 'HUN': "HUN", - 'IDN': "IDN", - 'IMN': "IMN", - 'IND': "IND", - 'IOT': "IOT", - 'IRL': "IRL", - 'IRN': "IRN", - 'IRQ': "IRQ", - 'ISL': "ISL", - 'ISR': "ISR", - 'ITA': "ITA", - 'JAM': "JAM", - 'JEY': "JEY", - 'JOR': "JOR", - 'JPN': "JPN", - 'KAZ': "KAZ", - 'KEN': "KEN", - 'KGZ': "KGZ", - 'KHM': "KHM", - 'KIR': "KIR", - 'KNA': "KNA", - 'KOR': "KOR", - 'KWT': "KWT", - 'LAO': "LAO", - 'LBN': "LBN", - 'LBR': "LBR", - 'LBY': "LBY", - 'LCA': "LCA", - 'LIE': "LIE", - 'LKA': "LKA", - 'LSO': "LSO", - 'LTU': "LTU", - 'LUX': "LUX", - 'LVA': "LVA", - 'MAC': "MAC", - 'MAF': "MAF", - 'MAR': "MAR", - 'MCO': "MCO", - 'MDA': "MDA", - 'MDG': "MDG", - 'MDV': "MDV", - 'MEX': "MEX", - 'MHL': "MHL", - 'MKD': "MKD", - 'MLI': "MLI", - 'MLT': "MLT", - 'MMR': "MMR", - 'MNE': "MNE", - 'MNG': "MNG", - 'MNP': "MNP", - 'MRT': "MRT", - 'MSR': "MSR", - 'MTQ': "MTQ", - 'MUS': "MUS", - 'MWI': "MWI", - 'MYS': "MYS", - 'MYT': "MYT", - 'NAM': "NAM", - 'NCL': "NCL", - 'NER': "NER", - 'NFK': "NFK", - 'NGA': "NGA", - 'NIC': "NIC", - 'NIU': "NIU", - 'NLD': "NLD", - 'NOR': "NOR", - 'NPL': "NPL", - 'NRU': "NRU", - 'NZL': "NZL", - 'OMN': "OMN", - 'PAK': "PAK", - 'PAN': "PAN", - 'PCN': "PCN", - 'PER': "PER", - 'PHL': "PHL", - 'PLW': "PLW", - 'PNG': "PNG", - 'POL': "POL", - 'PRI': "PRI", - 'PRK': "PRK", - 'PRT': "PRT", - 'PRY': "PRY", - 'PSE': "PSE", - 'PYF': "PYF", - 'QAT': "QAT", - 'REU': "REU", - 'ROU': "ROU", - 'RUS': "RUS", - 'RWA': "RWA", - 'SAU': "SAU", - 'SDN': "SDN", - 'SEN': "SEN", - 'SGP': "SGP", - 'SGS': "SGS", - 'SHN': "SHN", - 'SJM': "SJM", - 'SLB': "SLB", - 'SLE': "SLE", - 'SLV': "SLV", - 'SMR': "SMR", - 'SOM': "SOM", - 'SPM': "SPM", - 'SRB': "SRB", - 'SSD': "SSD", - 'STP': "STP", - 'SUR': "SUR", - 'SVK': "SVK", - 'SVN': "SVN", - 'SWE': "SWE", - 'SWZ': "SWZ", - 'SXM': "SXM", - 'SYC': "SYC", - 'SYR': "SYR", - 'TCA': "TCA", - 'TCD': "TCD", - 'TGO': "TGO", - 'THA': "THA", - 'TJK': "TJK", - 'TKL': "TKL", - 'TKM': "TKM", - 'TLS': "TLS", - 'TON': "TON", - 'TTO': "TTO", - 'TUN': "TUN", - 'TUR': "TUR", - 'TUV': "TUV", - 'TWN': "TWN", - 'TZA': "TZA", - 'UGA': "UGA", - 'UKR': "UKR", - 'UMI': "UMI", - 'URY': "URY", - 'USA': "USA", - 'UZB': "UZB", - 'VAT': "VAT", - 'VCT': "VCT", - 'VEN': "VEN", - 'VGB': "VGB", - 'VIR': "VIR", - 'VNM': "VNM", - 'VUT': "VUT", - 'WLF': "WLF", - 'WSM': "WSM", - 'XKX': "XKX", - 'YEM': "YEM", - 'ZAF': "ZAF", - 'ZMB': "ZMB", - 'ZWE': "ZWE", - }, - } - - validations = { - } - - additional_properties_type = None - - _nullable = True - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'value': (str,), - } - - @cached_property - def discriminator(): - return None - - - attribute_map = {} - - read_only_vars = set() - - _composed_schemas = None - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): - """Country - a model defined in OpenAPI - - Note that value can be passed either in args or in kwargs, but not in both. - - Args: - args[0] (str): The sender’s country.., must be one of ["ABW", "AFG", "AGO", "AIA", "ALA", "ALB", "AND", "ARE", "ARG", "ARM", "ASM", "ATA", "ATF", "ATG", "AUS", "AUT", "AZE", "BDI", "BEL", "BEN", "BES", "BFA", "BGD", "BGR", "BHR", "BHS", "BIH", "BLM", "BLR", "BLZ", "BMU", "BOL", "BRA", "BRB", "BRN", "BTN", "BVT", "BWA", "CAF", "CAN", "CCK", "CHE", "CHL", "CHN", "CIV", "CMR", "COD", "COG", "COK", "COL", "COM", "CPV", "CRI", "CUB", "CUW", "CXR", "CYM", "CYP", "CZE", "DEU", "DJI", "DMA", "DNK", "DOM", "DZA", "ECU", "EGY", "ERI", "ESH", "ESP", "EST", "ETH", "FIN", "FJI", "FLK", "FRA", "FRO", "FSM", "GAB", "GBR", "GEO", "GGY", "GHA", "GIB", "GIN", "GLP", "GMB", "GNB", "GNQ", "GRC", "GRD", "GRL", "GTM", "GUF", "GUM", "GUY", "HKG", "HMD", "HND", "HRV", "HTI", "HUN", "IDN", "IMN", "IND", "IOT", "IRL", "IRN", "IRQ", "ISL", "ISR", "ITA", "JAM", "JEY", "JOR", "JPN", "KAZ", "KEN", "KGZ", "KHM", "KIR", "KNA", "KOR", "KWT", "LAO", "LBN", "LBR", "LBY", "LCA", "LIE", "LKA", "LSO", "LTU", "LUX", "LVA", "MAC", "MAF", "MAR", "MCO", "MDA", "MDG", "MDV", "MEX", "MHL", "MKD", "MLI", "MLT", "MMR", "MNE", "MNG", "MNP", "MRT", "MSR", "MTQ", "MUS", "MWI", "MYS", "MYT", "NAM", "NCL", "NER", "NFK", "NGA", "NIC", "NIU", "NLD", "NOR", "NPL", "NRU", "NZL", "OMN", "PAK", "PAN", "PCN", "PER", "PHL", "PLW", "PNG", "POL", "PRI", "PRK", "PRT", "PRY", "PSE", "PYF", "QAT", "REU", "ROU", "RUS", "RWA", "SAU", "SDN", "SEN", "SGP", "SGS", "SHN", "SJM", "SLB", "SLE", "SLV", "SMR", "SOM", "SPM", "SRB", "SSD", "STP", "SUR", "SVK", "SVN", "SWE", "SWZ", "SXM", "SYC", "SYR", "TCA", "TCD", "TGO", "THA", "TJK", "TKL", "TKM", "TLS", "TON", "TTO", "TUN", "TUR", "TUV", "TWN", "TZA", "UGA", "UKR", "UMI", "URY", "USA", "UZB", "VAT", "VCT", "VEN", "VGB", "VIR", "VNM", "VUT", "WLF", "WSM", "XKX", "YEM", "ZAF", "ZMB", "ZWE", ] # noqa: E501 - - Keyword Args: - value (str): The sender’s country.., must be one of ["ABW", "AFG", "AGO", "AIA", "ALA", "ALB", "AND", "ARE", "ARG", "ARM", "ASM", "ATA", "ATF", "ATG", "AUS", "AUT", "AZE", "BDI", "BEL", "BEN", "BES", "BFA", "BGD", "BGR", "BHR", "BHS", "BIH", "BLM", "BLR", "BLZ", "BMU", "BOL", "BRA", "BRB", "BRN", "BTN", "BVT", "BWA", "CAF", "CAN", "CCK", "CHE", "CHL", "CHN", "CIV", "CMR", "COD", "COG", "COK", "COL", "COM", "CPV", "CRI", "CUB", "CUW", "CXR", "CYM", "CYP", "CZE", "DEU", "DJI", "DMA", "DNK", "DOM", "DZA", "ECU", "EGY", "ERI", "ESH", "ESP", "EST", "ETH", "FIN", "FJI", "FLK", "FRA", "FRO", "FSM", "GAB", "GBR", "GEO", "GGY", "GHA", "GIB", "GIN", "GLP", "GMB", "GNB", "GNQ", "GRC", "GRD", "GRL", "GTM", "GUF", "GUM", "GUY", "HKG", "HMD", "HND", "HRV", "HTI", "HUN", "IDN", "IMN", "IND", "IOT", "IRL", "IRN", "IRQ", "ISL", "ISR", "ITA", "JAM", "JEY", "JOR", "JPN", "KAZ", "KEN", "KGZ", "KHM", "KIR", "KNA", "KOR", "KWT", "LAO", "LBN", "LBR", "LBY", "LCA", "LIE", "LKA", "LSO", "LTU", "LUX", "LVA", "MAC", "MAF", "MAR", "MCO", "MDA", "MDG", "MDV", "MEX", "MHL", "MKD", "MLI", "MLT", "MMR", "MNE", "MNG", "MNP", "MRT", "MSR", "MTQ", "MUS", "MWI", "MYS", "MYT", "NAM", "NCL", "NER", "NFK", "NGA", "NIC", "NIU", "NLD", "NOR", "NPL", "NRU", "NZL", "OMN", "PAK", "PAN", "PCN", "PER", "PHL", "PLW", "PNG", "POL", "PRI", "PRK", "PRT", "PRY", "PSE", "PYF", "QAT", "REU", "ROU", "RUS", "RWA", "SAU", "SDN", "SEN", "SGP", "SGS", "SHN", "SJM", "SLB", "SLE", "SLV", "SMR", "SOM", "SPM", "SRB", "SSD", "STP", "SUR", "SVK", "SVN", "SWE", "SWZ", "SXM", "SYC", "SYR", "TCA", "TCD", "TGO", "THA", "TJK", "TKL", "TKM", "TLS", "TON", "TTO", "TUN", "TUR", "TUV", "TWN", "TZA", "UGA", "UKR", "UMI", "URY", "USA", "UZB", "VAT", "VCT", "VEN", "VGB", "VIR", "VNM", "VUT", "WLF", "WSM", "XKX", "YEM", "ZAF", "ZMB", "ZWE", ] # noqa: E501 - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - # required up here when default value is not given - _path_to_item = kwargs.pop('_path_to_item', ()) - - if 'value' in kwargs: - value = kwargs.pop('value') - elif args: - args = list(args) - value = args.pop(0) - else: - raise ApiTypeError( - "value is required, but not passed in args or kwargs and doesn't have default", - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - self.value = value - if kwargs: - raise ApiTypeError( - "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( - kwargs, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): - """Country - a model defined in OpenAPI - - Note that value can be passed either in args or in kwargs, but not in both. - - Args: - args[0] (str): The sender’s country.., must be one of ["ABW", "AFG", "AGO", "AIA", "ALA", "ALB", "AND", "ARE", "ARG", "ARM", "ASM", "ATA", "ATF", "ATG", "AUS", "AUT", "AZE", "BDI", "BEL", "BEN", "BES", "BFA", "BGD", "BGR", "BHR", "BHS", "BIH", "BLM", "BLR", "BLZ", "BMU", "BOL", "BRA", "BRB", "BRN", "BTN", "BVT", "BWA", "CAF", "CAN", "CCK", "CHE", "CHL", "CHN", "CIV", "CMR", "COD", "COG", "COK", "COL", "COM", "CPV", "CRI", "CUB", "CUW", "CXR", "CYM", "CYP", "CZE", "DEU", "DJI", "DMA", "DNK", "DOM", "DZA", "ECU", "EGY", "ERI", "ESH", "ESP", "EST", "ETH", "FIN", "FJI", "FLK", "FRA", "FRO", "FSM", "GAB", "GBR", "GEO", "GGY", "GHA", "GIB", "GIN", "GLP", "GMB", "GNB", "GNQ", "GRC", "GRD", "GRL", "GTM", "GUF", "GUM", "GUY", "HKG", "HMD", "HND", "HRV", "HTI", "HUN", "IDN", "IMN", "IND", "IOT", "IRL", "IRN", "IRQ", "ISL", "ISR", "ITA", "JAM", "JEY", "JOR", "JPN", "KAZ", "KEN", "KGZ", "KHM", "KIR", "KNA", "KOR", "KWT", "LAO", "LBN", "LBR", "LBY", "LCA", "LIE", "LKA", "LSO", "LTU", "LUX", "LVA", "MAC", "MAF", "MAR", "MCO", "MDA", "MDG", "MDV", "MEX", "MHL", "MKD", "MLI", "MLT", "MMR", "MNE", "MNG", "MNP", "MRT", "MSR", "MTQ", "MUS", "MWI", "MYS", "MYT", "NAM", "NCL", "NER", "NFK", "NGA", "NIC", "NIU", "NLD", "NOR", "NPL", "NRU", "NZL", "OMN", "PAK", "PAN", "PCN", "PER", "PHL", "PLW", "PNG", "POL", "PRI", "PRK", "PRT", "PRY", "PSE", "PYF", "QAT", "REU", "ROU", "RUS", "RWA", "SAU", "SDN", "SEN", "SGP", "SGS", "SHN", "SJM", "SLB", "SLE", "SLV", "SMR", "SOM", "SPM", "SRB", "SSD", "STP", "SUR", "SVK", "SVN", "SWE", "SWZ", "SXM", "SYC", "SYR", "TCA", "TCD", "TGO", "THA", "TJK", "TKL", "TKM", "TLS", "TON", "TTO", "TUN", "TUR", "TUV", "TWN", "TZA", "UGA", "UKR", "UMI", "URY", "USA", "UZB", "VAT", "VCT", "VEN", "VGB", "VIR", "VNM", "VUT", "WLF", "WSM", "XKX", "YEM", "ZAF", "ZMB", "ZWE", ] # noqa: E501 - - Keyword Args: - value (str): The sender’s country.., must be one of ["ABW", "AFG", "AGO", "AIA", "ALA", "ALB", "AND", "ARE", "ARG", "ARM", "ASM", "ATA", "ATF", "ATG", "AUS", "AUT", "AZE", "BDI", "BEL", "BEN", "BES", "BFA", "BGD", "BGR", "BHR", "BHS", "BIH", "BLM", "BLR", "BLZ", "BMU", "BOL", "BRA", "BRB", "BRN", "BTN", "BVT", "BWA", "CAF", "CAN", "CCK", "CHE", "CHL", "CHN", "CIV", "CMR", "COD", "COG", "COK", "COL", "COM", "CPV", "CRI", "CUB", "CUW", "CXR", "CYM", "CYP", "CZE", "DEU", "DJI", "DMA", "DNK", "DOM", "DZA", "ECU", "EGY", "ERI", "ESH", "ESP", "EST", "ETH", "FIN", "FJI", "FLK", "FRA", "FRO", "FSM", "GAB", "GBR", "GEO", "GGY", "GHA", "GIB", "GIN", "GLP", "GMB", "GNB", "GNQ", "GRC", "GRD", "GRL", "GTM", "GUF", "GUM", "GUY", "HKG", "HMD", "HND", "HRV", "HTI", "HUN", "IDN", "IMN", "IND", "IOT", "IRL", "IRN", "IRQ", "ISL", "ISR", "ITA", "JAM", "JEY", "JOR", "JPN", "KAZ", "KEN", "KGZ", "KHM", "KIR", "KNA", "KOR", "KWT", "LAO", "LBN", "LBR", "LBY", "LCA", "LIE", "LKA", "LSO", "LTU", "LUX", "LVA", "MAC", "MAF", "MAR", "MCO", "MDA", "MDG", "MDV", "MEX", "MHL", "MKD", "MLI", "MLT", "MMR", "MNE", "MNG", "MNP", "MRT", "MSR", "MTQ", "MUS", "MWI", "MYS", "MYT", "NAM", "NCL", "NER", "NFK", "NGA", "NIC", "NIU", "NLD", "NOR", "NPL", "NRU", "NZL", "OMN", "PAK", "PAN", "PCN", "PER", "PHL", "PLW", "PNG", "POL", "PRI", "PRK", "PRT", "PRY", "PSE", "PYF", "QAT", "REU", "ROU", "RUS", "RWA", "SAU", "SDN", "SEN", "SGP", "SGS", "SHN", "SJM", "SLB", "SLE", "SLV", "SMR", "SOM", "SPM", "SRB", "SSD", "STP", "SUR", "SVK", "SVN", "SWE", "SWZ", "SXM", "SYC", "SYR", "TCA", "TCD", "TGO", "THA", "TJK", "TKL", "TKM", "TLS", "TON", "TTO", "TUN", "TUR", "TUV", "TWN", "TZA", "UGA", "UKR", "UMI", "URY", "USA", "UZB", "VAT", "VCT", "VEN", "VGB", "VIR", "VNM", "VUT", "WLF", "WSM", "XKX", "YEM", "ZAF", "ZMB", "ZWE", ] # noqa: E501 - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - # required up here when default value is not given - _path_to_item = kwargs.pop('_path_to_item', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if 'value' in kwargs: - value = kwargs.pop('value') - elif args: - args = list(args) - value = args.pop(0) - else: - raise ApiTypeError( - "value is required, but not passed in args or kwargs and doesn't have default", - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - self.value = value - if kwargs: - raise ApiTypeError( - "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( - kwargs, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - return self diff --git a/finix/model/create_fee_profile_request.py b/finix/model/create_fee_profile_request.py deleted file mode 100644 index 93d8f84..0000000 --- a/finix/model/create_fee_profile_request.py +++ /dev/null @@ -1,470 +0,0 @@ -""" - Finix API - - The version of the OpenAPI document: 2022-02-01 - Contact: support@finixpayments.com -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from finix.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from finix.exceptions import ApiAttributeError - - -def lazy_import(): - from finix.model.tags import Tags - globals()['Tags'] = Tags - - -class CreateFeeProfileRequest(ModelNormal): - """ - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - ('rounding_mode',): { - 'TRANSACTION': "TRANSACTION", - 'AGGREGATE': "AGGREGATE", - }, - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'application': (str,), # noqa: E501 - 'ach_basis_points': (int,), # noqa: E501 - 'ach_credit_return_fixed_fee': (int, none_type,), # noqa: E501 - 'ach_debit_return_fixed_fee': (int, none_type,), # noqa: E501 - 'ach_fixed_fee': (int,), # noqa: E501 - 'american_express_assessment_basis_points': (int, none_type,), # noqa: E501 - 'american_express_basis_points': (int, none_type,), # noqa: E501 - 'american_express_charge_interchange': (bool, none_type,), # noqa: E501 - 'american_express_fixed_fee': (int, none_type,), # noqa: E501 - 'american_express_externally_funded_basis_points': (int, none_type,), # noqa: E501 - 'american_express_externally_funded_fixed_fee': (int, none_type,), # noqa: E501 - 'ancillary_fixed_fee_primary': (int, none_type,), # noqa: E501 - 'ancillary_fixed_fee_secondary': (int, none_type,), # noqa: E501 - 'basis_points': (int,), # noqa: E501 - 'charge_interchange': (bool,), # noqa: E501 - 'diners_club_basis_points': (int, none_type,), # noqa: E501 - 'diners_club_charge_interchange': (bool, none_type,), # noqa: E501 - 'diners_club_fixed_fee': (int, none_type,), # noqa: E501 - 'discover_assessments_basis_points': (int, none_type,), # noqa: E501 - 'discover_basis_points': (int, none_type,), # noqa: E501 - 'discover_charge_interchange': (bool, none_type,), # noqa: E501 - 'discover_data_usage_fixed_fee': (int, none_type,), # noqa: E501 - 'discover_fixed_fee': (int, none_type,), # noqa: E501 - 'discover_externally_funded_basis_points': (int, none_type,), # noqa: E501 - 'discover_externally_funded_fixed_fee': (int, none_type,), # noqa: E501 - 'discover_network_authorization_fixed_fee': (int, none_type,), # noqa: E501 - 'dispute_fixed_fee': (int, none_type,), # noqa: E501 - 'dispute_inquiry_fixed_fee': (int, none_type,), # noqa: E501 - 'externally_funded_basis_points': (int, none_type,), # noqa: E501 - 'externally_funded_fixed_fee': (int, none_type,), # noqa: E501 - 'fixed_fee': (int,), # noqa: E501 - 'jcb_basis_points': (int, none_type,), # noqa: E501 - 'jcb_charge_interchange': (bool, none_type,), # noqa: E501 - 'jcb_fixed_fee': (int, none_type,), # noqa: E501 - 'mastercard_acquirer_fees_basis_points': (int, none_type,), # noqa: E501 - 'mastercard_assessments_over1k_basis_points': (int, none_type,), # noqa: E501 - 'mastercard_assessments_under1k_basis_points': (int, none_type,), # noqa: E501 - 'mastercard_basis_points': (int, none_type,), # noqa: E501 - 'mastercard_charge_interchange': (bool, none_type,), # noqa: E501 - 'mastercard_fixed_fee': (int, none_type,), # noqa: E501 - 'qualified_tiers': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type,), # noqa: E501 - 'rounding_mode': (str,), # noqa: E501 - 'tags': (Tags,), # noqa: E501 - 'visa_acquirer_processing_fixed_fee': (int, none_type,), # noqa: E501 - 'visa_assessments_basis_points': (int, none_type,), # noqa: E501 - 'visa_base_ii_credit_voucher_fixed_fee': (int, none_type,), # noqa: E501 - 'visa_base_ii_system_file_transmission_fixed_fee': (int, none_type,), # noqa: E501 - 'visa_basis_points': (int, none_type,), # noqa: E501 - 'visa_charge_interchange': (bool, none_type,), # noqa: E501 - 'visa_credit_voucher_fixed_fee': (int, none_type,), # noqa: E501 - 'visa_fixed_fee': (int, none_type,), # noqa: E501 - 'visa_kilobyte_access_fixed_fee': (int, none_type,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'application': 'application', # noqa: E501 - 'ach_basis_points': 'ach_basis_points', # noqa: E501 - 'ach_credit_return_fixed_fee': 'ach_credit_return_fixed_fee', # noqa: E501 - 'ach_debit_return_fixed_fee': 'ach_debit_return_fixed_fee', # noqa: E501 - 'ach_fixed_fee': 'ach_fixed_fee', # noqa: E501 - 'american_express_assessment_basis_points': 'american_express_assessment_basis_points', # noqa: E501 - 'american_express_basis_points': 'american_express_basis_points', # noqa: E501 - 'american_express_charge_interchange': 'american_express_charge_interchange', # noqa: E501 - 'american_express_fixed_fee': 'american_express_fixed_fee', # noqa: E501 - 'american_express_externally_funded_basis_points': 'american_express_externally_funded_basis_points', # noqa: E501 - 'american_express_externally_funded_fixed_fee': 'american_express_externally_funded_fixed_fee', # noqa: E501 - 'ancillary_fixed_fee_primary': 'ancillary_fixed_fee_primary', # noqa: E501 - 'ancillary_fixed_fee_secondary': 'ancillary_fixed_fee_secondary', # noqa: E501 - 'basis_points': 'basis_points', # noqa: E501 - 'charge_interchange': 'charge_interchange', # noqa: E501 - 'diners_club_basis_points': 'diners_club_basis_points', # noqa: E501 - 'diners_club_charge_interchange': 'diners_club_charge_interchange', # noqa: E501 - 'diners_club_fixed_fee': 'diners_club_fixed_fee', # noqa: E501 - 'discover_assessments_basis_points': 'discover_assessments_basis_points', # noqa: E501 - 'discover_basis_points': 'discover_basis_points', # noqa: E501 - 'discover_charge_interchange': 'discover_charge_interchange', # noqa: E501 - 'discover_data_usage_fixed_fee': 'discover_data_usage_fixed_fee', # noqa: E501 - 'discover_fixed_fee': 'discover_fixed_fee', # noqa: E501 - 'discover_externally_funded_basis_points': 'discover_externally_funded_basis_points', # noqa: E501 - 'discover_externally_funded_fixed_fee': 'discover_externally_funded_fixed_fee', # noqa: E501 - 'discover_network_authorization_fixed_fee': 'discover_network_authorization_fixed_fee', # noqa: E501 - 'dispute_fixed_fee': 'dispute_fixed_fee', # noqa: E501 - 'dispute_inquiry_fixed_fee': 'dispute_inquiry_fixed_fee', # noqa: E501 - 'externally_funded_basis_points': 'externally_funded_basis_points', # noqa: E501 - 'externally_funded_fixed_fee': 'externally_funded_fixed_fee', # noqa: E501 - 'fixed_fee': 'fixed_fee', # noqa: E501 - 'jcb_basis_points': 'jcb_basis_points', # noqa: E501 - 'jcb_charge_interchange': 'jcb_charge_interchange', # noqa: E501 - 'jcb_fixed_fee': 'jcb_fixed_fee', # noqa: E501 - 'mastercard_acquirer_fees_basis_points': 'mastercard_acquirer_fees_basis_points', # noqa: E501 - 'mastercard_assessments_over1k_basis_points': 'mastercard_assessments_over1k_basis_points', # noqa: E501 - 'mastercard_assessments_under1k_basis_points': 'mastercard_assessments_under1k_basis_points', # noqa: E501 - 'mastercard_basis_points': 'mastercard_basis_points', # noqa: E501 - 'mastercard_charge_interchange': 'mastercard_charge_interchange', # noqa: E501 - 'mastercard_fixed_fee': 'mastercard_fixed_fee', # noqa: E501 - 'qualified_tiers': 'qualified_tiers', # noqa: E501 - 'rounding_mode': 'rounding_mode', # noqa: E501 - 'tags': 'tags', # noqa: E501 - 'visa_acquirer_processing_fixed_fee': 'visa_acquirer_processing_fixed_fee', # noqa: E501 - 'visa_assessments_basis_points': 'visa_assessments_basis_points', # noqa: E501 - 'visa_base_ii_credit_voucher_fixed_fee': 'visa_base_II_credit_voucher_fixed_fee', # noqa: E501 - 'visa_base_ii_system_file_transmission_fixed_fee': 'visa_base_II_system_file_transmission_fixed_fee', # noqa: E501 - 'visa_basis_points': 'visa_basis_points', # noqa: E501 - 'visa_charge_interchange': 'visa_charge_interchange', # noqa: E501 - 'visa_credit_voucher_fixed_fee': 'visa_credit_voucher_fixed_fee', # noqa: E501 - 'visa_fixed_fee': 'visa_fixed_fee', # noqa: E501 - 'visa_kilobyte_access_fixed_fee': 'visa_kilobyte_access_fixed_fee', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, application, *args, **kwargs): # noqa: E501 - """CreateFeeProfileRequest - a model defined in OpenAPI - - Args: - application (str): The ID of the resource. - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - ach_basis_points (int): Percentage-based fee incurred against the full amount of an eCheck (also called ACH payments). Calculated as one hundredth of one percent (1 basis point = .0001 or .01%).. [optional] # noqa: E501 - ach_credit_return_fixed_fee (int, none_type): A fixed amount in cents that will be charged to the merchant for processing an echeck (also called ACH payments) credit return.. [optional] # noqa: E501 - ach_debit_return_fixed_fee (int, none_type): A fixed amount in cents that will be charged to the merchant for processing an echeck (also called ACH payment) debit return.. [optional] # noqa: E501 - ach_fixed_fee (int): Fee in cents incurred for each individual `Transfer`.. [optional] # noqa: E501 - american_express_assessment_basis_points (int, none_type): Applies to gross American Express card volume.. [optional] # noqa: E501 - american_express_basis_points (int, none_type): Percentage-based fee incurred against the full amount of each American Express `Transfer`. Calculated as one hundredth of one percent (1 basis point = .0001 or .01%).. [optional] # noqa: E501 - american_express_charge_interchange (bool, none_type): Set to **True** to incur interchange fees for American Express `Transfers`.. [optional] # noqa: E501 - american_express_fixed_fee (int, none_type): Fee in cents incurred for each individual American Express `Transfer`.. [optional] # noqa: E501 - american_express_externally_funded_basis_points (int, none_type): Percentage-based fee incurred against the full amount of each American Express externally funded `Transfer`. Calculated as one hundredth of one percent (1 basis point = .0001 or .01%).. [optional] # noqa: E501 - american_express_externally_funded_fixed_fee (int, none_type): Fee in cents incurred for each individual American Express externally funded `Transfer`.. [optional] # noqa: E501 - ancillary_fixed_fee_primary (int, none_type): An additional fixed fee that can be charged per `Transfer`.. [optional] # noqa: E501 - ancillary_fixed_fee_secondary (int, none_type): An additional fixed fee that can be charged per `Transfer` if `ancillary_fixed_fee_primary` is included.. [optional] # noqa: E501 - basis_points (int): Percentage-based fee incurred against the full amount of each card-based `Transfer`. Calculated as one hundredth of one percent (1 basis point = .0001 or .01%).. [optional] # noqa: E501 - charge_interchange (bool): Set to **True** to incur interchange fees for card-based `Transfers`.. [optional] # noqa: E501 - diners_club_basis_points (int, none_type): Percentage-based fee incurred against the full amount of each Diners `Transfer`. Calculated as one hundredth of one percent (1 basis point = .0001 or .01%).. [optional] # noqa: E501 - diners_club_charge_interchange (bool, none_type): Set to **True** to incur interchange fees for Diners `Transfers`.. [optional] # noqa: E501 - diners_club_fixed_fee (int, none_type): Fee in cents incurred for each individual Diners `Transfer`.. [optional] # noqa: E501 - discover_assessments_basis_points (int, none_type): Assessment applies to gross Discover card transaction volume.. [optional] # noqa: E501 - discover_basis_points (int, none_type): Percentage-based fee incurred against the full amount of each Discover `Transfer`. Calculated as one hundredth of one percent (1 basis point = .0001 or .01%).. [optional] # noqa: E501 - discover_charge_interchange (bool, none_type): Set to **True** to incur interchange fees for Discover `Transfers`.. [optional] # noqa: E501 - discover_data_usage_fixed_fee (int, none_type): Applies to all U.S.-based `Authorization` transactions.. [optional] # noqa: E501 - discover_fixed_fee (int, none_type): Fee in cents incurred for each individual Discover `Transfer`.. [optional] # noqa: E501 - discover_externally_funded_basis_points (int, none_type): Percentage-based fee incurred against the full amount of each Discover externally funded `Transfer`. Calculated as one hundredth of one percent (1 basis point = .0001 or .01%).. [optional] # noqa: E501 - discover_externally_funded_fixed_fee (int, none_type): Fee in cents incurred for each individual Discover externally funded `Transfer`.. [optional] # noqa: E501 - discover_network_authorization_fixed_fee (int, none_type): This fee applies to all Discover network `authorizations` and replaces the previously assessed Data Transmission.. [optional] # noqa: E501 - dispute_fixed_fee (int, none_type): Applied when a `dispute` is created or updated to a **PENDING** state.. [optional] # noqa: E501 - dispute_inquiry_fixed_fee (int, none_type): Applied when a `dispute` is created or updated to a **INQUIRY** state.. [optional] # noqa: E501 - externally_funded_basis_points (int, none_type): Percentage-based fee incurred against the full amount of each `Transfer` that's card-based and externally funded. Calculated as one hundredth of one percent (1 basis point = .0001 or .01%).. [optional] # noqa: E501 - externally_funded_fixed_fee (int, none_type): Fee in cents incurred for each individual `Transfer` that's card-based and externally funded.. [optional] # noqa: E501 - fixed_fee (int): Fee in cents incurred for each individual card-based `Transfer`.. [optional] # noqa: E501 - jcb_basis_points (int, none_type): Percentage-based fee incurred against the full amount of each JCB `Transfer`. Calculated as one hundredth of one percent (1 basis point = .0001 or .01%).. [optional] # noqa: E501 - jcb_charge_interchange (bool, none_type): Set to **True** to incur interchange fees for JCB Transfers.. [optional] # noqa: E501 - jcb_fixed_fee (int, none_type): Fee in cents incurred for each individual JCB `Transfer`.. [optional] # noqa: E501 - mastercard_acquirer_fees_basis_points (int, none_type): The fee is assessed on a business’s gross MasterCard processing volume. This fee varies per acquirer based on MasterCard’s assessed charge as it’s distributed across the acquirer’s portfolio of merchants. Generally, this fee is a fraction of a basis point. For example, 0.0045%, 0.0075%, etc. are examples of a likely fee.. [optional] # noqa: E501 - mastercard_assessments_over1k_basis_points (int, none_type): Fee applied to Mastercard credit sale transactions greater than $1,000.. [optional] # noqa: E501 - mastercard_assessments_under1k_basis_points (int, none_type): Fee applied to Mastercard transactions less than or equal to $1,000.. [optional] # noqa: E501 - mastercard_basis_points (int, none_type): Percentage-based fee incurred against the full amount of each MasterCard `Transfer`. Calculated as one hundredth of one percent (1 basis point = .0001 or .01%).. [optional] # noqa: E501 - mastercard_charge_interchange (bool, none_type): Set to **True** to incur interchange fees for MasterCard `Transfers`.. [optional] # noqa: E501 - mastercard_fixed_fee (int, none_type): Fee in cents incurred for each individual MasterCard `Transfer`.. [optional] # noqa: E501 - qualified_tiers ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type): The top of the qualified tier tree.. [optional] # noqa: E501 - rounding_mode (str): . [optional] # noqa: E501 - tags (Tags): [optional] # noqa: E501 - visa_acquirer_processing_fixed_fee (int, none_type): Applied to all U.S.-based credit card authorizations acquired in the U.S. regardless of where the issuer/cardholder is located. If your business is based in the U.S., the acquirer processing fee will apply to all Visa credit card authorizations.. [optional] # noqa: E501 - visa_assessments_basis_points (int, none_type): Applies to all Visa credit transactions.. [optional] # noqa: E501 - visa_base_ii_credit_voucher_fixed_fee (int, none_type): Applies to all U.S.-based refunds.. [optional] # noqa: E501 - visa_base_ii_system_file_transmission_fixed_fee (int, none_type): Applies to all Visa transactions and is charged in addition to other transaction-based assessments.. [optional] # noqa: E501 - visa_basis_points (int, none_type): Percentage-based fee incurred against the full amount of each Visa `Transfer`. Calculated as one hundredth of one percent (1 basis point = .0001 or .01%).. [optional] # noqa: E501 - visa_charge_interchange (bool, none_type): Set to **True** to incur interchange fees for Visa `Transfers`.. [optional] # noqa: E501 - visa_credit_voucher_fixed_fee (int, none_type): Applies to Visa refunds.. [optional] # noqa: E501 - visa_fixed_fee (int, none_type): Fee in cents incurred for each individual Visa `Transfer`.. [optional] # noqa: E501 - visa_kilobyte_access_fixed_fee (int, none_type): Charged on each authorization transaction submitted to Visa’s network for settlement.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.application = application - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, application, *args, **kwargs): # noqa: E501 - """CreateFeeProfileRequest - a model defined in OpenAPI - - Args: - application (str): The ID of the resource. - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - ach_basis_points (int): Percentage-based fee incurred against the full amount of an eCheck (also called ACH payments). Calculated as one hundredth of one percent (1 basis point = .0001 or .01%).. [optional] # noqa: E501 - ach_credit_return_fixed_fee (int, none_type): A fixed amount in cents that will be charged to the merchant for processing an echeck (also called ACH payments) credit return.. [optional] # noqa: E501 - ach_debit_return_fixed_fee (int, none_type): A fixed amount in cents that will be charged to the merchant for processing an echeck (also called ACH payment) debit return.. [optional] # noqa: E501 - ach_fixed_fee (int): Fee in cents incurred for each individual `Transfer`.. [optional] # noqa: E501 - american_express_assessment_basis_points (int, none_type): Applies to gross American Express card volume.. [optional] # noqa: E501 - american_express_basis_points (int, none_type): Percentage-based fee incurred against the full amount of each American Express `Transfer`. Calculated as one hundredth of one percent (1 basis point = .0001 or .01%).. [optional] # noqa: E501 - american_express_charge_interchange (bool, none_type): Set to **True** to incur interchange fees for American Express `Transfers`.. [optional] # noqa: E501 - american_express_fixed_fee (int, none_type): Fee in cents incurred for each individual American Express `Transfer`.. [optional] # noqa: E501 - american_express_externally_funded_basis_points (int, none_type): Percentage-based fee incurred against the full amount of each American Express externally funded `Transfer`. Calculated as one hundredth of one percent (1 basis point = .0001 or .01%).. [optional] # noqa: E501 - american_express_externally_funded_fixed_fee (int, none_type): Fee in cents incurred for each individual American Express externally funded `Transfer`.. [optional] # noqa: E501 - ancillary_fixed_fee_primary (int, none_type): An additional fixed fee that can be charged per `Transfer`.. [optional] # noqa: E501 - ancillary_fixed_fee_secondary (int, none_type): An additional fixed fee that can be charged per `Transfer` if `ancillary_fixed_fee_primary` is included.. [optional] # noqa: E501 - basis_points (int): Percentage-based fee incurred against the full amount of each card-based `Transfer`. Calculated as one hundredth of one percent (1 basis point = .0001 or .01%).. [optional] # noqa: E501 - charge_interchange (bool): Set to **True** to incur interchange fees for card-based `Transfers`.. [optional] # noqa: E501 - diners_club_basis_points (int, none_type): Percentage-based fee incurred against the full amount of each Diners `Transfer`. Calculated as one hundredth of one percent (1 basis point = .0001 or .01%).. [optional] # noqa: E501 - diners_club_charge_interchange (bool, none_type): Set to **True** to incur interchange fees for Diners `Transfers`.. [optional] # noqa: E501 - diners_club_fixed_fee (int, none_type): Fee in cents incurred for each individual Diners `Transfer`.. [optional] # noqa: E501 - discover_assessments_basis_points (int, none_type): Assessment applies to gross Discover card transaction volume.. [optional] # noqa: E501 - discover_basis_points (int, none_type): Percentage-based fee incurred against the full amount of each Discover `Transfer`. Calculated as one hundredth of one percent (1 basis point = .0001 or .01%).. [optional] # noqa: E501 - discover_charge_interchange (bool, none_type): Set to **True** to incur interchange fees for Discover `Transfers`.. [optional] # noqa: E501 - discover_data_usage_fixed_fee (int, none_type): Applies to all U.S.-based `Authorization` transactions.. [optional] # noqa: E501 - discover_fixed_fee (int, none_type): Fee in cents incurred for each individual Discover `Transfer`.. [optional] # noqa: E501 - discover_externally_funded_basis_points (int, none_type): Percentage-based fee incurred against the full amount of each Discover externally funded `Transfer`. Calculated as one hundredth of one percent (1 basis point = .0001 or .01%).. [optional] # noqa: E501 - discover_externally_funded_fixed_fee (int, none_type): Fee in cents incurred for each individual Discover externally funded `Transfer`.. [optional] # noqa: E501 - discover_network_authorization_fixed_fee (int, none_type): This fee applies to all Discover network `authorizations` and replaces the previously assessed Data Transmission.. [optional] # noqa: E501 - dispute_fixed_fee (int, none_type): Applied when a `dispute` is created or updated to a **PENDING** state.. [optional] # noqa: E501 - dispute_inquiry_fixed_fee (int, none_type): Applied when a `dispute` is created or updated to a **INQUIRY** state.. [optional] # noqa: E501 - externally_funded_basis_points (int, none_type): Percentage-based fee incurred against the full amount of each `Transfer` that's card-based and externally funded. Calculated as one hundredth of one percent (1 basis point = .0001 or .01%).. [optional] # noqa: E501 - externally_funded_fixed_fee (int, none_type): Fee in cents incurred for each individual `Transfer` that's card-based and externally funded.. [optional] # noqa: E501 - fixed_fee (int): Fee in cents incurred for each individual card-based `Transfer`.. [optional] # noqa: E501 - jcb_basis_points (int, none_type): Percentage-based fee incurred against the full amount of each JCB `Transfer`. Calculated as one hundredth of one percent (1 basis point = .0001 or .01%).. [optional] # noqa: E501 - jcb_charge_interchange (bool, none_type): Set to **True** to incur interchange fees for JCB Transfers.. [optional] # noqa: E501 - jcb_fixed_fee (int, none_type): Fee in cents incurred for each individual JCB `Transfer`.. [optional] # noqa: E501 - mastercard_acquirer_fees_basis_points (int, none_type): The fee is assessed on a business’s gross MasterCard processing volume. This fee varies per acquirer based on MasterCard’s assessed charge as it’s distributed across the acquirer’s portfolio of merchants. Generally, this fee is a fraction of a basis point. For example, 0.0045%, 0.0075%, etc. are examples of a likely fee.. [optional] # noqa: E501 - mastercard_assessments_over1k_basis_points (int, none_type): Fee applied to Mastercard credit sale transactions greater than $1,000.. [optional] # noqa: E501 - mastercard_assessments_under1k_basis_points (int, none_type): Fee applied to Mastercard transactions less than or equal to $1,000.. [optional] # noqa: E501 - mastercard_basis_points (int, none_type): Percentage-based fee incurred against the full amount of each MasterCard `Transfer`. Calculated as one hundredth of one percent (1 basis point = .0001 or .01%).. [optional] # noqa: E501 - mastercard_charge_interchange (bool, none_type): Set to **True** to incur interchange fees for MasterCard `Transfers`.. [optional] # noqa: E501 - mastercard_fixed_fee (int, none_type): Fee in cents incurred for each individual MasterCard `Transfer`.. [optional] # noqa: E501 - qualified_tiers ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type): The top of the qualified tier tree.. [optional] # noqa: E501 - rounding_mode (str): . [optional] # noqa: E501 - tags (Tags): [optional] # noqa: E501 - visa_acquirer_processing_fixed_fee (int, none_type): Applied to all U.S.-based credit card authorizations acquired in the U.S. regardless of where the issuer/cardholder is located. If your business is based in the U.S., the acquirer processing fee will apply to all Visa credit card authorizations.. [optional] # noqa: E501 - visa_assessments_basis_points (int, none_type): Applies to all Visa credit transactions.. [optional] # noqa: E501 - visa_base_ii_credit_voucher_fixed_fee (int, none_type): Applies to all U.S.-based refunds.. [optional] # noqa: E501 - visa_base_ii_system_file_transmission_fixed_fee (int, none_type): Applies to all Visa transactions and is charged in addition to other transaction-based assessments.. [optional] # noqa: E501 - visa_basis_points (int, none_type): Percentage-based fee incurred against the full amount of each Visa `Transfer`. Calculated as one hundredth of one percent (1 basis point = .0001 or .01%).. [optional] # noqa: E501 - visa_charge_interchange (bool, none_type): Set to **True** to incur interchange fees for Visa `Transfers`.. [optional] # noqa: E501 - visa_credit_voucher_fixed_fee (int, none_type): Applies to Visa refunds.. [optional] # noqa: E501 - visa_fixed_fee (int, none_type): Fee in cents incurred for each individual Visa `Transfer`.. [optional] # noqa: E501 - visa_kilobyte_access_fixed_fee (int, none_type): Charged on each authorization transaction submitted to Visa’s network for settlement.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.application = application - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/finix/model/create_onboarding_form_request_onboarding_data.py b/finix/model/create_onboarding_form_request_onboarding_data.py deleted file mode 100644 index e471d3e..0000000 --- a/finix/model/create_onboarding_form_request_onboarding_data.py +++ /dev/null @@ -1,266 +0,0 @@ -""" - Finix API - - The version of the OpenAPI document: 2022-02-01 - Contact: support@finixpayments.com -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from finix.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from finix.exceptions import ApiAttributeError - - - -class CreateOnboardingFormRequestOnboardingData(ModelNormal): - """ - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'entity': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), # noqa: E501 - 'associated_entities': ([{str: (bool, date, datetime, dict, float, int, list, str, none_type)}],), # noqa: E501 - 'additional_underwriting_data': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), # noqa: E501 - 'payment_instruments': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), # noqa: E501 - 'max_transaction_amount': (int,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'entity': 'entity', # noqa: E501 - 'associated_entities': 'associated_entities', # noqa: E501 - 'additional_underwriting_data': 'additional_underwriting_data', # noqa: E501 - 'payment_instruments': 'payment_instruments', # noqa: E501 - 'max_transaction_amount': 'max_transaction_amount', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """CreateOnboardingFormRequestOnboardingData - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - entity ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): The `entity` information saved in the `Identity` of the user.. [optional] # noqa: E501 - associated_entities ([{str: (bool, date, datetime, dict, float, int, list, str, none_type)}]): The `entities` saved in the `associated_identities` of the user. For more information, see [Create an Associated Identity](/guides/onboarding/onboarding-form/#prefilling-fields).. [optional] # noqa: E501 - additional_underwriting_data ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): Additional underwriting data about the user.. [optional] # noqa: E501 - payment_instruments ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): The `Payment Instrument` that'll be used to payout the user. For more information, see [Payouts](/guides/payouts/).. [optional] # noqa: E501 - max_transaction_amount (int): Maximum amount that can be transacted for a single transaction in cents (max 12 characters). Must be equal to or less than your `max_transaction_amount`.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """CreateOnboardingFormRequestOnboardingData - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - entity ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): The `entity` information saved in the `Identity` of the user.. [optional] # noqa: E501 - associated_entities ([{str: (bool, date, datetime, dict, float, int, list, str, none_type)}]): The `entities` saved in the `associated_identities` of the user. For more information, see [Create an Associated Identity](/guides/onboarding/onboarding-form/#prefilling-fields).. [optional] # noqa: E501 - additional_underwriting_data ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): Additional underwriting data about the user.. [optional] # noqa: E501 - payment_instruments ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): The `Payment Instrument` that'll be used to payout the user. For more information, see [Payouts](/guides/payouts/).. [optional] # noqa: E501 - max_transaction_amount (int): Maximum amount that can be transacted for a single transaction in cents (max 12 characters). Must be equal to or less than your `max_transaction_amount`.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/finix/model/dispute_adjustment_transfers_list.py b/finix/model/dispute_adjustment_transfers_list.py deleted file mode 100644 index aaa6d83..0000000 --- a/finix/model/dispute_adjustment_transfers_list.py +++ /dev/null @@ -1,273 +0,0 @@ -""" - Finix API - - The version of the OpenAPI document: 2022-02-01 - Contact: support@finixpayments.com -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from finix.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from finix.exceptions import ApiAttributeError - - - -class DisputeAdjustmentTransfersList(ModelSimple): - """ - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - additional_properties_type = None - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'value': (TransfersList,), - } - - @cached_property - def discriminator(): - return None - - - attribute_map = {} - - read_only_vars = set() - - _composed_schemas = None - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): - """DisputeAdjustmentTransfersList - a model defined in OpenAPI - - Note that value can be passed either in args or in kwargs, but not in both. - - Args: - args[0] (TransfersList): # noqa: E501 - - Keyword Args: - value (TransfersList): # noqa: E501 - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - # required up here when default value is not given - _path_to_item = kwargs.pop('_path_to_item', ()) - - if 'value' in kwargs: - value = kwargs.pop('value') - elif args: - args = list(args) - value = args.pop(0) - else: - raise ApiTypeError( - "value is required, but not passed in args or kwargs and doesn't have default", - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - self.value = value - if kwargs: - raise ApiTypeError( - "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( - kwargs, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): - """DisputeAdjustmentTransfersList - a model defined in OpenAPI - - Note that value can be passed either in args or in kwargs, but not in both. - - Args: - args[0] (TransfersList): # noqa: E501 - - Keyword Args: - value (TransfersList): # noqa: E501 - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - # required up here when default value is not given - _path_to_item = kwargs.pop('_path_to_item', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if 'value' in kwargs: - value = kwargs.pop('value') - elif args: - args = list(args) - value = args.pop(0) - else: - raise ApiTypeError( - "value is required, but not passed in args or kwargs and doesn't have default", - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - self.value = value - if kwargs: - raise ApiTypeError( - "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( - kwargs, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - return self diff --git a/finix/model/fee_profile.py b/finix/model/fee_profile.py deleted file mode 100644 index da676b8..0000000 --- a/finix/model/fee_profile.py +++ /dev/null @@ -1,482 +0,0 @@ -""" - Finix API - - The version of the OpenAPI document: 2022-02-01 - Contact: support@finixpayments.com -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from finix.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from finix.exceptions import ApiAttributeError - - -def lazy_import(): - from finix.model.fee_profile_links import FeeProfileLinks - from finix.model.tags import Tags - globals()['FeeProfileLinks'] = FeeProfileLinks - globals()['Tags'] = Tags - - -class FeeProfile(ModelNormal): - """ - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - ('rounding_mode',): { - 'TRANSACTION': "TRANSACTION", - 'AGGREGATE': "AGGREGATE", - }, - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'id': (str,), # noqa: E501 - 'created_at': (datetime,), # noqa: E501 - 'updated_at': (datetime,), # noqa: E501 - 'ach_basis_points': (int,), # noqa: E501 - 'ach_credit_return_fixed_fee': (int, none_type,), # noqa: E501 - 'ach_debit_return_fixed_fee': (int, none_type,), # noqa: E501 - 'ach_fixed_fee': (int,), # noqa: E501 - 'american_express_assessment_basis_points': (int, none_type,), # noqa: E501 - 'american_express_basis_points': (int, none_type,), # noqa: E501 - 'american_express_charge_interchange': (bool, none_type,), # noqa: E501 - 'american_express_fixed_fee': (int, none_type,), # noqa: E501 - 'american_express_externally_funded_basis_points': (int, none_type,), # noqa: E501 - 'american_express_externally_funded_fixed_fee': (int, none_type,), # noqa: E501 - 'ancillary_fixed_fee_primary': (int, none_type,), # noqa: E501 - 'ancillary_fixed_fee_secondary': (int, none_type,), # noqa: E501 - 'application': (str,), # noqa: E501 - 'basis_points': (int,), # noqa: E501 - 'charge_interchange': (bool,), # noqa: E501 - 'diners_club_basis_points': (int, none_type,), # noqa: E501 - 'diners_club_charge_interchange': (bool, none_type,), # noqa: E501 - 'diners_club_fixed_fee': (int, none_type,), # noqa: E501 - 'discover_assessments_basis_points': (int, none_type,), # noqa: E501 - 'discover_basis_points': (int, none_type,), # noqa: E501 - 'discover_charge_interchange': (bool, none_type,), # noqa: E501 - 'discover_data_usage_fixed_fee': (int, none_type,), # noqa: E501 - 'discover_fixed_fee': (int, none_type,), # noqa: E501 - 'discover_externally_funded_basis_points': (int, none_type,), # noqa: E501 - 'discover_externally_funded_fixed_fee': (int, none_type,), # noqa: E501 - 'discover_network_authorization_fixed_fee': (int, none_type,), # noqa: E501 - 'dispute_fixed_fee': (int, none_type,), # noqa: E501 - 'dispute_inquiry_fixed_fee': (int, none_type,), # noqa: E501 - 'externally_funded_basis_points': (int, none_type,), # noqa: E501 - 'externally_funded_fixed_fee': (int, none_type,), # noqa: E501 - 'fixed_fee': (int,), # noqa: E501 - 'jcb_basis_points': (int, none_type,), # noqa: E501 - 'jcb_charge_interchange': (bool, none_type,), # noqa: E501 - 'jcb_fixed_fee': (int, none_type,), # noqa: E501 - 'mastercard_acquirer_fees_basis_points': (int, none_type,), # noqa: E501 - 'mastercard_assessments_over1k_basis_points': (int, none_type,), # noqa: E501 - 'mastercard_assessments_under1k_basis_points': (int, none_type,), # noqa: E501 - 'mastercard_basis_points': (int, none_type,), # noqa: E501 - 'mastercard_charge_interchange': (bool, none_type,), # noqa: E501 - 'mastercard_fixed_fee': (int, none_type,), # noqa: E501 - 'qualified_tiers': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type,), # noqa: E501 - 'rounding_mode': (str,), # noqa: E501 - 'tags': (Tags,), # noqa: E501 - 'visa_acquirer_processing_fixed_fee': (int, none_type,), # noqa: E501 - 'visa_assessments_basis_points': (int, none_type,), # noqa: E501 - 'visa_base_ii_credit_voucher_fixed_fee': (int, none_type,), # noqa: E501 - 'visa_base_ii_system_file_transmission_fixed_fee': (int, none_type,), # noqa: E501 - 'visa_basis_points': (int, none_type,), # noqa: E501 - 'visa_charge_interchange': (bool, none_type,), # noqa: E501 - 'visa_credit_voucher_fixed_fee': (int, none_type,), # noqa: E501 - 'visa_fixed_fee': (int, none_type,), # noqa: E501 - 'visa_kilobyte_access_fixed_fee': (int, none_type,), # noqa: E501 - 'links': (FeeProfileLinks,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'id': 'id', # noqa: E501 - 'created_at': 'created_at', # noqa: E501 - 'updated_at': 'updated_at', # noqa: E501 - 'ach_basis_points': 'ach_basis_points', # noqa: E501 - 'ach_credit_return_fixed_fee': 'ach_credit_return_fixed_fee', # noqa: E501 - 'ach_debit_return_fixed_fee': 'ach_debit_return_fixed_fee', # noqa: E501 - 'ach_fixed_fee': 'ach_fixed_fee', # noqa: E501 - 'american_express_assessment_basis_points': 'american_express_assessment_basis_points', # noqa: E501 - 'american_express_basis_points': 'american_express_basis_points', # noqa: E501 - 'american_express_charge_interchange': 'american_express_charge_interchange', # noqa: E501 - 'american_express_fixed_fee': 'american_express_fixed_fee', # noqa: E501 - 'american_express_externally_funded_basis_points': 'american_express_externally_funded_basis_points', # noqa: E501 - 'american_express_externally_funded_fixed_fee': 'american_express_externally_funded_fixed_fee', # noqa: E501 - 'ancillary_fixed_fee_primary': 'ancillary_fixed_fee_primary', # noqa: E501 - 'ancillary_fixed_fee_secondary': 'ancillary_fixed_fee_secondary', # noqa: E501 - 'application': 'application', # noqa: E501 - 'basis_points': 'basis_points', # noqa: E501 - 'charge_interchange': 'charge_interchange', # noqa: E501 - 'diners_club_basis_points': 'diners_club_basis_points', # noqa: E501 - 'diners_club_charge_interchange': 'diners_club_charge_interchange', # noqa: E501 - 'diners_club_fixed_fee': 'diners_club_fixed_fee', # noqa: E501 - 'discover_assessments_basis_points': 'discover_assessments_basis_points', # noqa: E501 - 'discover_basis_points': 'discover_basis_points', # noqa: E501 - 'discover_charge_interchange': 'discover_charge_interchange', # noqa: E501 - 'discover_data_usage_fixed_fee': 'discover_data_usage_fixed_fee', # noqa: E501 - 'discover_fixed_fee': 'discover_fixed_fee', # noqa: E501 - 'discover_externally_funded_basis_points': 'discover_externally_funded_basis_points', # noqa: E501 - 'discover_externally_funded_fixed_fee': 'discover_externally_funded_fixed_fee', # noqa: E501 - 'discover_network_authorization_fixed_fee': 'discover_network_authorization_fixed_fee', # noqa: E501 - 'dispute_fixed_fee': 'dispute_fixed_fee', # noqa: E501 - 'dispute_inquiry_fixed_fee': 'dispute_inquiry_fixed_fee', # noqa: E501 - 'externally_funded_basis_points': 'externally_funded_basis_points', # noqa: E501 - 'externally_funded_fixed_fee': 'externally_funded_fixed_fee', # noqa: E501 - 'fixed_fee': 'fixed_fee', # noqa: E501 - 'jcb_basis_points': 'jcb_basis_points', # noqa: E501 - 'jcb_charge_interchange': 'jcb_charge_interchange', # noqa: E501 - 'jcb_fixed_fee': 'jcb_fixed_fee', # noqa: E501 - 'mastercard_acquirer_fees_basis_points': 'mastercard_acquirer_fees_basis_points', # noqa: E501 - 'mastercard_assessments_over1k_basis_points': 'mastercard_assessments_over1k_basis_points', # noqa: E501 - 'mastercard_assessments_under1k_basis_points': 'mastercard_assessments_under1k_basis_points', # noqa: E501 - 'mastercard_basis_points': 'mastercard_basis_points', # noqa: E501 - 'mastercard_charge_interchange': 'mastercard_charge_interchange', # noqa: E501 - 'mastercard_fixed_fee': 'mastercard_fixed_fee', # noqa: E501 - 'qualified_tiers': 'qualified_tiers', # noqa: E501 - 'rounding_mode': 'rounding_mode', # noqa: E501 - 'tags': 'tags', # noqa: E501 - 'visa_acquirer_processing_fixed_fee': 'visa_acquirer_processing_fixed_fee', # noqa: E501 - 'visa_assessments_basis_points': 'visa_assessments_basis_points', # noqa: E501 - 'visa_base_ii_credit_voucher_fixed_fee': 'visa_base_II_credit_voucher_fixed_fee', # noqa: E501 - 'visa_base_ii_system_file_transmission_fixed_fee': 'visa_base_II_system_file_transmission_fixed_fee', # noqa: E501 - 'visa_basis_points': 'visa_basis_points', # noqa: E501 - 'visa_charge_interchange': 'visa_charge_interchange', # noqa: E501 - 'visa_credit_voucher_fixed_fee': 'visa_credit_voucher_fixed_fee', # noqa: E501 - 'visa_fixed_fee': 'visa_fixed_fee', # noqa: E501 - 'visa_kilobyte_access_fixed_fee': 'visa_kilobyte_access_fixed_fee', # noqa: E501 - 'links': '_links', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """FeeProfile - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - id (str): [optional] # noqa: E501 - created_at (datetime): Timestamp of when the object was created.. [optional] # noqa: E501 - updated_at (datetime): Timestamp of when the object was last updated.. [optional] # noqa: E501 - ach_basis_points (int): Percentage-based fee incurred against the full amount of an eCheck (also called ACH payments). Calculated as one hundredth of one percent (1 basis point = .0001 or .01%). [optional] # noqa: E501 - ach_credit_return_fixed_fee (int, none_type): A fixed amount in cents that will be charged to the merchant for processing an echeck (also called ACH payments) credit return.. [optional] # noqa: E501 - ach_debit_return_fixed_fee (int, none_type): A fixed amount in cents that will be charged to the merchant for processing an echeck (also called ACH payment) debit return.. [optional] # noqa: E501 - ach_fixed_fee (int): Fee in cents incurred for each individual `Transfer`.. [optional] # noqa: E501 - american_express_assessment_basis_points (int, none_type): Applies to gross American Express card volume.. [optional] # noqa: E501 - american_express_basis_points (int, none_type): Percentage-based fee incurred against the full amount of each American Express `Transfer`. Calculated as one hundredth of one percent (1 basis point = .0001 or .01%). [optional] # noqa: E501 - american_express_charge_interchange (bool, none_type): Set to **True** to incur interchange fees for American Express `Transfers`.. [optional] # noqa: E501 - american_express_fixed_fee (int, none_type): Fee in cents incurred for each individual American Express `Transfer`.. [optional] # noqa: E501 - american_express_externally_funded_basis_points (int, none_type): Percentage-based fee incurred against the full amount of each American Express externally funded `Transfer`. Calculated as one hundredth of one percent (1 basis point = .0001 or .01%). [optional] # noqa: E501 - american_express_externally_funded_fixed_fee (int, none_type): Fee in cents incurred for each individual American Express externally funded `Transfer`.. [optional] # noqa: E501 - ancillary_fixed_fee_primary (int, none_type): An additional fixed fee that can be charged per `Transfer`.. [optional] # noqa: E501 - ancillary_fixed_fee_secondary (int, none_type): An additional fixed fee that can be charged per `Transfer` if `ancillary_fixed_fee_primary` is included.. [optional] # noqa: E501 - application (str): The ID of the resource.. [optional] # noqa: E501 - basis_points (int): Percentage-based fee incurred against the full amount of each card-based `Transfer`. Calculated as one hundredth of one percent (1 basis point = .0001 or .01%). [optional] # noqa: E501 - charge_interchange (bool): Set to **True** to incur interchange fees for card-based `Transfers`.. [optional] # noqa: E501 - diners_club_basis_points (int, none_type): Percentage-based fee incurred against the full amount of each Diners `Transfer`. Calculated as one hundredth of one percent (1 basis point = .0001 or .01%).. [optional] # noqa: E501 - diners_club_charge_interchange (bool, none_type): Set to **True** to incur interchange fees for Diners `Transfers`.. [optional] # noqa: E501 - diners_club_fixed_fee (int, none_type): Fee in cents incurred for each individual Diners `Transfer`.. [optional] # noqa: E501 - discover_assessments_basis_points (int, none_type): Assessment applies to gross Discover card transaction volume.. [optional] # noqa: E501 - discover_basis_points (int, none_type): Percentage-based fee incurred against the full amount of each Discover `Transfer`. Calculated as one hundredth of one percent (1 basis point = .0001 or .01%). [optional] # noqa: E501 - discover_charge_interchange (bool, none_type): Set to **True** to incur interchange fees for Discover `Transfers`.. [optional] # noqa: E501 - discover_data_usage_fixed_fee (int, none_type): Applies to all U.S.-based `authorization` transactions.. [optional] # noqa: E501 - discover_fixed_fee (int, none_type): Fee in cents incurred for each individual Discover `Transfer`.. [optional] # noqa: E501 - discover_externally_funded_basis_points (int, none_type): Percentage-based fee incurred against the full amount of each Discover externally funded `Transfer`. Calculated as one hundredth of one percent (1 basis point = .0001 or .01%).. [optional] # noqa: E501 - discover_externally_funded_fixed_fee (int, none_type): Fee in cents incurred for each individual Discover externally funded `Transfer`.. [optional] # noqa: E501 - discover_network_authorization_fixed_fee (int, none_type): This fee applies to all Discover network `authorizations` and replaces the previously assessed Data Transmission.. [optional] # noqa: E501 - dispute_fixed_fee (int, none_type): Applied when a `dispute` is created or updated to a **PENDING** state.. [optional] # noqa: E501 - dispute_inquiry_fixed_fee (int, none_type): Applied when a `dispute` is created or updated to a **INQUIRY** state.. [optional] # noqa: E501 - externally_funded_basis_points (int, none_type): Percentage-based fee incurred against the full amount of each `Transfer` that's card-based and externally funded. Calculated as one hundredth of one percent (1 basis point = .0001 or .01%).. [optional] # noqa: E501 - externally_funded_fixed_fee (int, none_type): Fee in cents incurred for each individual `Transfer` that's card-based and externally funded.. [optional] # noqa: E501 - fixed_fee (int): Fee in cents incurred for each individual card-based `Transfer`.. [optional] # noqa: E501 - jcb_basis_points (int, none_type): Percentage-based fee incurred against the full amount of each JCB `Transfer`. Calculated as one hundredth of one percent (1 basis point = .0001 or .01%). [optional] # noqa: E501 - jcb_charge_interchange (bool, none_type): Set to **True** to incur interchange fees for JCB Transfers.. [optional] # noqa: E501 - jcb_fixed_fee (int, none_type): Fee in cents incurred for each individual JCB `Transfer`.. [optional] # noqa: E501 - mastercard_acquirer_fees_basis_points (int, none_type): The fee is assessed on a business’s gross MasterCard processing volume. This fee varies per acquirer based on MasterCard’s assessed charge as it’s distributed across the acquirer’s portfolio of merchants. Generally, this fee is a fraction of a basis point. For example, 0.0045%, 0.0075%, etc. are examples of a likely fee.. [optional] # noqa: E501 - mastercard_assessments_over1k_basis_points (int, none_type): Fee applied to Mastercard credit sale transactions greater than $1,000.. [optional] # noqa: E501 - mastercard_assessments_under1k_basis_points (int, none_type): Fee applied to Mastercard transactions less than or equal to $1,000.. [optional] # noqa: E501 - mastercard_basis_points (int, none_type): Percentage-based fee incurred against the full amount of each MasterCard `Transfer`. Calculated as one hundredth of one percent (1 basis point = .0001 or .01%). [optional] # noqa: E501 - mastercard_charge_interchange (bool, none_type): Set to **True** to incur interchange fees for MasterCard `Transfers`.. [optional] # noqa: E501 - mastercard_fixed_fee (int, none_type): Fee in cents incurred for each individual MasterCard `Transfer`.. [optional] # noqa: E501 - qualified_tiers ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type): The top of the qualified tier tree.. [optional] # noqa: E501 - rounding_mode (str): . [optional] # noqa: E501 - tags (Tags): [optional] # noqa: E501 - visa_acquirer_processing_fixed_fee (int, none_type): Applied to all U.S.-based credit card authorizations acquired in the U.S. regardless of where the issuer/cardholder is located. If your business is based in the U.S., the acquirer processing fee will apply to all Visa credit card authorizations. [optional] # noqa: E501 - visa_assessments_basis_points (int, none_type): Applies to all Visa credit transactions.. [optional] # noqa: E501 - visa_base_ii_credit_voucher_fixed_fee (int, none_type): Applies to all U.S.-based refunds.. [optional] # noqa: E501 - visa_base_ii_system_file_transmission_fixed_fee (int, none_type): Applies to all Visa transactions and is charged in addition to other transaction-based assessments.. [optional] # noqa: E501 - visa_basis_points (int, none_type): Percentage-based fee incurred against the full amount of each Visa `Transfer`. Calculated as one hundredth of one percent (1 basis point = .0001 or .01%). [optional] # noqa: E501 - visa_charge_interchange (bool, none_type): Set to **True** to incur interchange fees for Visa `Transfers`.. [optional] # noqa: E501 - visa_credit_voucher_fixed_fee (int, none_type): Applies to Visa refunds.. [optional] # noqa: E501 - visa_fixed_fee (int, none_type): Fee in cents incurred for each individual Visa `Transfer`.. [optional] # noqa: E501 - visa_kilobyte_access_fixed_fee (int, none_type): Charged on each authorization transaction submitted to Visa’s network for settlement.. [optional] # noqa: E501 - links (FeeProfileLinks): [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """FeeProfile - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - id (str): [optional] # noqa: E501 - created_at (datetime): Timestamp of when the object was created.. [optional] # noqa: E501 - updated_at (datetime): Timestamp of when the object was last updated.. [optional] # noqa: E501 - ach_basis_points (int): Percentage-based fee incurred against the full amount of an eCheck (also called ACH payments). Calculated as one hundredth of one percent (1 basis point = .0001 or .01%). [optional] # noqa: E501 - ach_credit_return_fixed_fee (int, none_type): A fixed amount in cents that will be charged to the merchant for processing an echeck (also called ACH payments) credit return.. [optional] # noqa: E501 - ach_debit_return_fixed_fee (int, none_type): A fixed amount in cents that will be charged to the merchant for processing an echeck (also called ACH payment) debit return.. [optional] # noqa: E501 - ach_fixed_fee (int): Fee in cents incurred for each individual `Transfer`.. [optional] # noqa: E501 - american_express_assessment_basis_points (int, none_type): Applies to gross American Express card volume.. [optional] # noqa: E501 - american_express_basis_points (int, none_type): Percentage-based fee incurred against the full amount of each American Express `Transfer`. Calculated as one hundredth of one percent (1 basis point = .0001 or .01%). [optional] # noqa: E501 - american_express_charge_interchange (bool, none_type): Set to **True** to incur interchange fees for American Express `Transfers`.. [optional] # noqa: E501 - american_express_fixed_fee (int, none_type): Fee in cents incurred for each individual American Express `Transfer`.. [optional] # noqa: E501 - american_express_externally_funded_basis_points (int, none_type): Percentage-based fee incurred against the full amount of each American Express externally funded `Transfer`. Calculated as one hundredth of one percent (1 basis point = .0001 or .01%). [optional] # noqa: E501 - american_express_externally_funded_fixed_fee (int, none_type): Fee in cents incurred for each individual American Express externally funded `Transfer`.. [optional] # noqa: E501 - ancillary_fixed_fee_primary (int, none_type): An additional fixed fee that can be charged per `Transfer`.. [optional] # noqa: E501 - ancillary_fixed_fee_secondary (int, none_type): An additional fixed fee that can be charged per `Transfer` if `ancillary_fixed_fee_primary` is included.. [optional] # noqa: E501 - application (str): The ID of the resource.. [optional] # noqa: E501 - basis_points (int): Percentage-based fee incurred against the full amount of each card-based `Transfer`. Calculated as one hundredth of one percent (1 basis point = .0001 or .01%). [optional] # noqa: E501 - charge_interchange (bool): Set to **True** to incur interchange fees for card-based `Transfers`.. [optional] # noqa: E501 - diners_club_basis_points (int, none_type): Percentage-based fee incurred against the full amount of each Diners `Transfer`. Calculated as one hundredth of one percent (1 basis point = .0001 or .01%).. [optional] # noqa: E501 - diners_club_charge_interchange (bool, none_type): Set to **True** to incur interchange fees for Diners `Transfers`.. [optional] # noqa: E501 - diners_club_fixed_fee (int, none_type): Fee in cents incurred for each individual Diners `Transfer`.. [optional] # noqa: E501 - discover_assessments_basis_points (int, none_type): Assessment applies to gross Discover card transaction volume.. [optional] # noqa: E501 - discover_basis_points (int, none_type): Percentage-based fee incurred against the full amount of each Discover `Transfer`. Calculated as one hundredth of one percent (1 basis point = .0001 or .01%). [optional] # noqa: E501 - discover_charge_interchange (bool, none_type): Set to **True** to incur interchange fees for Discover `Transfers`.. [optional] # noqa: E501 - discover_data_usage_fixed_fee (int, none_type): Applies to all U.S.-based `authorization` transactions.. [optional] # noqa: E501 - discover_fixed_fee (int, none_type): Fee in cents incurred for each individual Discover `Transfer`.. [optional] # noqa: E501 - discover_externally_funded_basis_points (int, none_type): Percentage-based fee incurred against the full amount of each Discover externally funded `Transfer`. Calculated as one hundredth of one percent (1 basis point = .0001 or .01%).. [optional] # noqa: E501 - discover_externally_funded_fixed_fee (int, none_type): Fee in cents incurred for each individual Discover externally funded `Transfer`.. [optional] # noqa: E501 - discover_network_authorization_fixed_fee (int, none_type): This fee applies to all Discover network `authorizations` and replaces the previously assessed Data Transmission.. [optional] # noqa: E501 - dispute_fixed_fee (int, none_type): Applied when a `dispute` is created or updated to a **PENDING** state.. [optional] # noqa: E501 - dispute_inquiry_fixed_fee (int, none_type): Applied when a `dispute` is created or updated to a **INQUIRY** state.. [optional] # noqa: E501 - externally_funded_basis_points (int, none_type): Percentage-based fee incurred against the full amount of each `Transfer` that's card-based and externally funded. Calculated as one hundredth of one percent (1 basis point = .0001 or .01%).. [optional] # noqa: E501 - externally_funded_fixed_fee (int, none_type): Fee in cents incurred for each individual `Transfer` that's card-based and externally funded.. [optional] # noqa: E501 - fixed_fee (int): Fee in cents incurred for each individual card-based `Transfer`.. [optional] # noqa: E501 - jcb_basis_points (int, none_type): Percentage-based fee incurred against the full amount of each JCB `Transfer`. Calculated as one hundredth of one percent (1 basis point = .0001 or .01%). [optional] # noqa: E501 - jcb_charge_interchange (bool, none_type): Set to **True** to incur interchange fees for JCB Transfers.. [optional] # noqa: E501 - jcb_fixed_fee (int, none_type): Fee in cents incurred for each individual JCB `Transfer`.. [optional] # noqa: E501 - mastercard_acquirer_fees_basis_points (int, none_type): The fee is assessed on a business’s gross MasterCard processing volume. This fee varies per acquirer based on MasterCard’s assessed charge as it’s distributed across the acquirer’s portfolio of merchants. Generally, this fee is a fraction of a basis point. For example, 0.0045%, 0.0075%, etc. are examples of a likely fee.. [optional] # noqa: E501 - mastercard_assessments_over1k_basis_points (int, none_type): Fee applied to Mastercard credit sale transactions greater than $1,000.. [optional] # noqa: E501 - mastercard_assessments_under1k_basis_points (int, none_type): Fee applied to Mastercard transactions less than or equal to $1,000.. [optional] # noqa: E501 - mastercard_basis_points (int, none_type): Percentage-based fee incurred against the full amount of each MasterCard `Transfer`. Calculated as one hundredth of one percent (1 basis point = .0001 or .01%). [optional] # noqa: E501 - mastercard_charge_interchange (bool, none_type): Set to **True** to incur interchange fees for MasterCard `Transfers`.. [optional] # noqa: E501 - mastercard_fixed_fee (int, none_type): Fee in cents incurred for each individual MasterCard `Transfer`.. [optional] # noqa: E501 - qualified_tiers ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type): The top of the qualified tier tree.. [optional] # noqa: E501 - rounding_mode (str): . [optional] # noqa: E501 - tags (Tags): [optional] # noqa: E501 - visa_acquirer_processing_fixed_fee (int, none_type): Applied to all U.S.-based credit card authorizations acquired in the U.S. regardless of where the issuer/cardholder is located. If your business is based in the U.S., the acquirer processing fee will apply to all Visa credit card authorizations. [optional] # noqa: E501 - visa_assessments_basis_points (int, none_type): Applies to all Visa credit transactions.. [optional] # noqa: E501 - visa_base_ii_credit_voucher_fixed_fee (int, none_type): Applies to all U.S.-based refunds.. [optional] # noqa: E501 - visa_base_ii_system_file_transmission_fixed_fee (int, none_type): Applies to all Visa transactions and is charged in addition to other transaction-based assessments.. [optional] # noqa: E501 - visa_basis_points (int, none_type): Percentage-based fee incurred against the full amount of each Visa `Transfer`. Calculated as one hundredth of one percent (1 basis point = .0001 or .01%). [optional] # noqa: E501 - visa_charge_interchange (bool, none_type): Set to **True** to incur interchange fees for Visa `Transfers`.. [optional] # noqa: E501 - visa_credit_voucher_fixed_fee (int, none_type): Applies to Visa refunds.. [optional] # noqa: E501 - visa_fixed_fee (int, none_type): Fee in cents incurred for each individual Visa `Transfer`.. [optional] # noqa: E501 - visa_kilobyte_access_fixed_fee (int, none_type): Charged on each authorization transaction submitted to Visa’s network for settlement.. [optional] # noqa: E501 - links (FeeProfileLinks): [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/finix/model/list_payment_instrument_updates_query_params.py b/finix/model/list_payment_instrument_updates_query_params.py deleted file mode 100644 index 3b45956..0000000 --- a/finix/model/list_payment_instrument_updates_query_params.py +++ /dev/null @@ -1,258 +0,0 @@ -""" - Finix API - - The version of the OpenAPI document: 2022-02-01 - Contact: support@finixpayments.com -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from finix.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from finix.exceptions import ApiAttributeError - - - -class ListPaymentInstrumentUpdatesQueryParams(ModelNormal): - """ - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'limit': (int,), # noqa: E501 - 'offset': (int,), # noqa: E501 - 'page_size': (int,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'limit': 'limit', # noqa: E501 - 'offset': 'offset', # noqa: E501 - 'page_size': 'pageSize', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """ListPaymentInstrumentUpdatesQueryParams - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - limit (int): The number of entries to return.. [optional] # noqa: E501 - offset (int): The number of items to skip before starting to collect the result set.. [optional] # noqa: E501 - page_size (int): The size of the page.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """ListPaymentInstrumentUpdatesQueryParams - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - limit (int): The number of entries to return.. [optional] # noqa: E501 - offset (int): The number of items to skip before starting to collect the result set.. [optional] # noqa: E501 - page_size (int): The size of the page.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/finix/model/messages.py b/finix/model/messages.py deleted file mode 100644 index 793a9c3..0000000 --- a/finix/model/messages.py +++ /dev/null @@ -1,273 +0,0 @@ -""" - Finix API - - The version of the OpenAPI document: 2022-02-01 - Contact: support@finixpayments.com -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from finix.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from finix.exceptions import ApiAttributeError - - - -class Messages(ModelSimple): - """ - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - additional_properties_type = None - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'value': ([str],), - } - - @cached_property - def discriminator(): - return None - - - attribute_map = {} - - read_only_vars = set() - - _composed_schemas = None - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): - """Messages - a model defined in OpenAPI - - Note that value can be passed either in args or in kwargs, but not in both. - - Args: - args[0] ([str]): Message field that provides additional details. This field is typically **null**.. # noqa: E501 - - Keyword Args: - value ([str]): Message field that provides additional details. This field is typically **null**.. # noqa: E501 - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - # required up here when default value is not given - _path_to_item = kwargs.pop('_path_to_item', ()) - - if 'value' in kwargs: - value = kwargs.pop('value') - elif args: - args = list(args) - value = args.pop(0) - else: - raise ApiTypeError( - "value is required, but not passed in args or kwargs and doesn't have default", - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - self.value = value - if kwargs: - raise ApiTypeError( - "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( - kwargs, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): - """Messages - a model defined in OpenAPI - - Note that value can be passed either in args or in kwargs, but not in both. - - Args: - args[0] ([str]): Message field that provides additional details. This field is typically **null**.. # noqa: E501 - - Keyword Args: - value ([str]): Message field that provides additional details. This field is typically **null**.. # noqa: E501 - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - # required up here when default value is not given - _path_to_item = kwargs.pop('_path_to_item', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if 'value' in kwargs: - value = kwargs.pop('value') - elif args: - args = list(args) - value = args.pop(0) - else: - raise ApiTypeError( - "value is required, but not passed in args or kwargs and doesn't have default", - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - self.value = value - if kwargs: - raise ApiTypeError( - "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( - kwargs, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - return self diff --git a/finix/model/name.py b/finix/model/name.py deleted file mode 100644 index 7baa7bd..0000000 --- a/finix/model/name.py +++ /dev/null @@ -1,262 +0,0 @@ -""" - Finix API - - The version of the OpenAPI document: 2022-02-01 - Contact: support@finixpayments.com -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from finix.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from finix.exceptions import ApiAttributeError - - - -class Name(ModelNormal): - """ - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'first_name': (str,), # noqa: E501 - 'full_name': (str,), # noqa: E501 - 'last_name': (str,), # noqa: E501 - 'value': (str,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'first_name': 'first_name', # noqa: E501 - 'full_name': 'full_name', # noqa: E501 - 'last_name': 'last_name', # noqa: E501 - 'value': 'value', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """Name - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - first_name (str): The first name of the `Payment Instrument` owner.. [optional] # noqa: E501 - full_name (str): The full name of the `Payment Instrument` owner.. [optional] # noqa: E501 - last_name (str): The last name of the `Payment Instrument` owner.. [optional] # noqa: E501 - value (str): [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """Name - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - first_name (str): The first name of the `Payment Instrument` owner.. [optional] # noqa: E501 - full_name (str): The full name of the `Payment Instrument` owner.. [optional] # noqa: E501 - last_name (str): The last name of the `Payment Instrument` owner.. [optional] # noqa: E501 - value (str): [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/finix/model/processor_application_config.py b/finix/model/processor_application_config.py deleted file mode 100644 index a9cbfb3..0000000 --- a/finix/model/processor_application_config.py +++ /dev/null @@ -1,1385 +0,0 @@ -""" - Finix API - - The version of the OpenAPI document: 2022-02-01 - Contact: support@finixpayments.com -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from finix.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from finix.exceptions import ApiAttributeError - - -def lazy_import(): - from finix.model.country import Country - from finix.model.currency import Currency - from finix.model.processor_application_config_configuration_templates import ProcessorApplicationConfigConfigurationTemplates - globals()['Country'] = Country - globals()['Currency'] = Currency - globals()['ProcessorApplicationConfigConfigurationTemplates'] = ProcessorApplicationConfigConfigurationTemplates - - -class ProcessorApplicationConfig(ModelNormal): - """ - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - ('allowed_business_application_ids',): { - 'AA': "AA", - 'BB': "BB", - 'BI': "BI", - 'CP': "CP", - 'FD': "FD", - 'FT': "FT", - 'GD': "GD", - 'GP': "GP", - 'LO': "LO", - 'CI': "CI", - 'CO': "CO", - 'MP': "MP", - 'MD': "MD", - 'OG': "OG", - 'PD': "PD", - 'PP': "PP", - 'TU': "TU", - 'WT': "WT", - }, - ('default_mcc',): { - '0742': "0742", - '0763': "0763", - '0780': "0780", - '1520': "1520", - '1711': "1711", - '1731': "1731", - '1740': "1740", - '1750': "1750", - '1761': "1761", - '1771': "1771", - '1799': "1799", - '2741': "2741", - '2791': "2791", - '2842': "2842", - '3000': "3000", - '3001': "3001", - '3002': "3002", - '3003': "3003", - '3004': "3004", - '3005': "3005", - '3006': "3006", - '3007': "3007", - '3008': "3008", - '3009': "3009", - '3010': "3010", - '3011': "3011", - '3012': "3012", - '3013': "3013", - '3014': "3014", - '3015': "3015", - '3016': "3016", - '3017': "3017", - '3018': "3018", - '3019': "3019", - '3020': "3020", - '3021': "3021", - '3022': "3022", - '3023': "3023", - '3024': "3024", - '3025': "3025", - '3026': "3026", - '3027': "3027", - '3028': "3028", - '3029': "3029", - '3030': "3030", - '3031': "3031", - '3032': "3032", - '3033': "3033", - '3034': "3034", - '3035': "3035", - '3036': "3036", - '3037': "3037", - '3038': "3038", - '3039': "3039", - '3040': "3040", - '3041': "3041", - '3042': "3042", - '3043': "3043", - '3044': "3044", - '3045': "3045", - '3046': "3046", - '3047': "3047", - '3048': "3048", - '3049': "3049", - '3050': "3050", - '3051': "3051", - '3052': "3052", - '3053': "3053", - '3054': "3054", - '3055': "3055", - '3056': "3056", - '3057': "3057", - '3058': "3058", - '3059': "3059", - '3060': "3060", - '3061': "3061", - '3062': "3062", - '3063': "3063", - '3064': "3064", - '3065': "3065", - '3066': "3066", - '3067': "3067", - '3068': "3068", - '3069': "3069", - '3070': "3070", - '3071': "3071", - '3072': "3072", - '3073': "3073", - '3074': "3074", - '3075': "3075", - '3076': "3076", - '3077': "3077", - '3078': "3078", - '3079': "3079", - '3080': "3080", - '3081': "3081", - '3082': "3082", - '3083': "3083", - '3084': "3084", - '3085': "3085", - '3086': "3086", - '3087': "3087", - '3088': "3088", - '3089': "3089", - '3090': "3090", - '3091': "3091", - '3092': "3092", - '3093': "3093", - '3094': "3094", - '3095': "3095", - '3096': "3096", - '3097': "3097", - '3098': "3098", - '3099': "3099", - '3100': "3100", - '3101': "3101", - '3102': "3102", - '3103': "3103", - '3104': "3104", - '3105': "3105", - '3106': "3106", - '3107': "3107", - '3108': "3108", - '3109': "3109", - '3110': "3110", - '3111': "3111", - '3112': "3112", - '3113': "3113", - '3114': "3114", - '3115': "3115", - '3116': "3116", - '3117': "3117", - '3118': "3118", - '3119': "3119", - '3120': "3120", - '3121': "3121", - '3122': "3122", - '3123': "3123", - '3124': "3124", - '3125': "3125", - '3126': "3126", - '3127': "3127", - '3128': "3128", - '3129': "3129", - '3130': "3130", - '3131': "3131", - '3132': "3132", - '3133': "3133", - '3134': "3134", - '3135': "3135", - '3136': "3136", - '3137': "3137", - '3138': "3138", - '3139': "3139", - '3140': "3140", - '3141': "3141", - '3142': "3142", - '3143': "3143", - '3144': "3144", - '3145': "3145", - '3146': "3146", - '3147': "3147", - '3148': "3148", - '3149': "3149", - '3150': "3150", - '3151': "3151", - '3152': "3152", - '3153': "3153", - '3154': "3154", - '3155': "3155", - '3156': "3156", - '3157': "3157", - '3158': "3158", - '3159': "3159", - '3160': "3160", - '3161': "3161", - '3162': "3162", - '3163': "3163", - '3164': "3164", - '3165': "3165", - '3166': "3166", - '3167': "3167", - '3168': "3168", - '3169': "3169", - '3170': "3170", - '3171': "3171", - '3172': "3172", - '3173': "3173", - '3174': "3174", - '3175': "3175", - '3176': "3176", - '3177': "3177", - '3178': "3178", - '3179': "3179", - '3180': "3180", - '3181': "3181", - '3182': "3182", - '3183': "3183", - '3184': "3184", - '3185': "3185", - '3186': "3186", - '3187': "3187", - '3188': "3188", - '3189': "3189", - '3190': "3190", - '3191': "3191", - '3192': "3192", - '3193': "3193", - '3194': "3194", - '3195': "3195", - '3196': "3196", - '3197': "3197", - '3198': "3198", - '3199': "3199", - '3200': "3200", - '3201': "3201", - '3202': "3202", - '3203': "3203", - '3204': "3204", - '3205': "3205", - '3206': "3206", - '3207': "3207", - '3208': "3208", - '3209': "3209", - '3210': "3210", - '3211': "3211", - '3212': "3212", - '3213': "3213", - '3214': "3214", - '3215': "3215", - '3216': "3216", - '3217': "3217", - '3218': "3218", - '3219': "3219", - '3220': "3220", - '3221': "3221", - '3222': "3222", - '3223': "3223", - '3224': "3224", - '3225': "3225", - '3226': "3226", - '3227': "3227", - '3228': "3228", - '3229': "3229", - '3230': "3230", - '3231': "3231", - '3232': "3232", - '3233': "3233", - '3234': "3234", - '3235': "3235", - '3236': "3236", - '3237': "3237", - '3238': "3238", - '3239': "3239", - '3240': "3240", - '3241': "3241", - '3242': "3242", - '3243': "3243", - '3244': "3244", - '3245': "3245", - '3246': "3246", - '3247': "3247", - '3248': "3248", - '3249': "3249", - '3250': "3250", - '3251': "3251", - '3252': "3252", - '3253': "3253", - '3254': "3254", - '3255': "3255", - '3256': "3256", - '3257': "3257", - '3258': "3258", - '3259': "3259", - '3260': "3260", - '3261': "3261", - '3262': "3262", - '3263': "3263", - '3264': "3264", - '3265': "3265", - '3266': "3266", - '3267': "3267", - '3268': "3268", - '3269': "3269", - '3270': "3270", - '3271': "3271", - '3272': "3272", - '3273': "3273", - '3274': "3274", - '3275': "3275", - '3276': "3276", - '3277': "3277", - '3278': "3278", - '3279': "3279", - '3280': "3280", - '3281': "3281", - '3282': "3282", - '3283': "3283", - '3284': "3284", - '3285': "3285", - '3286': "3286", - '3287': "3287", - '3288': "3288", - '3289': "3289", - '3290': "3290", - '3291': "3291", - '3292': "3292", - '3293': "3293", - '3294': "3294", - '3295': "3295", - '3296': "3296", - '3297': "3297", - '3298': "3298", - '3299': "3299", - '3351': "3351", - '3352': "3352", - '3353': "3353", - '3354': "3354", - '3355': "3355", - '3356': "3356", - '3357': "3357", - '3358': "3358", - '3359': "3359", - '3360': "3360", - '3361': "3361", - '3362': "3362", - '3363': "3363", - '3364': "3364", - '3365': "3365", - '3366': "3366", - '3367': "3367", - '3368': "3368", - '3369': "3369", - '3370': "3370", - '3371': "3371", - '3372': "3372", - '3373': "3373", - '3374': "3374", - '3375': "3375", - '3376': "3376", - '3377': "3377", - '3378': "3378", - '3379': "3379", - '3380': "3380", - '3381': "3381", - '3382': "3382", - '3383': "3383", - '3384': "3384", - '3385': "3385", - '3386': "3386", - '3387': "3387", - '3388': "3388", - '3389': "3389", - '3390': "3390", - '3391': "3391", - '3392': "3392", - '3393': "3393", - '3394': "3394", - '3395': "3395", - '3396': "3396", - '3397': "3397", - '3398': "3398", - '3399': "3399", - '3400': "3400", - '3401': "3401", - '3402': "3402", - '3403': "3403", - '3404': "3404", - '3405': "3405", - '3406': "3406", - '3407': "3407", - '3408': "3408", - '3409': "3409", - '3410': "3410", - '3411': "3411", - '3412': "3412", - '3413': "3413", - '3414': "3414", - '3415': "3415", - '3416': "3416", - '3417': "3417", - '3418': "3418", - '3419': "3419", - '3420': "3420", - '3421': "3421", - '3422': "3422", - '3423': "3423", - '3424': "3424", - '3425': "3425", - '3426': "3426", - '3427': "3427", - '3428': "3428", - '3429': "3429", - '3430': "3430", - '3431': "3431", - '3432': "3432", - '3433': "3433", - '3434': "3434", - '3435': "3435", - '3436': "3436", - '3437': "3437", - '3438': "3438", - '3439': "3439", - '3440': "3440", - '3441': "3441", - '3501': "3501", - '3502': "3502", - '3503': "3503", - '3504': "3504", - '3505': "3505", - '3506': "3506", - '3507': "3507", - '3508': "3508", - '3509': "3509", - '3510': "3510", - '3511': "3511", - '3512': "3512", - '3513': "3513", - '3514': "3514", - '3515': "3515", - '3516': "3516", - '3517': "3517", - '3518': "3518", - '3519': "3519", - '3520': "3520", - '3521': "3521", - '3522': "3522", - '3523': "3523", - '3524': "3524", - '3525': "3525", - '3526': "3526", - '3527': "3527", - '3528': "3528", - '3529': "3529", - '3530': "3530", - '3531': "3531", - '3532': "3532", - '3533': "3533", - '3534': "3534", - '3535': "3535", - '3536': "3536", - '3537': "3537", - '3538': "3538", - '3539': "3539", - '3540': "3540", - '3541': "3541", - '3542': "3542", - '3543': "3543", - '3544': "3544", - '3545': "3545", - '3546': "3546", - '3547': "3547", - '3548': "3548", - '3549': "3549", - '3550': "3550", - '3551': "3551", - '3552': "3552", - '3553': "3553", - '3554': "3554", - '3555': "3555", - '3556': "3556", - '3557': "3557", - '3558': "3558", - '3559': "3559", - '3560': "3560", - '3561': "3561", - '3562': "3562", - '3563': "3563", - '3564': "3564", - '3565': "3565", - '3566': "3566", - '3567': "3567", - '3568': "3568", - '3569': "3569", - '3570': "3570", - '3571': "3571", - '3572': "3572", - '3573': "3573", - '3574': "3574", - '3575': "3575", - '3576': "3576", - '3577': "3577", - '3578': "3578", - '3579': "3579", - '3580': "3580", - '3581': "3581", - '3582': "3582", - '3583': "3583", - '3584': "3584", - '3585': "3585", - '3586': "3586", - '3587': "3587", - '3588': "3588", - '3589': "3589", - '3590': "3590", - '3591': "3591", - '3592': "3592", - '3593': "3593", - '3594': "3594", - '3595': "3595", - '3596': "3596", - '3597': "3597", - '3598': "3598", - '3599': "3599", - '3600': "3600", - '3601': "3601", - '3602': "3602", - '3603': "3603", - '3604': "3604", - '3605': "3605", - '3606': "3606", - '3607': "3607", - '3608': "3608", - '3609': "3609", - '3610': "3610", - '3611': "3611", - '3612': "3612", - '3613': "3613", - '3614': "3614", - '3615': "3615", - '3616': "3616", - '3617': "3617", - '3618': "3618", - '3619': "3619", - '3620': "3620", - '3621': "3621", - '3622': "3622", - '3623': "3623", - '3624': "3624", - '3625': "3625", - '3626': "3626", - '3627': "3627", - '3628': "3628", - '3629': "3629", - '3630': "3630", - '3631': "3631", - '3632': "3632", - '3633': "3633", - '3634': "3634", - '3635': "3635", - '3636': "3636", - '3637': "3637", - '3638': "3638", - '3639': "3639", - '3640': "3640", - '3641': "3641", - '3642': "3642", - '3643': "3643", - '3644': "3644", - '3645': "3645", - '3646': "3646", - '3647': "3647", - '3648': "3648", - '3649': "3649", - '3650': "3650", - '3651': "3651", - '3652': "3652", - '3653': "3653", - '3654': "3654", - '3655': "3655", - '3656': "3656", - '3657': "3657", - '3658': "3658", - '3659': "3659", - '3660': "3660", - '3661': "3661", - '3662': "3662", - '3663': "3663", - '3664': "3664", - '3665': "3665", - '3666': "3666", - '3667': "3667", - '3668': "3668", - '3669': "3669", - '3670': "3670", - '3671': "3671", - '3672': "3672", - '3673': "3673", - '3674': "3674", - '3675': "3675", - '3676': "3676", - '3677': "3677", - '3678': "3678", - '3679': "3679", - '3680': "3680", - '3681': "3681", - '3682': "3682", - '3683': "3683", - '3684': "3684", - '3685': "3685", - '3686': "3686", - '3687': "3687", - '3688': "3688", - '3689': "3689", - '3690': "3690", - '3691': "3691", - '3692': "3692", - '3693': "3693", - '3694': "3694", - '3695': "3695", - '3696': "3696", - '3697': "3697", - '3698': "3698", - '3699': "3699", - '3700': "3700", - '3701': "3701", - '3702': "3702", - '3703': "3703", - '3704': "3704", - '3705': "3705", - '3706': "3706", - '3707': "3707", - '3708': "3708", - '3709': "3709", - '3710': "3710", - '3711': "3711", - '3712': "3712", - '3713': "3713", - '3714': "3714", - '3715': "3715", - '3716': "3716", - '3717': "3717", - '3718': "3718", - '3719': "3719", - '3720': "3720", - '3721': "3721", - '3722': "3722", - '3723': "3723", - '3724': "3724", - '3725': "3725", - '3726': "3726", - '3727': "3727", - '3728': "3728", - '3729': "3729", - '3730': "3730", - '3731': "3731", - '3732': "3732", - '3733': "3733", - '3734': "3734", - '3735': "3735", - '3736': "3736", - '3737': "3737", - '3738': "3738", - '3739': "3739", - '3740': "3740", - '3741': "3741", - '3742': "3742", - '3743': "3743", - '3744': "3744", - '3745': "3745", - '3746': "3746", - '3747': "3747", - '3748': "3748", - '3749': "3749", - '3750': "3750", - '3751': "3751", - '3752': "3752", - '3753': "3753", - '3754': "3754", - '3755': "3755", - '3756': "3756", - '3757': "3757", - '3758': "3758", - '3759': "3759", - '3760': "3760", - '3761': "3761", - '3762': "3762", - '3763': "3763", - '3764': "3764", - '3765': "3765", - '3766': "3766", - '3767': "3767", - '3768': "3768", - '3769': "3769", - '3770': "3770", - '3771': "3771", - '3772': "3772", - '3773': "3773", - '3774': "3774", - '3775': "3775", - '3776': "3776", - '3777': "3777", - '3778': "3778", - '3779': "3779", - '3780': "3780", - '3781': "3781", - '3782': "3782", - '3783': "3783", - '3784': "3784", - '3785': "3785", - '3786': "3786", - '3787': "3787", - '3788': "3788", - '3789': "3789", - '3790': "3790", - '3816': "3816", - '3835': "3835", - '4011': "4011", - '4111': "4111", - '4112': "4112", - '4119': "4119", - '4121': "4121", - '4131': "4131", - '4214': "4214", - '4215': "4215", - '4225': "4225", - '4411': "4411", - '4457': "4457", - '4468': "4468", - '4511': "4511", - '4582': "4582", - '4722': "4722", - '4723': "4723", - '4784': "4784", - '4789': "4789", - '4812': "4812", - '4814': "4814", - '4815': "4815", - '4816': "4816", - '4821': "4821", - '4829': "4829", - '4899': "4899", - '4900': "4900", - '5013': "5013", - '5021': "5021", - '5039': "5039", - '5044': "5044", - '5045': "5045", - '5046': "5046", - '5047': "5047", - '5051': "5051", - '5065': "5065", - '5072': "5072", - '5074': "5074", - '5085': "5085", - '5094': "5094", - '5099': "5099", - '5111': "5111", - '5122': "5122", - '5131': "5131", - '5137': "5137", - '5139': "5139", - '5169': "5169", - '5172': "5172", - '5192': "5192", - '5193': "5193", - '5198': "5198", - '5199': "5199", - '5200': "5200", - '5211': "5211", - '5231': "5231", - '5251': "5251", - '5261': "5261", - '5271': "5271", - '5300': "5300", - '5309': "5309", - '5310': "5310", - '5311': "5311", - '5331': "5331", - '5399': "5399", - '5411': "5411", - '5422': "5422", - '5441': "5441", - '5451': "5451", - '5462': "5462", - '5499': "5499", - '5511': "5511", - '5521': "5521", - '5531': "5531", - '5532': "5532", - '5533': "5533", - '5541': "5541", - '5542': "5542", - '5551': "5551", - '5561': "5561", - '5571': "5571", - '5592': "5592", - '5598': "5598", - '5599': "5599", - '5611': "5611", - '5621': "5621", - '5631': "5631", - '5641': "5641", - '5651': "5651", - '5655': "5655", - '5661': "5661", - '5681': "5681", - '5691': "5691", - '5697': "5697", - '5698': "5698", - '5699': "5699", - '5712': "5712", - '5713': "5713", - '5714': "5714", - '5718': "5718", - '5719': "5719", - '5722': "5722", - '5732': "5732", - '5733': "5733", - '5734': "5734", - '5735': "5735", - '5811': "5811", - '5812': "5812", - '5813': "5813", - '5814': "5814", - '5815': "5815", - '5816': "5816", - '5817': "5817", - '5818': "5818", - '5832': "5832", - '5912': "5912", - '5921': "5921", - '5931': "5931", - '5932': "5932", - '5933': "5933", - '5935': "5935", - '5937': "5937", - '5940': "5940", - '5941': "5941", - '5942': "5942", - '5943': "5943", - '5944': "5944", - '5945': "5945", - '5946': "5946", - '5947': "5947", - '5948': "5948", - '5949': "5949", - '5950': "5950", - '5960': "5960", - '5961': "5961", - '5962': "5962", - '5963': "5963", - '5964': "5964", - '5965': "5965", - '5966': "5966", - '5967': "5967", - '5968': "5968", - '5969': "5969", - '5970': "5970", - '5971': "5971", - '5972': "5972", - '5973': "5973", - '5975': "5975", - '5976': "5976", - '5977': "5977", - '5978': "5978", - '5983': "5983", - '5992': "5992", - '5993': "5993", - '5994': "5994", - '5995': "5995", - '5996': "5996", - '5997': "5997", - '5998': "5998", - '5999': "5999", - '6010': "6010", - '6011': "6011", - '6012': "6012", - '6051': "6051", - '6211': "6211", - '6300': "6300", - '6381': "6381", - '6399': "6399", - '6513': "6513", - '7011': "7011", - '7012': "7012", - '7032': "7032", - '7033': "7033", - '7210': "7210", - '7211': "7211", - '7216': "7216", - '7217': "7217", - '7221': "7221", - '7230': "7230", - '7251': "7251", - '7261': "7261", - '7273': "7273", - '7276': "7276", - '7277': "7277", - '7278': "7278", - '7296': "7296", - '7297': "7297", - '7298': "7298", - '7299': "7299", - '7311': "7311", - '7321': "7321", - '7332': "7332", - '7333': "7333", - '7338': "7338", - '7339': "7339", - '7342': "7342", - '7349': "7349", - '7361': "7361", - '7372': "7372", - '7375': "7375", - '7379': "7379", - '7392': "7392", - '7393': "7393", - '7394': "7394", - '7395': "7395", - '7399': "7399", - '7511': "7511", - '7512': "7512", - '7513': "7513", - '7519': "7519", - '7523': "7523", - '7531': "7531", - '7534': "7534", - '7535': "7535", - '7538': "7538", - '7542': "7542", - '7549': "7549", - '7622': "7622", - '7623': "7623", - '7629': "7629", - '7631': "7631", - '7641': "7641", - '7692': "7692", - '7699': "7699", - '7800': "7800", - '7801': "7801", - '7802': "7802", - '7829': "7829", - '7832': "7832", - '7841': "7841", - '7911': "7911", - '7922': "7922", - '7929': "7929", - '7932': "7932", - '7933': "7933", - '7941': "7941", - '7991': "7991", - '7992': "7992", - '7993': "7993", - '7994': "7994", - '7995': "7995", - '7996': "7996", - '7997': "7997", - '7998': "7998", - '7999': "7999", - '8011': "8011", - '8021': "8021", - '8031': "8031", - '8041': "8041", - '8042': "8042", - '8043': "8043", - '8044': "8044", - '8049': "8049", - '8050': "8050", - '8062': "8062", - '8071': "8071", - '8099': "8099", - '8111': "8111", - '8211': "8211", - '8220': "8220", - '8241': "8241", - '8244': "8244", - '8249': "8249", - '8299': "8299", - '8351': "8351", - '8398': "8398", - '8641': "8641", - '8651': "8651", - '8661': "8661", - '8675': "8675", - '8699': "8699", - '8734': "8734", - '8911': "8911", - '8931': "8931", - '8999': "8999", - '9211': "9211", - '9222': "9222", - '9223': "9223", - '9311': "9311", - '9399': "9399", - '9402': "9402", - '9405': "9405", - '9700': "9700", - '9701': "9701", - '9702': "9702", - '9950': "9950", - }, - ('moto_eciindicator',): { - '5': "5", - '6': "6", - '7': "7", - '8': "8", - }, - ('pan_entry_mode',): { - '00': "00", - '01': "01", - '02': "02", - '03': "03", - '04': "04", - '05': "05", - '06': "06", - '07': "07", - '08': "08", - '09': "09", - '10': "10", - '80': "80", - '82': "82", - '83': "83", - '90': "90", - '91': "91", - '95': "95", - }, - ('pos_condition_code',): { - '00': "00", - '01': "01", - '02': "02", - '03': "03", - '05': "05", - '06': "06", - '08': "08", - '10': "10", - '51': "51", - '59': "59", - '71': "71", - '73': "73", - }, - } - - validations = { - ('ach_settlement_delay_days',): { - 'inclusive_minimum': 0, - }, - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = True - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'ach_settlement_delay_days': (int, none_type,), # noqa: E501 - 'allow_split_payouts': (bool,), # noqa: E501 - 'allowed_business_application_ids': ([str],), # noqa: E501 - 'card_acceptor_id_code': (str,), # noqa: E501 - 'card_acceptor_terminal_id': (str,), # noqa: E501 - 'configuration_templates': (ProcessorApplicationConfigConfigurationTemplates,), # noqa: E501 - 'default_currencies': ([Currency],), # noqa: E501 - 'default_mcc': (str,), # noqa: E501 - 'default_sender_account_number': (str, none_type,), # noqa: E501 - 'default_sender_address': (str, none_type,), # noqa: E501 - 'default_sender_city': (str, none_type,), # noqa: E501 - 'default_sender_country': (Country,), # noqa: E501 - 'default_sender_country_code': (str, none_type,), # noqa: E501 - 'default_sender_county_code': (str, none_type,), # noqa: E501 - 'default_sender_name': (str, none_type,), # noqa: E501 - 'default_sender_state_code': (str, none_type,), # noqa: E501 - 'default_sender_zip_code': (str, none_type,), # noqa: E501 - 'include_colombia_data': (bool,), # noqa: E501 - 'moto_eciindicator': (str,), # noqa: E501 - 'pan_entry_mode': (str,), # noqa: E501 - 'pos_condition_code': (str,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'ach_settlement_delay_days': 'ach_settlement_delay_days', # noqa: E501 - 'allow_split_payouts': 'allow_split_payouts', # noqa: E501 - 'allowed_business_application_ids': 'allowed_business_application_ids', # noqa: E501 - 'card_acceptor_id_code': 'card_acceptor_id_code', # noqa: E501 - 'card_acceptor_terminal_id': 'card_acceptor_terminal_id', # noqa: E501 - 'configuration_templates': 'configuration_templates', # noqa: E501 - 'default_currencies': 'default_currencies', # noqa: E501 - 'default_mcc': 'default_mcc', # noqa: E501 - 'default_sender_account_number': 'default_sender_account_number', # noqa: E501 - 'default_sender_address': 'default_sender_address', # noqa: E501 - 'default_sender_city': 'default_sender_city', # noqa: E501 - 'default_sender_country': 'default_sender_country', # noqa: E501 - 'default_sender_country_code': 'default_sender_country_code', # noqa: E501 - 'default_sender_county_code': 'default_sender_county_code', # noqa: E501 - 'default_sender_name': 'default_sender_name', # noqa: E501 - 'default_sender_state_code': 'default_sender_state_code', # noqa: E501 - 'default_sender_zip_code': 'default_sender_zip_code', # noqa: E501 - 'include_colombia_data': 'include_colombia_data', # noqa: E501 - 'moto_eciindicator': 'moto_eciindicator', # noqa: E501 - 'pan_entry_mode': 'pan_entry_mode', # noqa: E501 - 'pos_condition_code': 'pos_condition_code', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """ProcessorApplicationConfig - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - ach_settlement_delay_days (int, none_type): Details how days ACH settlments are delayed by.. [optional] # noqa: E501 - allow_split_payouts (bool): Details if the `Processor` allows split payouts to `Merchants`.. [optional] # noqa: E501 - allowed_business_application_ids ([str]): Identifies the `Processors` business application type for VisaNet transaction processing.. [optional] # noqa: E501 - card_acceptor_id_code (str): An ID for the card acceptor (e.g Visa). . [optional] # noqa: E501 - card_acceptor_terminal_id (str): The ID for the terminal at a card acceptor location.. [optional] # noqa: E501 - configuration_templates (ProcessorApplicationConfigConfigurationTemplates): [optional] # noqa: E501 - default_currencies ([Currency]): ISO 4217 3 letter currency code.. [optional] # noqa: E501 - default_mcc (str): The Merchant Category Code of the `Merchan. . [optional] # noqa: E501 - default_sender_account_number (str, none_type): The default account of the sender.. [optional] # noqa: E501 - default_sender_address (str, none_type): The sender’s address.. [optional] # noqa: E501 - default_sender_city (str, none_type): The city saved in the sender's address.. [optional] # noqa: E501 - default_sender_country (Country): [optional] # noqa: E501 - default_sender_country_code (str, none_type): The sender's 3 letter ISO 4217 currency code.. [optional] # noqa: E501 - default_sender_county_code (str, none_type): The sender’s county.. [optional] # noqa: E501 - default_sender_name (str, none_type): The sender’s name.. [optional] # noqa: E501 - default_sender_state_code (str, none_type): The sender's 2-letter State code.. [optional] # noqa: E501 - default_sender_zip_code (str, none_type): The sender’s zip code.. [optional] # noqa: E501 - include_colombia_data (bool): Must be true if transactions are in Colombia where there are different fees.. [optional] # noqa: E501 - moto_eciindicator (str): Identifies the level of security used in an electronic commerce transaction (only applies to card-present transactions).. [optional] # noqa: E501 - pan_entry_mode (str): A 2-digit code that identifies the method used to enter the cardholder account number and card expiration date (only applies to card-present transactions).. [optional] # noqa: E501 - pos_condition_code (str): Contains a code identifying transaction conditions at the point of sale or point of service (only applies to card-present transactions).. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """ProcessorApplicationConfig - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - ach_settlement_delay_days (int, none_type): Details how days ACH settlments are delayed by.. [optional] # noqa: E501 - allow_split_payouts (bool): Details if the `Processor` allows split payouts to `Merchants`.. [optional] # noqa: E501 - allowed_business_application_ids ([str]): Identifies the `Processors` business application type for VisaNet transaction processing.. [optional] # noqa: E501 - card_acceptor_id_code (str): An ID for the card acceptor (e.g Visa). . [optional] # noqa: E501 - card_acceptor_terminal_id (str): The ID for the terminal at a card acceptor location.. [optional] # noqa: E501 - configuration_templates (ProcessorApplicationConfigConfigurationTemplates): [optional] # noqa: E501 - default_currencies ([Currency]): ISO 4217 3 letter currency code.. [optional] # noqa: E501 - default_mcc (str): The Merchant Category Code of the `Merchan. . [optional] # noqa: E501 - default_sender_account_number (str, none_type): The default account of the sender.. [optional] # noqa: E501 - default_sender_address (str, none_type): The sender’s address.. [optional] # noqa: E501 - default_sender_city (str, none_type): The city saved in the sender's address.. [optional] # noqa: E501 - default_sender_country (Country): [optional] # noqa: E501 - default_sender_country_code (str, none_type): The sender's 3 letter ISO 4217 currency code.. [optional] # noqa: E501 - default_sender_county_code (str, none_type): The sender’s county.. [optional] # noqa: E501 - default_sender_name (str, none_type): The sender’s name.. [optional] # noqa: E501 - default_sender_state_code (str, none_type): The sender's 2-letter State code.. [optional] # noqa: E501 - default_sender_zip_code (str, none_type): The sender’s zip code.. [optional] # noqa: E501 - include_colombia_data (bool): Must be true if transactions are in Colombia where there are different fees.. [optional] # noqa: E501 - moto_eciindicator (str): Identifies the level of security used in an electronic commerce transaction (only applies to card-present transactions).. [optional] # noqa: E501 - pan_entry_mode (str): A 2-digit code that identifies the method used to enter the cardholder account number and card expiration date (only applies to card-present transactions).. [optional] # noqa: E501 - pos_condition_code (str): Contains a code identifying transaction conditions at the point of sale or point of service (only applies to card-present transactions).. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/finix/model/update_subscription_amount_request.py b/finix/model/update_subscription_amount_request.py deleted file mode 100644 index b5ea363..0000000 --- a/finix/model/update_subscription_amount_request.py +++ /dev/null @@ -1,273 +0,0 @@ -""" - Finix API - - The version of the OpenAPI document: 2022-02-01 - Contact: support@finixpayments.com -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from finix.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from finix.exceptions import ApiAttributeError - - - -class UpdateSubscriptionAmountRequest(ModelSimple): - """ - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - additional_properties_type = None - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'value': (CreateSubscriptionAmountRequest,), - } - - @cached_property - def discriminator(): - return None - - - attribute_map = {} - - read_only_vars = set() - - _composed_schemas = None - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): - """UpdateSubscriptionAmountRequest - a model defined in OpenAPI - - Note that value can be passed either in args or in kwargs, but not in both. - - Args: - args[0] (CreateSubscriptionAmountRequest): # noqa: E501 - - Keyword Args: - value (CreateSubscriptionAmountRequest): # noqa: E501 - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - # required up here when default value is not given - _path_to_item = kwargs.pop('_path_to_item', ()) - - if 'value' in kwargs: - value = kwargs.pop('value') - elif args: - args = list(args) - value = args.pop(0) - else: - raise ApiTypeError( - "value is required, but not passed in args or kwargs and doesn't have default", - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - self.value = value - if kwargs: - raise ApiTypeError( - "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( - kwargs, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): - """UpdateSubscriptionAmountRequest - a model defined in OpenAPI - - Note that value can be passed either in args or in kwargs, but not in both. - - Args: - args[0] (CreateSubscriptionAmountRequest): # noqa: E501 - - Keyword Args: - value (CreateSubscriptionAmountRequest): # noqa: E501 - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - # required up here when default value is not given - _path_to_item = kwargs.pop('_path_to_item', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if 'value' in kwargs: - value = kwargs.pop('value') - elif args: - args = list(args) - value = args.pop(0) - else: - raise ApiTypeError( - "value is required, but not passed in args or kwargs and doesn't have default", - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - self.value = value - if kwargs: - raise ApiTypeError( - "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( - kwargs, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - return self diff --git a/finix/models/__init__.py b/finix/models/__init__.py index e7cb521..cfe32b7 100644 --- a/finix/models/__init__.py +++ b/finix/models/__init__.py @@ -1,334 +1,5 @@ -# flake8: noqa - -# import all models into this package -# if you have many models here with many references from one model to another this may -# raise a RecursionError -# to avoid this, import only the models that you directly need like: -# from from finix.model.pet import Pet -# or import this package, but before doing it, use: -# import sys -# sys.setrecursionlimit(n) - -from finix.model.additional_buyer_charges import AdditionalBuyerCharges -from finix.model.additional_purchase_data import AdditionalPurchaseData -from finix.model.additional_purchase_data_item_data_inner import AdditionalPurchaseDataItemDataInner -from finix.model.additional_purchase_data_order_date import AdditionalPurchaseDataOrderDate -from finix.model.address import Address -from finix.model.adjustment_transfers_list import AdjustmentTransfersList -from finix.model.adjustment_transfers_list_embedded import AdjustmentTransfersListEmbedded -from finix.model.apple_pay_session import ApplePaySession -from finix.model.apple_pay_session_request import ApplePaySessionRequest -from finix.model.application import Application -from finix.model.application_links import ApplicationLinks -from finix.model.application_links_application_profile import ApplicationLinksApplicationProfile -from finix.model.application_links_self import ApplicationLinksSelf -from finix.model.application_profile import ApplicationProfile -from finix.model.application_profile_links import ApplicationProfileLinks -from finix.model.application_profile_links_application import ApplicationProfileLinksApplication -from finix.model.application_profiles_list import ApplicationProfilesList -from finix.model.application_profiles_list_embedded import ApplicationProfilesListEmbedded -from finix.model.application_profiles_list_links import ApplicationProfilesListLinks -from finix.model.applications_list import ApplicationsList -from finix.model.applications_list_embedded import ApplicationsListEmbedded -from finix.model.associated_identity import AssociatedIdentity -from finix.model.associated_identity_entity import AssociatedIdentityEntity -from finix.model.authorization import Authorization -from finix.model.authorization_captured import AuthorizationCaptured -from finix.model.authorization_captured_external_responses_inner import AuthorizationCapturedExternalResponsesInner -from finix.model.authorization_links import AuthorizationLinks -from finix.model.authorization_links_device import AuthorizationLinksDevice -from finix.model.authorization_links_merchant_identity import AuthorizationLinksMerchantIdentity -from finix.model.authorization_links_transfer import AuthorizationLinksTransfer -from finix.model.authorizations_list import AuthorizationsList -from finix.model.authorizations_list_embedded import AuthorizationsListEmbedded -from finix.model.balance_transfer import BalanceTransfer -from finix.model.balance_transfer_list import BalanceTransferList -from finix.model.balance_transfer_list_embedded import BalanceTransferListEmbedded -from finix.model.card_present_details import CardPresentDetails -from finix.model.card_present_details_emv_data import CardPresentDetailsEmvData -from finix.model.card_present_instrument_form import CardPresentInstrumentForm -from finix.model.compliance_form import ComplianceForm -from finix.model.compliance_form_files import ComplianceFormFiles -from finix.model.compliance_form_pci_saq_a import ComplianceFormPciSaqA -from finix.model.configuration_details import ConfigurationDetails -from finix.model.configuration_details_cashback_options import ConfigurationDetailsCashbackOptions -from finix.model.configuration_details_cashback_options_manual_entry import ConfigurationDetailsCashbackOptionsManualEntry -from finix.model.configuration_details_tip_options import ConfigurationDetailsTipOptions -from finix.model.country import Country -from finix.model.create_application_request import CreateApplicationRequest -from finix.model.create_associated_identity_request import CreateAssociatedIdentityRequest -from finix.model.create_associated_identity_request_entity import CreateAssociatedIdentityRequestEntity -from finix.model.create_associated_identity_request_entity_business_address import CreateAssociatedIdentityRequestEntityBusinessAddress -from finix.model.create_associated_identity_request_entity_dob import CreateAssociatedIdentityRequestEntityDob -from finix.model.create_associated_identity_request_entity_incorporation_date import CreateAssociatedIdentityRequestEntityIncorporationDate -from finix.model.create_associated_identity_request_entity_personal_address import CreateAssociatedIdentityRequestEntityPersonalAddress -from finix.model.create_authorization_request import CreateAuthorizationRequest -from finix.model.create_authorization_request3d_secure_authentication import CreateAuthorizationRequest3dSecureAuthentication -from finix.model.create_balance_transfer_request import CreateBalanceTransferRequest -from finix.model.create_device import CreateDevice -from finix.model.create_dispute_evidence_request import CreateDisputeEvidenceRequest -from finix.model.create_external_link_request import CreateExternalLinkRequest -from finix.model.create_fee_profile_request import CreateFeeProfileRequest -from finix.model.create_fee_request import CreateFeeRequest -from finix.model.create_file_request import CreateFileRequest -from finix.model.create_identity_request import CreateIdentityRequest -from finix.model.create_identity_request_additional_underwriting_data import CreateIdentityRequestAdditionalUnderwritingData -from finix.model.create_identity_request_additional_underwriting_data_card_volume_distribution import CreateIdentityRequestAdditionalUnderwritingDataCardVolumeDistribution -from finix.model.create_identity_request_additional_underwriting_data_volume_distribution_by_business_type import CreateIdentityRequestAdditionalUnderwritingDataVolumeDistributionByBusinessType -from finix.model.create_identity_request_entity import CreateIdentityRequestEntity -from finix.model.create_identity_request_entity_personal_address import CreateIdentityRequestEntityPersonalAddress -from finix.model.create_instrument_update_request import CreateInstrumentUpdateRequest -from finix.model.create_merchant_underwriting_request import CreateMerchantUnderwritingRequest -from finix.model.create_onboarding_form_link_request import CreateOnboardingFormLinkRequest -from finix.model.create_onboarding_form_request import CreateOnboardingFormRequest -from finix.model.create_onboarding_form_request_merchant_processors_inner import CreateOnboardingFormRequestMerchantProcessorsInner -from finix.model.create_onboarding_form_request_onboarding_data import CreateOnboardingFormRequestOnboardingData -from finix.model.create_onboarding_form_request_onboarding_link_details import CreateOnboardingFormRequestOnboardingLinkDetails -from finix.model.create_payment_instrument_request import CreatePaymentInstrumentRequest -from finix.model.create_payment_instrument_request_address import CreatePaymentInstrumentRequestAddress -from finix.model.create_processor_request import CreateProcessorRequest -from finix.model.create_processor_request_config import CreateProcessorRequestConfig -from finix.model.create_reversal_request import CreateReversalRequest -from finix.model.create_settlement_request import CreateSettlementRequest -from finix.model.create_subscription_amount_request import CreateSubscriptionAmountRequest -from finix.model.create_subscription_amount_request_fee_amount_data import CreateSubscriptionAmountRequestFeeAmountData -from finix.model.create_subscription_enrollment_request import CreateSubscriptionEnrollmentRequest -from finix.model.create_subscription_schedule_request import CreateSubscriptionScheduleRequest -from finix.model.create_subscription_schedule_request_fixed_time_interval_offset import CreateSubscriptionScheduleRequestFixedTimeIntervalOffset -from finix.model.create_subscription_schedule_request_period_offset import CreateSubscriptionScheduleRequestPeriodOffset -from finix.model.create_transfer_request import CreateTransferRequest -from finix.model.create_transfer_request3d_secure_authentication import CreateTransferRequest3dSecureAuthentication -from finix.model.create_user_request import CreateUserRequest -from finix.model.create_verification_request import CreateVerificationRequest -from finix.model.create_webhook_request import CreateWebhookRequest -from finix.model.create_webhook_request_authentication import CreateWebhookRequestAuthentication -from finix.model.create_webhook_request_authentication_basic import CreateWebhookRequestAuthenticationBasic -from finix.model.create_webhook_request_authentication_bearer import CreateWebhookRequestAuthenticationBearer -from finix.model.currency import Currency -from finix.model.device import Device -from finix.model.device_config_details import DeviceConfigDetails -from finix.model.device_links import DeviceLinks -from finix.model.device_links_merchant import DeviceLinksMerchant -from finix.model.dispute import Dispute -from finix.model.dispute_adjustment_transfers_list import DisputeAdjustmentTransfersList -from finix.model.dispute_evidence import DisputeEvidence -from finix.model.dispute_evidence_links import DisputeEvidenceLinks -from finix.model.dispute_evidence_list import DisputeEvidenceList -from finix.model.dispute_evidence_list_embedded import DisputeEvidenceListEmbedded -from finix.model.dispute_links import DisputeLinks -from finix.model.dispute_links_transfer import DisputeLinksTransfer -from finix.model.disputes_list import DisputesList -from finix.model.disputes_list_embedded import DisputesListEmbedded -from finix.model.download_instrument_update_query_params import DownloadInstrumentUpdateQueryParams -from finix.model.error401_unauthorized import Error401Unauthorized -from finix.model.error401_unauthorized_embedded import Error401UnauthorizedEmbedded -from finix.model.error401_unauthorized_embedded_errors_inner import Error401UnauthorizedEmbeddedErrorsInner -from finix.model.error401_unauthorized_embedded_errors_inner_links import Error401UnauthorizedEmbeddedErrorsInnerLinks -from finix.model.error402_payment_required import Error402PaymentRequired -from finix.model.error402_payment_required_embedded import Error402PaymentRequiredEmbedded -from finix.model.error402_payment_required_embedded_errors_inner import Error402PaymentRequiredEmbeddedErrorsInner -from finix.model.error402_payment_required_embedded_errors_inner_links import Error402PaymentRequiredEmbeddedErrorsInnerLinks -from finix.model.error403_forbidden_list import Error403ForbiddenList -from finix.model.error403_forbidden_list_embedded import Error403ForbiddenListEmbedded -from finix.model.error403_forbidden_list_embedded_errors_inner import Error403ForbiddenListEmbeddedErrorsInner -from finix.model.error404_not_found_list import Error404NotFoundList -from finix.model.error404_not_found_list_embedded import Error404NotFoundListEmbedded -from finix.model.error404_not_found_list_embedded_errors_inner import Error404NotFoundListEmbeddedErrorsInner -from finix.model.error406_not_acceptable import Error406NotAcceptable -from finix.model.error422_invalid_field_list import Error422InvalidFieldList -from finix.model.error422_invalid_field_list_embedded import Error422InvalidFieldListEmbedded -from finix.model.error422_invalid_field_list_embedded_errors_inner import Error422InvalidFieldListEmbeddedErrorsInner -from finix.model.error_generic import ErrorGeneric -from finix.model.external_link import ExternalLink -from finix.model.external_links_list import ExternalLinksList -from finix.model.external_links_list_embedded import ExternalLinksListEmbedded -from finix.model.fee import Fee -from finix.model.fee_links import FeeLinks -from finix.model.fee_profile import FeeProfile -from finix.model.fee_profile_links import FeeProfileLinks -from finix.model.fee_profiles_list import FeeProfilesList -from finix.model.fee_profiles_list_embedded import FeeProfilesListEmbedded -from finix.model.fee_type import FeeType -from finix.model.fees_list import FeesList -from finix.model.fees_list_embedded import FeesListEmbedded -from finix.model.file import File -from finix.model.files_list import FilesList -from finix.model.files_list_embedded import FilesListEmbedded -from finix.model.get_device_query_params import GetDeviceQueryParams -from finix.model.identities_list import IdentitiesList -from finix.model.identities_list_embedded import IdentitiesListEmbedded -from finix.model.identity import Identity -from finix.model.identity_additional_underwriting_data import IdentityAdditionalUnderwritingData -from finix.model.identity_additional_underwriting_data_card_volume_distribution import IdentityAdditionalUnderwritingDataCardVolumeDistribution -from finix.model.identity_additional_underwriting_data_volume_distribution_by_business_type import IdentityAdditionalUnderwritingDataVolumeDistributionByBusinessType -from finix.model.identity_entity import IdentityEntity -from finix.model.identity_entity_business_address import IdentityEntityBusinessAddress -from finix.model.identity_entity_dob import IdentityEntityDob -from finix.model.identity_entity_form import IdentityEntityForm -from finix.model.identity_entity_form_business_address import IdentityEntityFormBusinessAddress -from finix.model.identity_entity_form_dob import IdentityEntityFormDob -from finix.model.identity_entity_form_incorporation_date import IdentityEntityFormIncorporationDate -from finix.model.identity_entity_incorporation_date import IdentityEntityIncorporationDate -from finix.model.identity_entity_personal_address import IdentityEntityPersonalAddress -from finix.model.identity_links import IdentityLinks -from finix.model.identity_links_application import IdentityLinksApplication -from finix.model.identity_links_associated_identities import IdentityLinksAssociatedIdentities -from finix.model.identity_links_authorizations import IdentityLinksAuthorizations -from finix.model.identity_links_disputes import IdentityLinksDisputes -from finix.model.identity_links_merchants import IdentityLinksMerchants -from finix.model.identity_links_payment_instruments import IdentityLinksPaymentInstruments -from finix.model.identity_links_self import IdentityLinksSelf -from finix.model.identity_links_settlements import IdentityLinksSettlements -from finix.model.identity_links_transfers import IdentityLinksTransfers -from finix.model.identity_links_verifications import IdentityLinksVerifications -from finix.model.instrument_update import InstrumentUpdate -from finix.model.instrument_update_links import InstrumentUpdateLinks -from finix.model.instrument_update_links_application import InstrumentUpdateLinksApplication -from finix.model.instrument_update_links_payment_instrument import InstrumentUpdateLinksPaymentInstrument -from finix.model.list_authorizations_query_params import ListAuthorizationsQueryParams -from finix.model.list_balance_transfers_query_params import ListBalanceTransfersQueryParams -from finix.model.list_dispute_evidence_query_params import ListDisputeEvidenceQueryParams -from finix.model.list_disputes_adjustments_query_params import ListDisputesAdjustmentsQueryParams -from finix.model.list_disputes_query_params import ListDisputesQueryParams -from finix.model.list_external_links_query_params import ListExternalLinksQueryParams -from finix.model.list_fee_profiles_query_params import ListFeeProfilesQueryParams -from finix.model.list_files_query_params import ListFilesQueryParams -from finix.model.list_identities_query_params import ListIdentitiesQueryParams -from finix.model.list_identity_associated_identities_query_params import ListIdentityAssociatedIdentitiesQueryParams -from finix.model.list_links import ListLinks -from finix.model.list_links_next import ListLinksNext -from finix.model.list_merchant_profiles_query_params import ListMerchantProfilesQueryParams -from finix.model.list_merchant_verifications_query_params import ListMerchantVerificationsQueryParams -from finix.model.list_merchants_query_params import ListMerchantsQueryParams -from finix.model.list_payment_instrument_updates_query_params import ListPaymentInstrumentUpdatesQueryParams -from finix.model.list_payment_instrument_verifications_query_params import ListPaymentInstrumentVerificationsQueryParams -from finix.model.list_payment_instruments_query_params import ListPaymentInstrumentsQueryParams -from finix.model.list_settlement_funding_transfers_query_params import ListSettlementFundingTransfersQueryParams -from finix.model.list_settlement_transfers_query_params import ListSettlementTransfersQueryParams -from finix.model.list_settlements_query_params import ListSettlementsQueryParams -from finix.model.list_transfer_reversals_query_params import ListTransferReversalsQueryParams -from finix.model.list_transfers_query_params import ListTransfersQueryParams -from finix.model.list_verifications_query_params import ListVerificationsQueryParams -from finix.model.list_webhooks_query_params import ListWebhooksQueryParams -from finix.model.log_ref import LogRef -from finix.model.merchant import Merchant -from finix.model.merchant_links import MerchantLinks -from finix.model.merchant_links_application import MerchantLinksApplication -from finix.model.merchant_links_identity import MerchantLinksIdentity -from finix.model.merchant_links_merchant_profile import MerchantLinksMerchantProfile -from finix.model.merchant_links_verification import MerchantLinksVerification -from finix.model.merchant_links_verifications import MerchantLinksVerifications -from finix.model.merchant_processor_details import MerchantProcessorDetails -from finix.model.merchant_profile import MerchantProfile -from finix.model.merchant_profile_links import MerchantProfileLinks -from finix.model.merchant_profiles_list import MerchantProfilesList -from finix.model.merchant_profiles_list_embedded import MerchantProfilesListEmbedded -from finix.model.merchants_list import MerchantsList -from finix.model.merchants_list_embedded import MerchantsListEmbedded -from finix.model.messages import Messages -from finix.model.name import Name -from finix.model.onboarding_form import OnboardingForm -from finix.model.onboarding_form_link import OnboardingFormLink -from finix.model.onboarding_form_onboarding_data import OnboardingFormOnboardingData -from finix.model.onboarding_form_onboarding_link import OnboardingFormOnboardingLink -from finix.model.operation_key import OperationKey -from finix.model.page_cursor import PageCursor -from finix.model.page_offset import PageOffset -from finix.model.payment_instrument import PaymentInstrument -from finix.model.payment_instrument_links import PaymentInstrumentLinks -from finix.model.payment_instrument_links_authorizations import PaymentInstrumentLinksAuthorizations -from finix.model.payment_instrument_links_transfers import PaymentInstrumentLinksTransfers -from finix.model.payment_instrument_token import PaymentInstrumentToken -from finix.model.payment_instrument_token_links import PaymentInstrumentTokenLinks -from finix.model.payment_instrument_token_links_verifications import PaymentInstrumentTokenLinksVerifications -from finix.model.payment_instrument_updates_list import PaymentInstrumentUpdatesList -from finix.model.payment_instrument_updates_list_embedded import PaymentInstrumentUpdatesListEmbedded -from finix.model.payment_instruments_list import PaymentInstrumentsList -from finix.model.payment_instruments_list_embedded import PaymentInstrumentsListEmbedded -from finix.model.processor import Processor -from finix.model.processor_application_config import ProcessorApplicationConfig -from finix.model.processor_application_config_configuration_templates import ProcessorApplicationConfigConfigurationTemplates -from finix.model.processor_links import ProcessorLinks -from finix.model.processor_system_config import ProcessorSystemConfig -from finix.model.processor_system_config_config import ProcessorSystemConfigConfig -from finix.model.processors_list import ProcessorsList -from finix.model.processors_list_embedded import ProcessorsListEmbedded -from finix.model.remove_settlement_transfer import RemoveSettlementTransfer -from finix.model.settlement import Settlement -from finix.model.settlement_links import SettlementLinks -from finix.model.settlements_list import SettlementsList -from finix.model.settlements_list_embedded import SettlementsListEmbedded -from finix.model.sub_type_transfer import SubTypeTransfer -from finix.model.subscription_amount import SubscriptionAmount -from finix.model.subscription_amount_fee_amount_data import SubscriptionAmountFeeAmountData -from finix.model.subscription_amount_links import SubscriptionAmountLinks -from finix.model.subscription_amount_links_schedule import SubscriptionAmountLinksSchedule -from finix.model.subscription_amount_list import SubscriptionAmountList -from finix.model.subscription_amount_list_embedded import SubscriptionAmountListEmbedded -from finix.model.subscription_enrollment import SubscriptionEnrollment -from finix.model.subscription_enrollment_links import SubscriptionEnrollmentLinks -from finix.model.subscription_enrollment_links_amounts import SubscriptionEnrollmentLinksAmounts -from finix.model.subscription_enrollment_links_merchant import SubscriptionEnrollmentLinksMerchant -from finix.model.subscription_enrollment_links_schedule import SubscriptionEnrollmentLinksSchedule -from finix.model.subscription_enrollment_list import SubscriptionEnrollmentList -from finix.model.subscription_enrollment_list_embedded import SubscriptionEnrollmentListEmbedded -from finix.model.subscription_schedule import SubscriptionSchedule -from finix.model.subscription_schedule_fixed_time_interval_offset import SubscriptionScheduleFixedTimeIntervalOffset -from finix.model.subscription_schedule_links import SubscriptionScheduleLinks -from finix.model.subscription_schedule_links_amounts import SubscriptionScheduleLinksAmounts -from finix.model.subscription_schedule_period_offset import SubscriptionSchedulePeriodOffset -from finix.model.subscription_schedules_list import SubscriptionSchedulesList -from finix.model.subscription_schedules_list_embedded import SubscriptionSchedulesListEmbedded -from finix.model.subscription_schedules_list_links import SubscriptionSchedulesListLinks -from finix.model.tags import Tags -from finix.model.transfer import Transfer -from finix.model.transfer_links import TransferLinks -from finix.model.transfer_links_destination import TransferLinksDestination -from finix.model.transfer_links_disputed_transfer import TransferLinksDisputedTransfer -from finix.model.transfer_links_disputes import TransferLinksDisputes -from finix.model.transfer_links_fee_profile import TransferLinksFeeProfile -from finix.model.transfer_links_fees import TransferLinksFees -from finix.model.transfer_links_parent import TransferLinksParent -from finix.model.transfer_links_payment_instruments import TransferLinksPaymentInstruments -from finix.model.transfer_links_reversals import TransferLinksReversals -from finix.model.transfer_links_source import TransferLinksSource -from finix.model.transfers_list import TransfersList -from finix.model.transfers_list_embedded import TransfersListEmbedded -from finix.model.update_application_profile_request import UpdateApplicationProfileRequest -from finix.model.update_authorization_request import UpdateAuthorizationRequest -from finix.model.update_compliance_form_request import UpdateComplianceFormRequest -from finix.model.update_compliance_form_request_pci_saq_a import UpdateComplianceFormRequestPciSaqA -from finix.model.update_device_request import UpdateDeviceRequest -from finix.model.update_fee_request import UpdateFeeRequest -from finix.model.update_identity_request import UpdateIdentityRequest -from finix.model.update_identity_request_additional_underwriting_data import UpdateIdentityRequestAdditionalUnderwritingData -from finix.model.update_identity_request_additional_underwriting_data_card_volume_distribution import UpdateIdentityRequestAdditionalUnderwritingDataCardVolumeDistribution -from finix.model.update_identity_request_additional_underwriting_data_volume_distribution_by_business_type import UpdateIdentityRequestAdditionalUnderwritingDataVolumeDistributionByBusinessType -from finix.model.update_identity_request_entity import UpdateIdentityRequestEntity -from finix.model.update_identity_request_entity_personal_address import UpdateIdentityRequestEntityPersonalAddress -from finix.model.update_merchant_profile_request import UpdateMerchantProfileRequest -from finix.model.update_merchant_request import UpdateMerchantRequest -from finix.model.update_payment_instrument_request import UpdatePaymentInstrumentRequest -from finix.model.update_settlement_request import UpdateSettlementRequest -from finix.model.update_subscription_amount_request import UpdateSubscriptionAmountRequest -from finix.model.update_subscription_enrollment_request import UpdateSubscriptionEnrollmentRequest -from finix.model.update_subscription_schedule_request import UpdateSubscriptionScheduleRequest -from finix.model.update_transfer_request import UpdateTransferRequest -from finix.model.update_user_request import UpdateUserRequest -from finix.model.update_webhook_request import UpdateWebhookRequest -from finix.model.upload_file_request import UploadFileRequest -from finix.model.user import User -from finix.model.user_links import UserLinks -from finix.model.users_list import UsersList -from finix.model.users_list_embedded import UsersListEmbedded -from finix.model.users_list_page import UsersListPage -from finix.model.verification import Verification -from finix.model.verification_links import VerificationLinks -from finix.model.verification_links_application import VerificationLinksApplication -from finix.model.verification_links_merchant import VerificationLinksMerchant -from finix.model.verifications_list import VerificationsList -from finix.model.verifications_list_embedded import VerificationsListEmbedded -from finix.model.webhook import Webhook -from finix.model.webhook_authentication import WebhookAuthentication -from finix.model.webhooks_list import WebhooksList -from finix.model.webhooks_list_embedded import WebhooksListEmbedded +# we can not import model classes here because that would create a circular +# reference which would not work in python2 +# do not import all models into this module because that uses a lot of memory and stack frames +# if you need the ability to import all models from one package, import them with +# from {{packageName}.models import ModelA, ModelB diff --git a/finix/models/accept_dispute.py b/finix/models/accept_dispute.py new file mode 100644 index 0000000..9141739 --- /dev/null +++ b/finix/models/accept_dispute.py @@ -0,0 +1,250 @@ +""" + Finix API + + The version of the OpenAPI document: 2022-02-01 + Contact: support@finixpayments.com +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from finix.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from finix.exceptions import ApiAttributeError + + + +class AcceptDispute(ModelNormal): + """ + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + additional_properties_type = None + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'note': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'note': 'note', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, note, *args, **kwargs): # noqa: E501 + """AcceptDispute - a model defined in OpenAPI + + Args: + note (str): Include a note or custom metadata to reference the `Dispute`. + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.note = note + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, note, *args, **kwargs): # noqa: E501 + """AcceptDispute - a model defined in OpenAPI + + Args: + note (str): Include a note or custom metadata to reference the `Dispute`. + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.note = note + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/finix/model/additional_buyer_charges.py b/finix/models/additional_buyer_charges.py similarity index 88% rename from finix/model/additional_buyer_charges.py rename to finix/models/additional_buyer_charges.py index e401369..22c8ef6 100644 --- a/finix/model/additional_buyer_charges.py +++ b/finix/models/additional_buyer_charges.py @@ -55,13 +55,7 @@ class AdditionalBuyerCharges(ModelNormal): validations = { } - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + additional_properties_type = None _nullable = True @@ -76,8 +70,8 @@ def openapi_types(): and the value is attribute type. """ return { - 'convenience_amount': (float, none_type,), # noqa: E501 - 'rent_surcharge_amount': (float, none_type,), # noqa: E501 + 'convenience_amount': (float,), # noqa: E501 + 'rent_surcharge_amount': (float,), # noqa: E501 } @cached_property @@ -131,8 +125,8 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - convenience_amount (float, none_type): Include the convenience fee the merchant is charging the buyer for the transaction when creating a `Transfer` or an `Authorization`.. [optional] # noqa: E501 - rent_surcharge_amount (float, none_type): Include the rent surcharge the merchant is charging the buyer for the transaction when creating a `Transfer` or an `Authorization`.. [optional] # noqa: E501 + convenience_amount (float): Include the convenience fee the merchant is charging the buyer for the transaction when creating a `Transfer` or an `Authorization`.. [optional] # noqa: E501 + rent_surcharge_amount (float): Include the rent surcharge the merchant is charging the buyer for the transaction when creating a `Transfer` or an `Authorization`.. [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) @@ -214,8 +208,8 @@ def __init__(self, *args, **kwargs): # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - convenience_amount (float, none_type): Include the convenience fee the merchant is charging the buyer for the transaction when creating a `Transfer` or an `Authorization`.. [optional] # noqa: E501 - rent_surcharge_amount (float, none_type): Include the rent surcharge the merchant is charging the buyer for the transaction when creating a `Transfer` or an `Authorization`.. [optional] # noqa: E501 + convenience_amount (float): Include the convenience fee the merchant is charging the buyer for the transaction when creating a `Transfer` or an `Authorization`.. [optional] # noqa: E501 + rent_surcharge_amount (float): Include the rent surcharge the merchant is charging the buyer for the transaction when creating a `Transfer` or an `Authorization`.. [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) diff --git a/finix/model/configuration_details_cashback_options.py b/finix/models/additional_healthcare_data.py similarity index 86% rename from finix/model/configuration_details_cashback_options.py rename to finix/models/additional_healthcare_data.py index 014b903..2640659 100644 --- a/finix/model/configuration_details_cashback_options.py +++ b/finix/models/additional_healthcare_data.py @@ -27,12 +27,8 @@ from finix.exceptions import ApiAttributeError -def lazy_import(): - from finix.model.configuration_details_cashback_options_manual_entry import ConfigurationDetailsCashbackOptionsManualEntry - globals()['ConfigurationDetailsCashbackOptionsManualEntry'] = ConfigurationDetailsCashbackOptionsManualEntry - -class ConfigurationDetailsCashbackOptions(ModelNormal): +class AdditionalHealthcareData(ModelNormal): """ Attributes: @@ -59,16 +55,9 @@ class ConfigurationDetailsCashbackOptions(ModelNormal): validations = { } - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + additional_properties_type = None - _nullable = False + _nullable = True @cached_property def openapi_types(): @@ -80,10 +69,11 @@ def openapi_types(): openapi_types (dict): The key is attribute name and the value is attribute type. """ - lazy_import() return { - 'manual_entry': (ConfigurationDetailsCashbackOptionsManualEntry,), # noqa: E501 - 'selection_amounts': (str,), # noqa: E501 + 'clinic_amount': (int,), # noqa: E501 + 'dental_amount': (int,), # noqa: E501 + 'prescription_amount': (int,), # noqa: E501 + 'vision_amount': (int,), # noqa: E501 } @cached_property @@ -92,8 +82,10 @@ def discriminator(): attribute_map = { - 'manual_entry': 'manual_entry', # noqa: E501 - 'selection_amounts': 'selection_amounts', # noqa: E501 + 'clinic_amount': 'clinic_amount', # noqa: E501 + 'dental_amount': 'dental_amount', # noqa: E501 + 'prescription_amount': 'prescription_amount', # noqa: E501 + 'vision_amount': 'vision_amount', # noqa: E501 } read_only_vars = { @@ -104,7 +96,7 @@ def discriminator(): @classmethod @convert_js_args_to_python_args def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """ConfigurationDetailsCashbackOptions - a model defined in OpenAPI + """AdditionalHealthcareData - a model defined in OpenAPI Keyword Args: _check_type (bool): if True, values for parameters in openapi_types @@ -137,8 +129,10 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - manual_entry (ConfigurationDetailsCashbackOptionsManualEntry): [optional] # noqa: E501 - selection_amounts (str): [optional] # noqa: E501 + clinic_amount (int): The amount used for clinic and office visits such as a copay amount.. [optional] # noqa: E501 + dental_amount (int): The amount used for dental related expenses.. [optional] # noqa: E501 + prescription_amount (int): The amount used to purchase perscriptions and medications.. [optional] # noqa: E501 + vision_amount (int): The amount used for vision related expenses.. [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) @@ -187,7 +181,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 @convert_js_args_to_python_args def __init__(self, *args, **kwargs): # noqa: E501 - """ConfigurationDetailsCashbackOptions - a model defined in OpenAPI + """AdditionalHealthcareData - a model defined in OpenAPI Keyword Args: _check_type (bool): if True, values for parameters in openapi_types @@ -220,8 +214,10 @@ def __init__(self, *args, **kwargs): # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - manual_entry (ConfigurationDetailsCashbackOptionsManualEntry): [optional] # noqa: E501 - selection_amounts (str): [optional] # noqa: E501 + clinic_amount (int): The amount used for clinic and office visits such as a copay amount.. [optional] # noqa: E501 + dental_amount (int): The amount used for dental related expenses.. [optional] # noqa: E501 + prescription_amount (int): The amount used to purchase perscriptions and medications.. [optional] # noqa: E501 + vision_amount (int): The amount used for vision related expenses.. [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) diff --git a/finix/model/additional_purchase_data.py b/finix/models/additional_purchase_data.py similarity index 84% rename from finix/model/additional_purchase_data.py rename to finix/models/additional_purchase_data.py index 8a9cb4e..ccad43f 100644 --- a/finix/model/additional_purchase_data.py +++ b/finix/models/additional_purchase_data.py @@ -28,10 +28,8 @@ def lazy_import(): - from finix.model.additional_purchase_data_item_data_inner import AdditionalPurchaseDataItemDataInner - from finix.model.additional_purchase_data_order_date import AdditionalPurchaseDataOrderDate - globals()['AdditionalPurchaseDataItemDataInner'] = AdditionalPurchaseDataItemDataInner - globals()['AdditionalPurchaseDataOrderDate'] = AdditionalPurchaseDataOrderDate + AdditionalPurchaseDataItemDataInner + AdditionalPurchaseDataOrderDate class AdditionalPurchaseData(ModelNormal): @@ -59,16 +57,21 @@ class AdditionalPurchaseData(ModelNormal): } validations = { + ('customer_reference_number',): { + 'max_length': 17, + }, + ('destination_postal_code',): { + 'max_length': 10, + }, + ('invoice_reference_number',): { + 'max_length': 15, + }, + ('ship_from_postal_code',): { + 'max_length': 10, + }, } - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + additional_properties_type = None _nullable = False @@ -85,14 +88,14 @@ def openapi_types(): lazy_import() return { 'customer_reference_number': (str,), # noqa: E501 + 'sales_tax': (int,), # noqa: E501 'customs_duty_amount': (int,), # noqa: E501 'destination_country_code': (str,), # noqa: E501 'destination_postal_code': (str,), # noqa: E501 'discount_amount': (int,), # noqa: E501 'invoice_reference_number': (str,), # noqa: E501 - 'item_data': ([AdditionalPurchaseDataItemDataInner],), # noqa: E501 + 'item_data': (List[AdditionalPurchaseDataItemDataInner],), # noqa: E501 'order_date': (AdditionalPurchaseDataOrderDate,), # noqa: E501 - 'sales_tax': (int,), # noqa: E501 'ship_from_postal_code': (str,), # noqa: E501 'shipping_amount': (int,), # noqa: E501 'tax_exempt': (bool,), # noqa: E501 @@ -105,6 +108,7 @@ def discriminator(): attribute_map = { 'customer_reference_number': 'customer_reference_number', # noqa: E501 + 'sales_tax': 'sales_tax', # noqa: E501 'customs_duty_amount': 'customs_duty_amount', # noqa: E501 'destination_country_code': 'destination_country_code', # noqa: E501 'destination_postal_code': 'destination_postal_code', # noqa: E501 @@ -112,7 +116,6 @@ def discriminator(): 'invoice_reference_number': 'invoice_reference_number', # noqa: E501 'item_data': 'item_data', # noqa: E501 'order_date': 'order_date', # noqa: E501 - 'sales_tax': 'sales_tax', # noqa: E501 'ship_from_postal_code': 'ship_from_postal_code', # noqa: E501 'shipping_amount': 'shipping_amount', # noqa: E501 'tax_exempt': 'tax_exempt', # noqa: E501 @@ -125,9 +128,13 @@ def discriminator(): @classmethod @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + def _from_openapi_data(cls, customer_reference_number, sales_tax, *args, **kwargs): # noqa: E501 """AdditionalPurchaseData - a model defined in OpenAPI + Args: + customer_reference_number (str): The customer reference for the purchase (max 17 characters). + sales_tax (int): - Total aggregate tax amount in cents for the entire purchase. Field is automatically calculated if you pass in the itemized tax amounts. - For non-taxable transactions either set `sales_tax` to 0 or omit from payload and also set `tax_exempt` to **True**. - Request must align so `amount_excluding_sales_tax` + `sales_tax` = `amount_including_sales_tax`. + Keyword Args: _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be @@ -159,18 +166,16 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - customer_reference_number (str): The customer reference for the purchase (max 17 characters).. [optional] # noqa: E501 customs_duty_amount (int): The duty in cents on the total purchase amount for the order. [optional] # noqa: E501 destination_country_code (str): The ISO country code of the order destination.. [optional] # noqa: E501 destination_postal_code (str): The postal code of the order destination (10 characters). [optional] # noqa: E501 discount_amount (int): The amount in cents of the discount for the order.. [optional] # noqa: E501 invoice_reference_number (str): The order's invoice number (max 15 characters). [optional] # noqa: E501 - item_data ([AdditionalPurchaseDataItemDataInner]): Additional information about the transaction. Used for Level 2 and Level 3 Processing.. [optional] # noqa: E501 + item_data (List[AdditionalPurchaseDataItemDataInner]): Additional information about the transaction. Used for Level 2 and Level 3 Processing.. [optional] # noqa: E501 order_date (AdditionalPurchaseDataOrderDate): [optional] # noqa: E501 - sales_tax (int): Total aggregate tax amount in cents for the entire purchase. Field is automatically calculated if you pass in the itemized tax amounts. For non-taxable transactions either set `sales_tax` to 0 or omit from payload and also set `tax_exempt` to **True**.. [optional] # noqa: E501 ship_from_postal_code (str): The postal code from where order is shipped (10 characters). [optional] # noqa: E501 shipping_amount (int): The shipping cost in cents for the order. . [optional] # noqa: E501 - tax_exempt (bool): For tax exempt purchases set to True.. [optional] # noqa: E501 + tax_exempt (bool): - For tax exempt purchases set to **True**. - If set to **True**, request can't include `sales_tax`.. [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) @@ -198,6 +203,8 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 self._configuration = _configuration self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + self.customer_reference_number = customer_reference_number + self.sales_tax = sales_tax for var_name, var_value in kwargs.items(): if var_name not in self.attribute_map and \ self._configuration is not None and \ @@ -218,9 +225,13 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 ]) @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 + def __init__(self, customer_reference_number, sales_tax, *args, **kwargs): # noqa: E501 """AdditionalPurchaseData - a model defined in OpenAPI + Args: + customer_reference_number (str): The customer reference for the purchase (max 17 characters). + sales_tax (int): - Total aggregate tax amount in cents for the entire purchase. Field is automatically calculated if you pass in the itemized tax amounts. - For non-taxable transactions either set `sales_tax` to 0 or omit from payload and also set `tax_exempt` to **True**. - Request must align so `amount_excluding_sales_tax` + `sales_tax` = `amount_including_sales_tax`. + Keyword Args: _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be @@ -252,18 +263,16 @@ def __init__(self, *args, **kwargs): # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - customer_reference_number (str): The customer reference for the purchase (max 17 characters).. [optional] # noqa: E501 customs_duty_amount (int): The duty in cents on the total purchase amount for the order. [optional] # noqa: E501 destination_country_code (str): The ISO country code of the order destination.. [optional] # noqa: E501 destination_postal_code (str): The postal code of the order destination (10 characters). [optional] # noqa: E501 discount_amount (int): The amount in cents of the discount for the order.. [optional] # noqa: E501 invoice_reference_number (str): The order's invoice number (max 15 characters). [optional] # noqa: E501 - item_data ([AdditionalPurchaseDataItemDataInner]): Additional information about the transaction. Used for Level 2 and Level 3 Processing.. [optional] # noqa: E501 + item_data (List[AdditionalPurchaseDataItemDataInner]): Additional information about the transaction. Used for Level 2 and Level 3 Processing.. [optional] # noqa: E501 order_date (AdditionalPurchaseDataOrderDate): [optional] # noqa: E501 - sales_tax (int): Total aggregate tax amount in cents for the entire purchase. Field is automatically calculated if you pass in the itemized tax amounts. For non-taxable transactions either set `sales_tax` to 0 or omit from payload and also set `tax_exempt` to **True**.. [optional] # noqa: E501 ship_from_postal_code (str): The postal code from where order is shipped (10 characters). [optional] # noqa: E501 shipping_amount (int): The shipping cost in cents for the order. . [optional] # noqa: E501 - tax_exempt (bool): For tax exempt purchases set to True.. [optional] # noqa: E501 + tax_exempt (bool): - For tax exempt purchases set to **True**. - If set to **True**, request can't include `sales_tax`.. [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) @@ -289,6 +298,8 @@ def __init__(self, *args, **kwargs): # noqa: E501 self._configuration = _configuration self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + self.customer_reference_number = customer_reference_number + self.sales_tax = sales_tax for var_name, var_value in kwargs.items(): if var_name not in self.attribute_map and \ self._configuration is not None and \ diff --git a/finix/model/additional_purchase_data_item_data_inner.py b/finix/models/additional_purchase_data_item_data_inner.py similarity index 90% rename from finix/model/additional_purchase_data_item_data_inner.py rename to finix/models/additional_purchase_data_item_data_inner.py index 82c6971..4e1ab74 100644 --- a/finix/model/additional_purchase_data_item_data_inner.py +++ b/finix/models/additional_purchase_data_item_data_inner.py @@ -53,15 +53,25 @@ class AdditionalPurchaseDataItemDataInner(ModelNormal): } validations = { + ('commodity_code',): { + 'max_length': 12, + }, + ('item_description',): { + 'max_length': 25, + }, + ('merchant_product_code',): { + 'max_length': 12, + }, + ('quantity',): { + 'inclusive_maximum': 99, + 'inclusive_minimum': 1, + }, + ('unit_of_measure',): { + 'max_length': 3, + }, } - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + additional_properties_type = None _nullable = False @@ -145,8 +155,8 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - amount_excluding_sales_tax (int): Total cost in cents of the line item excluding tax.. [optional] # noqa: E501 - amount_including_sales_tax (int): Total cost in cents of the line item including tax.. [optional] # noqa: E501 + amount_excluding_sales_tax (int): - Total cost of the line item in cents, excluding tax. - Must align with `sales_tax` so `amount_excluding_sales_tax` + `sales_tax` = `amount_including_sales_tax`.. [optional] # noqa: E501 + amount_including_sales_tax (int): - Total cost of the line item in cents, including tax. - Must align with `sales_tax` so `amount_excluding_sales_tax` + `sales_tax` = `amount_including_sales_tax`.. [optional] # noqa: E501 commodity_code (str): A commodity code is a numeric code representing a particular product or service as defined by the National Institute of Governmental Purchasing. The code can be 3, 5, 7, or 11 digits in length. The longer the code the more granular the description of the product/service. (max 12 characters).. [optional] # noqa: E501 cost_per_unit (int): The price in cents of one unit of the item purchased. [optional] # noqa: E501 item_description (str): Required when `item_data` is supplied (max 25 characters). [optional] # noqa: E501 @@ -235,8 +245,8 @@ def __init__(self, *args, **kwargs): # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - amount_excluding_sales_tax (int): Total cost in cents of the line item excluding tax.. [optional] # noqa: E501 - amount_including_sales_tax (int): Total cost in cents of the line item including tax.. [optional] # noqa: E501 + amount_excluding_sales_tax (int): - Total cost of the line item in cents, excluding tax. - Must align with `sales_tax` so `amount_excluding_sales_tax` + `sales_tax` = `amount_including_sales_tax`.. [optional] # noqa: E501 + amount_including_sales_tax (int): - Total cost of the line item in cents, including tax. - Must align with `sales_tax` so `amount_excluding_sales_tax` + `sales_tax` = `amount_including_sales_tax`.. [optional] # noqa: E501 commodity_code (str): A commodity code is a numeric code representing a particular product or service as defined by the National Institute of Governmental Purchasing. The code can be 3, 5, 7, or 11 digits in length. The longer the code the more granular the description of the product/service. (max 12 characters).. [optional] # noqa: E501 cost_per_unit (int): The price in cents of one unit of the item purchased. [optional] # noqa: E501 item_description (str): Required when `item_data` is supplied (max 25 characters). [optional] # noqa: E501 diff --git a/finix/model/additional_purchase_data_order_date.py b/finix/models/additional_purchase_data_order_date.py similarity index 97% rename from finix/model/additional_purchase_data_order_date.py rename to finix/models/additional_purchase_data_order_date.py index abcf61a..95e0fda 100644 --- a/finix/model/additional_purchase_data_order_date.py +++ b/finix/models/additional_purchase_data_order_date.py @@ -53,15 +53,12 @@ class AdditionalPurchaseDataOrderDate(ModelNormal): } validations = { + ('year',): { + 'inclusive_minimum': 1990, + }, } - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + additional_properties_type = None _nullable = False diff --git a/finix/model/address.py b/finix/models/address.py similarity index 86% rename from finix/model/address.py rename to finix/models/address.py index 1c1f9bf..b9ebb9d 100644 --- a/finix/model/address.py +++ b/finix/models/address.py @@ -28,8 +28,7 @@ def lazy_import(): - from finix.model.country import Country - globals()['Country'] = Country + Country class Address(ModelNormal): @@ -59,14 +58,7 @@ class Address(ModelNormal): validations = { } - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + additional_properties_type = None _nullable = True @@ -82,12 +74,12 @@ def openapi_types(): """ lazy_import() return { - 'city': (str, none_type,), # noqa: E501 + 'city': (str,), # noqa: E501 'country': (Country,), # noqa: E501 - 'line1': (str, none_type,), # noqa: E501 - 'line2': (str, none_type,), # noqa: E501 - 'postal_code': (str, none_type,), # noqa: E501 - 'region': (str, none_type,), # noqa: E501 + 'line1': (str,), # noqa: E501 + 'line2': (str,), # noqa: E501 + 'postal_code': (str,), # noqa: E501 + 'region': (str,), # noqa: E501 } @cached_property @@ -145,12 +137,12 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - city (str, none_type): City (max 20 characters).. [optional] # noqa: E501 + city (str): City (max 20 characters).. [optional] # noqa: E501 country (Country): [optional] # noqa: E501 - line1 (str, none_type): First line of the address (max 35 characters).. [optional] # noqa: E501 - line2 (str, none_type): Second line of the address (max 35 characters).. [optional] # noqa: E501 - postal_code (str, none_type): Zip or Postal code (max 7 characters).. [optional] # noqa: E501 - region (str, none_type): 2-letter State code.. [optional] # noqa: E501 + line1 (str): First line of the address (max 35 characters).. [optional] # noqa: E501 + line2 (str): Second line of the address (max 35 characters).. [optional] # noqa: E501 + postal_code (str): Zip or Postal code (max 7 characters).. [optional] # noqa: E501 + region (str): 2-letter State code.. [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) @@ -232,12 +224,12 @@ def __init__(self, *args, **kwargs): # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - city (str, none_type): City (max 20 characters).. [optional] # noqa: E501 + city (str): City (max 20 characters).. [optional] # noqa: E501 country (Country): [optional] # noqa: E501 - line1 (str, none_type): First line of the address (max 35 characters).. [optional] # noqa: E501 - line2 (str, none_type): Second line of the address (max 35 characters).. [optional] # noqa: E501 - postal_code (str, none_type): Zip or Postal code (max 7 characters).. [optional] # noqa: E501 - region (str, none_type): 2-letter State code.. [optional] # noqa: E501 + line1 (str): First line of the address (max 35 characters).. [optional] # noqa: E501 + line2 (str): Second line of the address (max 35 characters).. [optional] # noqa: E501 + postal_code (str): Zip or Postal code (max 7 characters).. [optional] # noqa: E501 + region (str): 2-letter State code.. [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) diff --git a/finix/model/adjustment_transfers_list.py b/finix/models/adjustment_transfers_list.py similarity index 93% rename from finix/model/adjustment_transfers_list.py rename to finix/models/adjustment_transfers_list.py index 4fcb31e..feb5454 100644 --- a/finix/model/adjustment_transfers_list.py +++ b/finix/models/adjustment_transfers_list.py @@ -28,12 +28,9 @@ def lazy_import(): - from finix.model.adjustment_transfers_list_embedded import AdjustmentTransfersListEmbedded - from finix.model.dispute_evidence_links import DisputeEvidenceLinks - from finix.model.page_cursor import PageCursor - globals()['AdjustmentTransfersListEmbedded'] = AdjustmentTransfersListEmbedded - globals()['DisputeEvidenceLinks'] = DisputeEvidenceLinks - globals()['PageCursor'] = PageCursor + AdjustmentTransfersListEmbedded + DisputeEvidenceLinks + PageCursor class AdjustmentTransfersList(ModelNormal): @@ -63,14 +60,7 @@ class AdjustmentTransfersList(ModelNormal): validations = { } - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + additional_properties_type = None _nullable = False diff --git a/finix/model/adjustment_transfers_list_embedded.py b/finix/models/adjustment_transfers_list_embedded.py similarity index 94% rename from finix/model/adjustment_transfers_list_embedded.py rename to finix/models/adjustment_transfers_list_embedded.py index 245633f..f953d81 100644 --- a/finix/model/adjustment_transfers_list_embedded.py +++ b/finix/models/adjustment_transfers_list_embedded.py @@ -28,8 +28,7 @@ def lazy_import(): - from finix.model.transfer import Transfer - globals()['Transfer'] = Transfer + Transfer class AdjustmentTransfersListEmbedded(ModelNormal): @@ -59,14 +58,7 @@ class AdjustmentTransfersListEmbedded(ModelNormal): validations = { } - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + additional_properties_type = None _nullable = False @@ -82,7 +74,7 @@ def openapi_types(): """ lazy_import() return { - 'transfers': ([Transfer],), # noqa: E501 + 'transfers': (List[Transfer],), # noqa: E501 } @cached_property @@ -135,7 +127,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - transfers ([Transfer]): `Transfer` objects.. [optional] # noqa: E501 + transfers (List[Transfer]): `Transfer` objects.. [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) @@ -217,7 +209,7 @@ def __init__(self, *args, **kwargs): # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - transfers ([Transfer]): `Transfer` objects.. [optional] # noqa: E501 + transfers (List[Transfer]): `Transfer` objects.. [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) diff --git a/finix/model/apple_pay_session.py b/finix/models/apple_pay_session.py similarity index 96% rename from finix/model/apple_pay_session.py rename to finix/models/apple_pay_session.py index d709e5a..5c8d00c 100644 --- a/finix/model/apple_pay_session.py +++ b/finix/models/apple_pay_session.py @@ -28,8 +28,7 @@ def lazy_import(): - from finix.model.dispute_evidence_links import DisputeEvidenceLinks - globals()['DisputeEvidenceLinks'] = DisputeEvidenceLinks + DisputeEvidenceLinks class ApplePaySession(ModelNormal): @@ -59,14 +58,7 @@ class ApplePaySession(ModelNormal): validations = { } - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + additional_properties_type = None _nullable = False diff --git a/finix/model/apple_pay_session_request.py b/finix/models/apple_pay_session_request.py similarity index 97% rename from finix/model/apple_pay_session_request.py rename to finix/models/apple_pay_session_request.py index 1a78674..bdb69e4 100644 --- a/finix/model/apple_pay_session_request.py +++ b/finix/models/apple_pay_session_request.py @@ -55,13 +55,7 @@ class ApplePaySessionRequest(ModelNormal): validations = { } - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + additional_properties_type = None _nullable = False diff --git a/finix/model/application.py b/finix/models/application.py similarity index 81% rename from finix/model/application.py rename to finix/models/application.py index e146850..9682c8d 100644 --- a/finix/model/application.py +++ b/finix/models/application.py @@ -28,10 +28,7 @@ def lazy_import(): - from finix.model.application_links import ApplicationLinks - from finix.model.tags import Tags - globals()['ApplicationLinks'] = ApplicationLinks - globals()['Tags'] = Tags + ApplicationLinks class Application(ModelNormal): @@ -58,31 +55,25 @@ class Application(ModelNormal): allowed_values = { ('fee_ready_to_settle_upon',): { 'None': None, - 'RECONCILIATION': "RECONCILIATION", - 'SUCCESSFUL_CAPTURE': "SUCCESSFUL_CAPTURE", + ''RECONCILIATION'': 'RECONCILIATION', + ''SUCCESSFUL_CAPTURE'': 'SUCCESSFUL_CAPTURE', }, ('ready_to_settle_upon',): { 'None': None, - 'RECONCILIATION': "RECONCILIATION", - 'SUCCESSFUL_CAPTURE': "SUCCESSFUL_CAPTURE", + ''RECONCILIATION'': 'RECONCILIATION', + ''SUCCESSFUL_CAPTURE'': 'SUCCESSFUL_CAPTURE', }, ('settlement_funding_identifier',): { - 'None': None, - 'UNSET': "UNSET", + ''UNSET'': 'UNSET', + ''MID_AND_DATE'': 'MID_AND_DATE', + ''MID_AND_MERCHANT_NAME'': 'MID_AND_MERCHANT_NAME', }, } validations = { } - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + additional_properties_type = None _nullable = False @@ -105,14 +96,14 @@ def openapi_types(): 'card_expiration_date_required': (bool,), # noqa: E501 'creating_transfer_from_report_enabled': (bool,), # noqa: E501 'enabled': (bool,), # noqa: E501 - 'fee_ready_to_settle_upon': (str, none_type,), # noqa: E501 + 'fee_ready_to_settle_upon': (str,), # noqa: E501 'name': (str,), # noqa: E501 'owner': (str,), # noqa: E501 'processing_enabled': (bool,), # noqa: E501 - 'ready_to_settle_upon': (str, none_type,), # noqa: E501 + 'ready_to_settle_upon': (str,), # noqa: E501 'settlement_enabled': (bool,), # noqa: E501 - 'settlement_funding_identifier': (str, none_type,), # noqa: E501 - 'tags': (Tags,), # noqa: E501 + 'settlement_funding_identifier': (str,), # noqa: E501 + 'tags': (object,), # noqa: E501 'links': (ApplicationLinks,), # noqa: E501 } @@ -188,14 +179,14 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 card_expiration_date_required (bool): Details if the `Application` requires the card's expiration date.. [optional] # noqa: E501 creating_transfer_from_report_enabled (bool): Details if the `Application` is automatically set to create `Transfers` once settlement reports get generated.. [optional] # noqa: E501 enabled (bool): Details if the `Application` is enabled and active. Set to **false** to disable the `Application`.. [optional] # noqa: E501 - fee_ready_to_settle_upon (str, none_type): Details when the `fees` of `Authroizations` submitted under the `Application` will be ready to settle.. [optional] # noqa: E501 + fee_ready_to_settle_upon (str): Details when the `fees` of `Authroizations` submitted under the `Application` will be ready to settle.. [optional] # noqa: E501 name (str): The name of the `Application`.. [optional] # noqa: E501 owner (str): ID of the `Identity` resource that created the `Application`.. [optional] # noqa: E501 processing_enabled (bool): Details if transaction processing is enabled for the `Application`. . [optional] # noqa: E501 - ready_to_settle_upon (str, none_type): Details when `Authroizations` submitted under the `Application` will be ready to settle.. [optional] # noqa: E501 + ready_to_settle_upon (str): Details when transactions submitted under the `Application` will be ready to settle.. [optional] # noqa: E501 settlement_enabled (bool): Details if settlement processing is enabled for the `Application`. . [optional] # noqa: E501 - settlement_funding_identifier (str, none_type): [optional] if omitted the server will use the default value of "UNSET" # noqa: E501 - tags (Tags): [optional] # noqa: E501 + settlement_funding_identifier (str): Includes additional information (like the MID or `Merchant` name) when submitting funding `Transfers` to processors. - **UNSET**: No additional details get provided to the processor. - **MID_AND_DATE**: The `MID` of the `Merchant` and the date the funding `Transfer` was submitted (Date is in UTC). e.g **MID:12345678-20220225** - **MID_AND_MERCHANT_NAME**: The `MID` of the `Merchant` and the `Merchant#name` (white spaces will be removed). e.g. **MID:12345678-NameOfMerchant** These details appear alongside the seller's payout in their bank account as a description of the deposit.. [optional] if omitted the server will use the default value of 'UNSET' # noqa: E501 + tags (object): Include up to 50 `key`: **value** pairs to annotate requests with custom metadata. - Maximum character length for individual `keys` is 40. - Maximum character length for individual **values** is 500. (e.g., `order number`: **25**, `item_type`: **produce**, `department`: **sales**, etc.). [optional] # noqa: E501 links (ApplicationLinks): [optional] # noqa: E501 """ @@ -285,14 +276,14 @@ def __init__(self, *args, **kwargs): # noqa: E501 card_expiration_date_required (bool): Details if the `Application` requires the card's expiration date.. [optional] # noqa: E501 creating_transfer_from_report_enabled (bool): Details if the `Application` is automatically set to create `Transfers` once settlement reports get generated.. [optional] # noqa: E501 enabled (bool): Details if the `Application` is enabled and active. Set to **false** to disable the `Application`.. [optional] # noqa: E501 - fee_ready_to_settle_upon (str, none_type): Details when the `fees` of `Authroizations` submitted under the `Application` will be ready to settle.. [optional] # noqa: E501 + fee_ready_to_settle_upon (str): Details when the `fees` of `Authroizations` submitted under the `Application` will be ready to settle.. [optional] # noqa: E501 name (str): The name of the `Application`.. [optional] # noqa: E501 owner (str): ID of the `Identity` resource that created the `Application`.. [optional] # noqa: E501 processing_enabled (bool): Details if transaction processing is enabled for the `Application`. . [optional] # noqa: E501 - ready_to_settle_upon (str, none_type): Details when `Authroizations` submitted under the `Application` will be ready to settle.. [optional] # noqa: E501 + ready_to_settle_upon (str): Details when transactions submitted under the `Application` will be ready to settle.. [optional] # noqa: E501 settlement_enabled (bool): Details if settlement processing is enabled for the `Application`. . [optional] # noqa: E501 - settlement_funding_identifier (str, none_type): [optional] if omitted the server will use the default value of "UNSET" # noqa: E501 - tags (Tags): [optional] # noqa: E501 + settlement_funding_identifier (str): Includes additional information (like the MID or `Merchant` name) when submitting funding `Transfers` to processors. - **UNSET**: No additional details get provided to the processor. - **MID_AND_DATE**: The `MID` of the `Merchant` and the date the funding `Transfer` was submitted (Date is in UTC). e.g **MID:12345678-20220225** - **MID_AND_MERCHANT_NAME**: The `MID` of the `Merchant` and the `Merchant#name` (white spaces will be removed). e.g. **MID:12345678-NameOfMerchant** These details appear alongside the seller's payout in their bank account as a description of the deposit.. [optional] if omitted the server will use the default value of 'UNSET' # noqa: E501 + tags (object): Include up to 50 `key`: **value** pairs to annotate requests with custom metadata. - Maximum character length for individual `keys` is 40. - Maximum character length for individual **values** is 500. (e.g., `order number`: **25**, `item_type`: **produce**, `department`: **sales**, etc.). [optional] # noqa: E501 links (ApplicationLinks): [optional] # noqa: E501 """ diff --git a/finix/model/application_links.py b/finix/models/application_links.py similarity index 74% rename from finix/model/application_links.py rename to finix/models/application_links.py index 1e14492..8c8d7ad 100644 --- a/finix/model/application_links.py +++ b/finix/models/application_links.py @@ -28,10 +28,8 @@ def lazy_import(): - from finix.model.application_links_application_profile import ApplicationLinksApplicationProfile - from finix.model.application_links_self import ApplicationLinksSelf - globals()['ApplicationLinksApplicationProfile'] = ApplicationLinksApplicationProfile - globals()['ApplicationLinksSelf'] = ApplicationLinksSelf + ApplicationLinksAuthorizations + ApplicationLinksSelf class ApplicationLinks(ModelNormal): @@ -61,14 +59,7 @@ class ApplicationLinks(ModelNormal): validations = { } - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + additional_properties_type = None _nullable = False @@ -84,21 +75,21 @@ def openapi_types(): """ lazy_import() return { - 'application_profile': (ApplicationLinksApplicationProfile,), # noqa: E501 - 'authorizations': (ApplicationLinksApplicationProfile,), # noqa: E501 - 'disputes': (ApplicationLinksApplicationProfile,), # noqa: E501 - 'identities': (ApplicationLinksApplicationProfile,), # noqa: E501 - 'merchants': (ApplicationLinksApplicationProfile,), # noqa: E501 - 'owner_identity': (ApplicationLinksApplicationProfile,), # noqa: E501 - 'payment_instruments': (ApplicationLinksApplicationProfile,), # noqa: E501 - 'processors': (ApplicationLinksApplicationProfile,), # noqa: E501 - 'reversals': (ApplicationLinksApplicationProfile,), # noqa: E501 + 'authorizations': (ApplicationLinksAuthorizations,), # noqa: E501 + 'application_profile': (ApplicationLinksAuthorizations,), # noqa: E501 + 'disputes': (ApplicationLinksAuthorizations,), # noqa: E501 + 'identities': (ApplicationLinksAuthorizations,), # noqa: E501 + 'merchants': (ApplicationLinksAuthorizations,), # noqa: E501 + 'owner_identity': (ApplicationLinksAuthorizations,), # noqa: E501 + 'payment_instruments': (ApplicationLinksAuthorizations,), # noqa: E501 + 'processors': (ApplicationLinksAuthorizations,), # noqa: E501 + 'reversals': (ApplicationLinksAuthorizations,), # noqa: E501 'self': (ApplicationLinksSelf,), # noqa: E501 - 'settlements': (ApplicationLinksApplicationProfile,), # noqa: E501 - 'tokens': (ApplicationLinksApplicationProfile,), # noqa: E501 - 'transfers': (ApplicationLinksApplicationProfile,), # noqa: E501 - 'users': (ApplicationLinksApplicationProfile,), # noqa: E501 - 'webhooks': (ApplicationLinksApplicationProfile,), # noqa: E501 + 'settlements': (ApplicationLinksAuthorizations,), # noqa: E501 + 'tokens': (ApplicationLinksAuthorizations,), # noqa: E501 + 'transfers': (ApplicationLinksAuthorizations,), # noqa: E501 + 'users': (ApplicationLinksAuthorizations,), # noqa: E501 + 'webhooks': (ApplicationLinksAuthorizations,), # noqa: E501 } @cached_property @@ -107,8 +98,8 @@ def discriminator(): attribute_map = { - 'application_profile': 'application_profile', # noqa: E501 'authorizations': 'authorizations', # noqa: E501 + 'application_profile': 'application_profile', # noqa: E501 'disputes': 'disputes', # noqa: E501 'identities': 'identities', # noqa: E501 'merchants': 'merchants', # noqa: E501 @@ -165,21 +156,21 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - application_profile (ApplicationLinksApplicationProfile): [optional] # noqa: E501 - authorizations (ApplicationLinksApplicationProfile): [optional] # noqa: E501 - disputes (ApplicationLinksApplicationProfile): [optional] # noqa: E501 - identities (ApplicationLinksApplicationProfile): [optional] # noqa: E501 - merchants (ApplicationLinksApplicationProfile): [optional] # noqa: E501 - owner_identity (ApplicationLinksApplicationProfile): [optional] # noqa: E501 - payment_instruments (ApplicationLinksApplicationProfile): [optional] # noqa: E501 - processors (ApplicationLinksApplicationProfile): [optional] # noqa: E501 - reversals (ApplicationLinksApplicationProfile): [optional] # noqa: E501 + authorizations (ApplicationLinksAuthorizations): [optional] # noqa: E501 + application_profile (ApplicationLinksAuthorizations): [optional] # noqa: E501 + disputes (ApplicationLinksAuthorizations): [optional] # noqa: E501 + identities (ApplicationLinksAuthorizations): [optional] # noqa: E501 + merchants (ApplicationLinksAuthorizations): [optional] # noqa: E501 + owner_identity (ApplicationLinksAuthorizations): [optional] # noqa: E501 + payment_instruments (ApplicationLinksAuthorizations): [optional] # noqa: E501 + processors (ApplicationLinksAuthorizations): [optional] # noqa: E501 + reversals (ApplicationLinksAuthorizations): [optional] # noqa: E501 self (ApplicationLinksSelf): [optional] # noqa: E501 - settlements (ApplicationLinksApplicationProfile): [optional] # noqa: E501 - tokens (ApplicationLinksApplicationProfile): [optional] # noqa: E501 - transfers (ApplicationLinksApplicationProfile): [optional] # noqa: E501 - users (ApplicationLinksApplicationProfile): [optional] # noqa: E501 - webhooks (ApplicationLinksApplicationProfile): [optional] # noqa: E501 + settlements (ApplicationLinksAuthorizations): [optional] # noqa: E501 + tokens (ApplicationLinksAuthorizations): [optional] # noqa: E501 + transfers (ApplicationLinksAuthorizations): [optional] # noqa: E501 + users (ApplicationLinksAuthorizations): [optional] # noqa: E501 + webhooks (ApplicationLinksAuthorizations): [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) @@ -261,21 +252,21 @@ def __init__(self, *args, **kwargs): # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - application_profile (ApplicationLinksApplicationProfile): [optional] # noqa: E501 - authorizations (ApplicationLinksApplicationProfile): [optional] # noqa: E501 - disputes (ApplicationLinksApplicationProfile): [optional] # noqa: E501 - identities (ApplicationLinksApplicationProfile): [optional] # noqa: E501 - merchants (ApplicationLinksApplicationProfile): [optional] # noqa: E501 - owner_identity (ApplicationLinksApplicationProfile): [optional] # noqa: E501 - payment_instruments (ApplicationLinksApplicationProfile): [optional] # noqa: E501 - processors (ApplicationLinksApplicationProfile): [optional] # noqa: E501 - reversals (ApplicationLinksApplicationProfile): [optional] # noqa: E501 + authorizations (ApplicationLinksAuthorizations): [optional] # noqa: E501 + application_profile (ApplicationLinksAuthorizations): [optional] # noqa: E501 + disputes (ApplicationLinksAuthorizations): [optional] # noqa: E501 + identities (ApplicationLinksAuthorizations): [optional] # noqa: E501 + merchants (ApplicationLinksAuthorizations): [optional] # noqa: E501 + owner_identity (ApplicationLinksAuthorizations): [optional] # noqa: E501 + payment_instruments (ApplicationLinksAuthorizations): [optional] # noqa: E501 + processors (ApplicationLinksAuthorizations): [optional] # noqa: E501 + reversals (ApplicationLinksAuthorizations): [optional] # noqa: E501 self (ApplicationLinksSelf): [optional] # noqa: E501 - settlements (ApplicationLinksApplicationProfile): [optional] # noqa: E501 - tokens (ApplicationLinksApplicationProfile): [optional] # noqa: E501 - transfers (ApplicationLinksApplicationProfile): [optional] # noqa: E501 - users (ApplicationLinksApplicationProfile): [optional] # noqa: E501 - webhooks (ApplicationLinksApplicationProfile): [optional] # noqa: E501 + settlements (ApplicationLinksAuthorizations): [optional] # noqa: E501 + tokens (ApplicationLinksAuthorizations): [optional] # noqa: E501 + transfers (ApplicationLinksAuthorizations): [optional] # noqa: E501 + users (ApplicationLinksAuthorizations): [optional] # noqa: E501 + webhooks (ApplicationLinksAuthorizations): [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) diff --git a/finix/model/application_links_application_profile.py b/finix/models/application_links_authorizations.py similarity index 95% rename from finix/model/application_links_application_profile.py rename to finix/models/application_links_authorizations.py index 4369026..46381de 100644 --- a/finix/model/application_links_application_profile.py +++ b/finix/models/application_links_authorizations.py @@ -28,7 +28,7 @@ -class ApplicationLinksApplicationProfile(ModelNormal): +class ApplicationLinksAuthorizations(ModelNormal): """ Attributes: @@ -55,13 +55,7 @@ class ApplicationLinksApplicationProfile(ModelNormal): validations = { } - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + additional_properties_type = None _nullable = False @@ -96,7 +90,7 @@ def discriminator(): @classmethod @convert_js_args_to_python_args def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """ApplicationLinksApplicationProfile - a model defined in OpenAPI + """ApplicationLinksAuthorizations - a model defined in OpenAPI Keyword Args: _check_type (bool): if True, values for parameters in openapi_types @@ -178,7 +172,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 @convert_js_args_to_python_args def __init__(self, *args, **kwargs): # noqa: E501 - """ApplicationLinksApplicationProfile - a model defined in OpenAPI + """ApplicationLinksAuthorizations - a model defined in OpenAPI Keyword Args: _check_type (bool): if True, values for parameters in openapi_types diff --git a/finix/model/application_links_self.py b/finix/models/application_links_self.py similarity index 97% rename from finix/model/application_links_self.py rename to finix/models/application_links_self.py index 1f79c2b..f432f82 100644 --- a/finix/model/application_links_self.py +++ b/finix/models/application_links_self.py @@ -55,13 +55,7 @@ class ApplicationLinksSelf(ModelNormal): validations = { } - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + additional_properties_type = None _nullable = False diff --git a/finix/model/application_profile.py b/finix/models/application_profile.py similarity index 91% rename from finix/model/application_profile.py rename to finix/models/application_profile.py index 7a73d84..f304bc3 100644 --- a/finix/model/application_profile.py +++ b/finix/models/application_profile.py @@ -28,10 +28,7 @@ def lazy_import(): - from finix.model.application_profile_links import ApplicationProfileLinks - from finix.model.tags import Tags - globals()['ApplicationProfileLinks'] = ApplicationProfileLinks - globals()['Tags'] = Tags + ApplicationProfileLinks class ApplicationProfile(ModelNormal): @@ -61,14 +58,7 @@ class ApplicationProfile(ModelNormal): validations = { } - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + additional_properties_type = None _nullable = False @@ -88,9 +78,9 @@ def openapi_types(): 'created_at': (datetime,), # noqa: E501 'updated_at': (datetime,), # noqa: E501 'application': (str,), # noqa: E501 - 'fee_profile': (str, none_type,), # noqa: E501 + 'fee_profile': (str,), # noqa: E501 'risk_profile': (str,), # noqa: E501 - 'tags': (Tags,), # noqa: E501 + 'tags': (object,), # noqa: E501 'links': (ApplicationProfileLinks,), # noqa: E501 } @@ -155,9 +145,9 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 created_at (datetime): Timestamp of when the object was created.. [optional] # noqa: E501 updated_at (datetime): Timestamp of when the object was last updated.. [optional] # noqa: E501 application (str): The ID of the `Application` resource.. [optional] # noqa: E501 - fee_profile (str, none_type): The ID of the `Fee Profile` associated with the `Application`.. [optional] # noqa: E501 + fee_profile (str): The ID of the `Fee Profile` associated with the `Application`.. [optional] # noqa: E501 risk_profile (str): The ID of the `risk_profile` that was created during provisioning.. [optional] # noqa: E501 - tags (Tags): [optional] # noqa: E501 + tags (object): Include up to 50 `key`: **value** pairs to annotate requests with custom metadata. - Maximum character length for individual `keys` is 40. - Maximum character length for individual **values** is 500. (e.g., `order number`: **25**, `item_type`: **produce**, `department`: **sales**, etc.). [optional] # noqa: E501 links (ApplicationProfileLinks): [optional] # noqa: E501 """ @@ -244,9 +234,9 @@ def __init__(self, *args, **kwargs): # noqa: E501 created_at (datetime): Timestamp of when the object was created.. [optional] # noqa: E501 updated_at (datetime): Timestamp of when the object was last updated.. [optional] # noqa: E501 application (str): The ID of the `Application` resource.. [optional] # noqa: E501 - fee_profile (str, none_type): The ID of the `Fee Profile` associated with the `Application`.. [optional] # noqa: E501 + fee_profile (str): The ID of the `Fee Profile` associated with the `Application`.. [optional] # noqa: E501 risk_profile (str): The ID of the `risk_profile` that was created during provisioning.. [optional] # noqa: E501 - tags (Tags): [optional] # noqa: E501 + tags (object): Include up to 50 `key`: **value** pairs to annotate requests with custom metadata. - Maximum character length for individual `keys` is 40. - Maximum character length for individual **values** is 500. (e.g., `order number`: **25**, `item_type`: **produce**, `department`: **sales**, etc.). [optional] # noqa: E501 links (ApplicationProfileLinks): [optional] # noqa: E501 """ diff --git a/finix/model/application_profile_links.py b/finix/models/application_profile_links.py similarity index 88% rename from finix/model/application_profile_links.py rename to finix/models/application_profile_links.py index e22e859..a1148b3 100644 --- a/finix/model/application_profile_links.py +++ b/finix/models/application_profile_links.py @@ -28,12 +28,9 @@ def lazy_import(): - from finix.model.application_links_application_profile import ApplicationLinksApplicationProfile - from finix.model.application_links_self import ApplicationLinksSelf - from finix.model.application_profile_links_application import ApplicationProfileLinksApplication - globals()['ApplicationLinksApplicationProfile'] = ApplicationLinksApplicationProfile - globals()['ApplicationLinksSelf'] = ApplicationLinksSelf - globals()['ApplicationProfileLinksApplication'] = ApplicationProfileLinksApplication + ApplicationLinksAuthorizations + ApplicationLinksSelf + ApplicationProfileLinksApplication class ApplicationProfileLinks(ModelNormal): @@ -63,14 +60,7 @@ class ApplicationProfileLinks(ModelNormal): validations = { } - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + additional_properties_type = None _nullable = False @@ -87,8 +77,8 @@ def openapi_types(): lazy_import() return { 'application': (ApplicationProfileLinksApplication,), # noqa: E501 - 'fee_profile': (ApplicationLinksApplicationProfile,), # noqa: E501 - 'risk_profile': (ApplicationLinksApplicationProfile,), # noqa: E501 + 'fee_profile': (ApplicationLinksAuthorizations,), # noqa: E501 + 'risk_profile': (ApplicationLinksAuthorizations,), # noqa: E501 'self': (ApplicationLinksSelf,), # noqa: E501 } @@ -146,8 +136,8 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 through its discriminator because we passed in _visited_composed_classes = (Animal,) application (ApplicationProfileLinksApplication): [optional] # noqa: E501 - fee_profile (ApplicationLinksApplicationProfile): [optional] # noqa: E501 - risk_profile (ApplicationLinksApplicationProfile): [optional] # noqa: E501 + fee_profile (ApplicationLinksAuthorizations): [optional] # noqa: E501 + risk_profile (ApplicationLinksAuthorizations): [optional] # noqa: E501 self (ApplicationLinksSelf): [optional] # noqa: E501 """ @@ -231,8 +221,8 @@ def __init__(self, *args, **kwargs): # noqa: E501 through its discriminator because we passed in _visited_composed_classes = (Animal,) application (ApplicationProfileLinksApplication): [optional] # noqa: E501 - fee_profile (ApplicationLinksApplicationProfile): [optional] # noqa: E501 - risk_profile (ApplicationLinksApplicationProfile): [optional] # noqa: E501 + fee_profile (ApplicationLinksAuthorizations): [optional] # noqa: E501 + risk_profile (ApplicationLinksAuthorizations): [optional] # noqa: E501 self (ApplicationLinksSelf): [optional] # noqa: E501 """ diff --git a/finix/model/application_profile_links_application.py b/finix/models/application_profile_links_application.py similarity index 97% rename from finix/model/application_profile_links_application.py rename to finix/models/application_profile_links_application.py index 91bbde9..3c730c7 100644 --- a/finix/model/application_profile_links_application.py +++ b/finix/models/application_profile_links_application.py @@ -55,13 +55,7 @@ class ApplicationProfileLinksApplication(ModelNormal): validations = { } - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + additional_properties_type = None _nullable = False diff --git a/finix/model/application_profiles_list.py b/finix/models/application_profiles_list.py similarity index 91% rename from finix/model/application_profiles_list.py rename to finix/models/application_profiles_list.py index f1f22a6..e208b1f 100644 --- a/finix/model/application_profiles_list.py +++ b/finix/models/application_profiles_list.py @@ -28,12 +28,9 @@ def lazy_import(): - from finix.model.application_profiles_list_embedded import ApplicationProfilesListEmbedded - from finix.model.application_profiles_list_links import ApplicationProfilesListLinks - from finix.model.page_cursor import PageCursor - globals()['ApplicationProfilesListEmbedded'] = ApplicationProfilesListEmbedded - globals()['ApplicationProfilesListLinks'] = ApplicationProfilesListLinks - globals()['PageCursor'] = PageCursor + ApplicationProfilesListEmbedded + ListLinks + PageCursor class ApplicationProfilesList(ModelNormal): @@ -63,14 +60,7 @@ class ApplicationProfilesList(ModelNormal): validations = { } - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + additional_properties_type = None _nullable = False @@ -88,7 +78,7 @@ def openapi_types(): return { 'page': (PageCursor,), # noqa: E501 'embedded': (ApplicationProfilesListEmbedded,), # noqa: E501 - 'links': (ApplicationProfilesListLinks,), # noqa: E501 + 'links': (ListLinks,), # noqa: E501 } @cached_property @@ -145,7 +135,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 _visited_composed_classes = (Animal,) page (PageCursor): [optional] # noqa: E501 embedded (ApplicationProfilesListEmbedded): [optional] # noqa: E501 - links (ApplicationProfilesListLinks): [optional] # noqa: E501 + links (ListLinks): [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) @@ -229,7 +219,7 @@ def __init__(self, *args, **kwargs): # noqa: E501 _visited_composed_classes = (Animal,) page (PageCursor): [optional] # noqa: E501 embedded (ApplicationProfilesListEmbedded): [optional] # noqa: E501 - links (ApplicationProfilesListLinks): [optional] # noqa: E501 + links (ListLinks): [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) diff --git a/finix/model/application_profiles_list_embedded.py b/finix/models/application_profiles_list_embedded.py similarity index 93% rename from finix/model/application_profiles_list_embedded.py rename to finix/models/application_profiles_list_embedded.py index a78ecbf..effef8b 100644 --- a/finix/model/application_profiles_list_embedded.py +++ b/finix/models/application_profiles_list_embedded.py @@ -28,8 +28,7 @@ def lazy_import(): - from finix.model.application_profile import ApplicationProfile - globals()['ApplicationProfile'] = ApplicationProfile + ApplicationProfile class ApplicationProfilesListEmbedded(ModelNormal): @@ -62,14 +61,7 @@ class ApplicationProfilesListEmbedded(ModelNormal): }, } - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + additional_properties_type = None _nullable = False @@ -85,7 +77,7 @@ def openapi_types(): """ lazy_import() return { - 'application_profiles': ([ApplicationProfile],), # noqa: E501 + 'application_profiles': (List[ApplicationProfile],), # noqa: E501 } @cached_property @@ -138,7 +130,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - application_profiles ([ApplicationProfile]): `application_profile` resources.. [optional] # noqa: E501 + application_profiles (List[ApplicationProfile]): `application_profile` resources.. [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) @@ -220,7 +212,7 @@ def __init__(self, *args, **kwargs): # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - application_profiles ([ApplicationProfile]): `application_profile` resources.. [optional] # noqa: E501 + application_profiles (List[ApplicationProfile]): `application_profile` resources.. [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) diff --git a/finix/model/applications_list.py b/finix/models/applications_list.py similarity index 94% rename from finix/model/applications_list.py rename to finix/models/applications_list.py index 8cd62f7..5970445 100644 --- a/finix/model/applications_list.py +++ b/finix/models/applications_list.py @@ -28,12 +28,9 @@ def lazy_import(): - from finix.model.applications_list_embedded import ApplicationsListEmbedded - from finix.model.list_links import ListLinks - from finix.model.page_cursor import PageCursor - globals()['ApplicationsListEmbedded'] = ApplicationsListEmbedded - globals()['ListLinks'] = ListLinks - globals()['PageCursor'] = PageCursor + ApplicationsListEmbedded + ListLinks + PageCursor class ApplicationsList(ModelNormal): @@ -63,14 +60,7 @@ class ApplicationsList(ModelNormal): validations = { } - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + additional_properties_type = None _nullable = False diff --git a/finix/model/applications_list_embedded.py b/finix/models/applications_list_embedded.py similarity index 93% rename from finix/model/applications_list_embedded.py rename to finix/models/applications_list_embedded.py index 752a10b..f95c06a 100644 --- a/finix/model/applications_list_embedded.py +++ b/finix/models/applications_list_embedded.py @@ -28,8 +28,7 @@ def lazy_import(): - from finix.model.application import Application - globals()['Application'] = Application + Application class ApplicationsListEmbedded(ModelNormal): @@ -62,14 +61,7 @@ class ApplicationsListEmbedded(ModelNormal): }, } - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + additional_properties_type = None _nullable = False @@ -85,7 +77,7 @@ def openapi_types(): """ lazy_import() return { - 'applications': ([Application],), # noqa: E501 + 'applications': (List[Application],), # noqa: E501 } @cached_property @@ -138,7 +130,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - applications ([Application]): `Application` resources.. [optional] # noqa: E501 + applications (List[Application]): `Application` resources.. [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) @@ -220,7 +212,7 @@ def __init__(self, *args, **kwargs): # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - applications ([Application]): `Application` resources.. [optional] # noqa: E501 + applications (List[Application]): `Application` resources.. [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) diff --git a/finix/model/associated_identity.py b/finix/models/associated_identity.py similarity index 93% rename from finix/model/associated_identity.py rename to finix/models/associated_identity.py index 0bd4603..64504bc 100644 --- a/finix/model/associated_identity.py +++ b/finix/models/associated_identity.py @@ -28,12 +28,8 @@ def lazy_import(): - from finix.model.associated_identity_entity import AssociatedIdentityEntity - from finix.model.identity_links import IdentityLinks - from finix.model.tags import Tags - globals()['AssociatedIdentityEntity'] = AssociatedIdentityEntity - globals()['IdentityLinks'] = IdentityLinks - globals()['Tags'] = Tags + AssociatedIdentityEntity + IdentityLinks class AssociatedIdentity(ModelNormal): @@ -69,14 +65,7 @@ class AssociatedIdentity(ModelNormal): }, } - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + additional_properties_type = None _nullable = False @@ -97,7 +86,7 @@ def openapi_types(): 'updated_at': (datetime,), # noqa: E501 'application': (str,), # noqa: E501 'entity': (AssociatedIdentityEntity,), # noqa: E501 - 'tags': (Tags,), # noqa: E501 + 'tags': (object,), # noqa: E501 'links': (IdentityLinks,), # noqa: E501 } @@ -162,7 +151,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 updated_at (datetime): Timestamp of when the object was last updated.. [optional] # noqa: E501 application (str): ID of the `Application` associated with the `Identity`.. [optional] # noqa: E501 entity (AssociatedIdentityEntity): [optional] # noqa: E501 - tags (Tags): [optional] # noqa: E501 + tags (object): Include up to 50 `key`: **value** pairs to annotate requests with custom metadata. - Maximum character length for individual `keys` is 40. - Maximum character length for individual **values** is 500. (e.g., `order number`: **25**, `item_type`: **produce**, `department`: **sales**, etc.). [optional] # noqa: E501 links (IdentityLinks): [optional] # noqa: E501 """ @@ -250,7 +239,7 @@ def __init__(self, *args, **kwargs): # noqa: E501 updated_at (datetime): Timestamp of when the object was last updated.. [optional] # noqa: E501 application (str): ID of the `Application` associated with the `Identity`.. [optional] # noqa: E501 entity (AssociatedIdentityEntity): [optional] # noqa: E501 - tags (Tags): [optional] # noqa: E501 + tags (object): Include up to 50 `key`: **value** pairs to annotate requests with custom metadata. - Maximum character length for individual `keys` is 40. - Maximum character length for individual **values** is 500. (e.g., `order number`: **25**, `item_type`: **produce**, `department`: **sales**, etc.). [optional] # noqa: E501 links (IdentityLinks): [optional] # noqa: E501 """ diff --git a/finix/model/associated_identity_entity.py b/finix/models/associated_identity_entity.py similarity index 61% rename from finix/model/associated_identity_entity.py rename to finix/models/associated_identity_entity.py index 8310c0f..e286c41 100644 --- a/finix/model/associated_identity_entity.py +++ b/finix/models/associated_identity_entity.py @@ -28,14 +28,10 @@ def lazy_import(): - from finix.model.identity_entity_business_address import IdentityEntityBusinessAddress - from finix.model.identity_entity_dob import IdentityEntityDob - from finix.model.identity_entity_incorporation_date import IdentityEntityIncorporationDate - from finix.model.identity_entity_personal_address import IdentityEntityPersonalAddress - globals()['IdentityEntityBusinessAddress'] = IdentityEntityBusinessAddress - globals()['IdentityEntityDob'] = IdentityEntityDob - globals()['IdentityEntityIncorporationDate'] = IdentityEntityIncorporationDate - globals()['IdentityEntityPersonalAddress'] = IdentityEntityPersonalAddress + IdentityEntityBusinessAddress + IdentityEntityDob + IdentityEntityFormIncorporationDate + IdentityEntityPersonalAddress class AssociatedIdentityEntity(ModelNormal): @@ -62,8 +58,8 @@ class AssociatedIdentityEntity(ModelNormal): allowed_values = { ('ownership_type',): { 'None': None, - 'PUBLIC': "PUBLIC", - 'PRIVATE': "PRIVATE", + ''PUBLIC'': 'PUBLIC', + ''PRIVATE'': 'PRIVATE', }, } @@ -106,14 +102,7 @@ class AssociatedIdentityEntity(ModelNormal): }, } - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + additional_properties_type = None _nullable = False @@ -129,33 +118,33 @@ def openapi_types(): """ lazy_import() return { - 'amex_mid': (int, none_type,), # noqa: E501 - 'annual_card_volume': (int, none_type,), # noqa: E501 'business_address': (IdentityEntityBusinessAddress,), # noqa: E501 - 'business_name': (str, none_type,), # noqa: E501 - 'business_phone': (str, none_type,), # noqa: E501 + 'business_name': (str,), # noqa: E501 + 'business_phone': (str,), # noqa: E501 'business_tax_id_provided': (bool,), # noqa: E501 - 'business_type': (str, none_type,), # noqa: E501 - 'default_statement_descriptor': (str, none_type,), # noqa: E501 - 'discover_mid': (int, none_type,), # noqa: E501 + 'business_type': (str,), # noqa: E501 + 'default_statement_descriptor': (str,), # noqa: E501 + 'discover_mid': (int,), # noqa: E501 'dob': (IdentityEntityDob,), # noqa: E501 - 'doing_business_as': (str, none_type,), # noqa: E501 - 'email': (str, none_type,), # noqa: E501 - 'first_name': (str, none_type,), # noqa: E501 + 'doing_business_as': (str,), # noqa: E501 + 'email': (str,), # noqa: E501 + 'first_name': (str,), # noqa: E501 'has_accepted_credit_cards_previously': (bool,), # noqa: E501 - 'incorporation_date': (IdentityEntityIncorporationDate,), # noqa: E501 - 'last_name': (str, none_type,), # noqa: E501 - 'max_transaction_amount': (int, none_type,), # noqa: E501 - 'mcc': (str, none_type,), # noqa: E501 - 'ownership_type': (str, none_type,), # noqa: E501 + 'incorporation_date': (IdentityEntityFormIncorporationDate,), # noqa: E501 + 'last_name': (str,), # noqa: E501 + 'max_transaction_amount': (int,), # noqa: E501 + 'mcc': (str,), # noqa: E501 + 'ownership_type': (str,), # noqa: E501 'personal_address': (IdentityEntityPersonalAddress,), # noqa: E501 - 'phone': (str, none_type,), # noqa: E501 - 'principal_percentage_ownership': (int, none_type,), # noqa: E501 - 'short_business_name': (str, none_type,), # noqa: E501 - 'tax_authority': (str, none_type,), # noqa: E501 + 'phone': (str,), # noqa: E501 + 'principal_percentage_ownership': (int,), # noqa: E501 + 'short_business_name': (str,), # noqa: E501 + 'tax_authority': (str,), # noqa: E501 'tax_id_provided': (bool,), # noqa: E501 - 'title': (str, none_type,), # noqa: E501 - 'url': (str, none_type,), # noqa: E501 + 'title': (str,), # noqa: E501 + 'url': (str,), # noqa: E501 + 'amex_mid': (int,), # noqa: E501 + 'annual_card_volume': (int,), # noqa: E501 } @cached_property @@ -164,8 +153,6 @@ def discriminator(): attribute_map = { - 'amex_mid': 'amex_mid', # noqa: E501 - 'annual_card_volume': 'annual_card_volume', # noqa: E501 'business_address': 'business_address', # noqa: E501 'business_name': 'business_name', # noqa: E501 'business_phone': 'business_phone', # noqa: E501 @@ -191,6 +178,8 @@ def discriminator(): 'tax_id_provided': 'tax_id_provided', # noqa: E501 'title': 'title', # noqa: E501 'url': 'url', # noqa: E501 + 'amex_mid': 'amex_mid', # noqa: E501 + 'annual_card_volume': 'annual_card_volume', # noqa: E501 } read_only_vars = { @@ -234,33 +223,33 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - amex_mid (int, none_type): Assigned amexMid value. If a value is passed, it must be 10 or 11 digits.. [optional] # noqa: E501 - annual_card_volume (int, none_type): The annual credit card sales (in cents) expected to be processed by this merchant (max 19 characters).. [optional] # noqa: E501 business_address (IdentityEntityBusinessAddress): [optional] # noqa: E501 - business_name (str, none_type): The merchant's legal business name (max 120 characters).