diff --git a/README.md b/README.md index 9328faf..1370f22 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ This is the official Finix Python library Our team is hard at work revamping our SDKs to bring you exciting new features and optimizations. -While we fine-tune and make changes, we've temporarily paused releasing updates since 09/20/222. If you have any questions, feel free to reach out to the [Finix Support Team](mailto:support@finixpayments.com). +While we fine-tune and make changes, we've temporarily paused releasing updates since 09/20/22. If you have any questions, feel free to reach out to the [Finix Support Team](mailto:support@finixpayments.com). ### Prerequisites - Python>=3.6 diff --git a/finix/api/authorizations_api.py b/finix/api/authorizations_api.py index 00ed1c8..bccdf74 100644 --- a/finix/api/authorizations_api.py +++ b/finix/api/authorizations_api.py @@ -30,6 +30,7 @@ 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 finix.model.void_authorization import VoidAuthorization from finix.model.finix_utils import FinixList from functools import wraps @@ -79,6 +80,8 @@ def __init__(self, api_client=None): params_map={ 'all': [ 'authorization_id', + 'accept', + 'finix_version', 'update_authorization_request', ], 'required': [ @@ -99,14 +102,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 +125,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 +146,8 @@ def __init__(self, api_client=None): }, params_map={ 'all': [ + 'accept', + 'finix_version', 'create_authorization_request', ], 'required': [], @@ -151,12 +164,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 +185,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 +207,7 @@ def __init__(self, api_client=None): params_map={ 'all': [ 'authorization_id', + 'accept', ], 'required': [ 'authorization_id', @@ -205,19 +227,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 +262,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 +293,7 @@ def __init__(self, api_client=None): 'instrument_card_last4', 'merchant_processor_id', 'type', - 'after_cursor', + 'finix_version', ], 'required': [], 'nullable': [ @@ -288,6 +317,8 @@ def __init__(self, api_client=None): }, }, 'openapi_types': { + 'accept': + (str,), 'amount': (int,), 'amount_gt': @@ -300,6 +331,8 @@ def __init__(self, api_client=None): (int,), 'before_cursor': (str,), + 'after_cursor': + (str,), 'created_at_gte': (str,), 'created_at_lte': @@ -308,7 +341,9 @@ def __init__(self, api_client=None): (str,), 'limit': (int,), - 'sort': + 'tags_key': + (str,), + 'tags_value': (str,), 'state': (str,), @@ -344,21 +379,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 +414,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 +448,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 +536,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 +547,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 +616,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 +625,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 +704,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 +780,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 +811,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 +872,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..04ad754 100644 --- a/finix/api/balance_transfers_api.py +++ b/finix/api/balance_transfers_api.py @@ -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..8fa527b 100644 --- a/finix/api/compliance_forms_api.py +++ b/finix/api/compliance_forms_api.py @@ -20,6 +20,7 @@ validate_and_convert_types ) from finix.model.compliance_form import ComplianceForm +from finix.model.compliance_form_list import ComplianceFormList from finix.model.error401_unauthorized import Error401Unauthorized from finix.model.error403_forbidden_list import Error403ForbiddenList from finix.model.error404_not_found_list import Error404NotFoundList @@ -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' + ], + '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', - 'application/hal+json' + '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..95116b7 --- /dev/null +++ b/finix/api/default_api.py @@ -0,0 +1,604 @@ +""" + 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 finix.model.application import Application +from finix.model.create_application_request import CreateApplicationRequest +from finix.model.create_settlement_request import CreateSettlementRequest +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.settlement import Settlement +from finix.model.split_transfers_list import SplitTransfersList +from finix.model.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..06c8ed2 100644 --- a/finix/api/devices_api.py +++ b/finix/api/devices_api.py @@ -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,15 +159,19 @@ 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': { @@ -169,7 +179,69 @@ def __init__(self, api_client=None): }, headers_map={ 'accept': [ - 'application/hal+json' + '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/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..81940ff 100644 --- a/finix/api/disputes_api.py +++ b/finix/api/disputes_api.py @@ -19,6 +19,7 @@ none_type, validate_and_convert_types ) +from finix.model.accept_dispute import AcceptDispute from finix.model.adjustment_transfers_list import AdjustmentTransfersList from finix.model.create_dispute_evidence_request import CreateDisputeEvidenceRequest from finix.model.dispute import Dispute @@ -29,6 +30,9 @@ 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.submit_dispute_evidence import SubmitDisputeEvidence +from finix.model.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': (file_type,), + '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 + file_type 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..2e40535 100644 --- a/finix/api/fee_profiles_api.py +++ b/finix/api/fee_profiles_api.py @@ -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..2390255 100644 --- a/finix/api/files_api.py +++ b/finix/api/files_api.py @@ -79,6 +79,7 @@ def __init__(self, api_client=None): params_map={ 'all': [ 'file_id', + 'accept', 'create_external_link_request', ], 'required': [ @@ -99,14 +100,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 +119,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,11 +169,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 @@ -188,6 +191,8 @@ def __init__(self, api_client=None): params_map={ 'all': [ 'file_id', + 'accept', + 'stream', ], 'required': [ 'file_id', @@ -195,6 +200,7 @@ def __init__(self, api_client=None): 'nullable': [ ], 'enum': [ + 'stream', ], 'validation': [ ] @@ -203,16 +209,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 +239,7 @@ def __init__(self, api_client=None): headers_map={ 'accept': [ 'application/octet-stream', - 'application/hal+json' + 'application/json' ], 'content_type': [], }, @@ -241,6 +260,7 @@ def __init__(self, api_client=None): 'all': [ 'file_id', 'external_link_id', + 'accept', ], 'required': [ 'file_id', @@ -263,22 +283,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 +321,7 @@ def __init__(self, api_client=None): params_map={ 'all': [ 'file_id', + 'accept', ], 'required': [ 'file_id', @@ -317,20 +341,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 +377,7 @@ def __init__(self, api_client=None): params_map={ 'all': [ 'file_id', - 'sort', + 'accept', 'after_cursor', 'limit', 'id', @@ -378,7 +405,7 @@ def __init__(self, api_client=None): 'openapi_types': { 'file_id': (str,), - 'sort': + 'accept': (str,), 'after_cursor': (str,), @@ -399,7 +426,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 +438,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 +453,7 @@ def __init__(self, api_client=None): }, headers_map={ 'accept': [ - 'application/vnd.api+json', - 'application/hal+json' + 'application/json' ], 'content_type': [], }, @@ -446,7 +472,6 @@ def __init__(self, api_client=None): }, params_map={ 'all': [ - 'sort', 'after_cursor', 'limit', 'id', @@ -470,8 +495,6 @@ def __init__(self, api_client=None): 'allowed_values': { }, 'openapi_types': { - 'sort': - (str,), 'after_cursor': (str,), 'limit': @@ -490,7 +513,6 @@ def __init__(self, api_client=None): (str,), }, 'attribute_map': { - 'sort': 'sort', 'after_cursor': 'after_cursor', 'limit': 'limit', 'id': 'id', @@ -501,7 +523,6 @@ def __init__(self, api_client=None): 'before_cursor': 'before_cursor', }, 'location_map': { - 'sort': 'query', 'after_cursor': 'query', 'limit': 'query', 'id': 'query', @@ -516,8 +537,7 @@ def __init__(self, api_client=None): }, headers_map={ 'accept': [ - 'application/vnd.api+json', - 'application/hal+json' + 'application/json' ], 'content_type': [], }, @@ -537,6 +557,7 @@ def __init__(self, api_client=None): params_map={ 'all': [ 'file_id', + 'accept', 'upload_file_request', ], 'required': [ @@ -557,14 +578,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 +597,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 +613,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 +624,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 +692,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 +765,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 +778,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 @@ -821,7 +848,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 +860,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 +930,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 +941,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 +1009,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 +1020,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 +1097,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 +1106,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 +1181,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 +1192,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..83e11a4 100644 --- a/finix/api/identities_api.py +++ b/finix/api/identities_api.py @@ -21,7 +21,6 @@ ) 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 @@ -30,7 +29,6 @@ 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 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' + 'application/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' - ], - '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,7 +595,9 @@ def create( Keyword Args: - create_identity_request (CreateIdentityRequest): . [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" + create_identity_request (CreateIdentityRequest): [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 @@ -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..7955cb3 100644 --- a/finix/api/instrument_updates_api.py +++ b/finix/api/instrument_updates_api.py @@ -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' @@ -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,7 +249,8 @@ def create( Keyword Args: - create_instrument_update_request (CreateInstrumentUpdateRequest): . [optional] + 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. _preload_content (bool): if False, the urllib3.HTTPResponse object @@ -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. @@ -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..1ce3558 100644 --- a/finix/api/merchant_profiles_api.py +++ b/finix/api/merchant_profiles_api.py @@ -75,6 +75,7 @@ def __init__(self, api_client=None): params_map={ 'all': [ 'merchant_profile_id', + 'accept', ], 'required': [ 'merchant_profile_id', @@ -94,19 +95,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 +130,7 @@ def __init__(self, api_client=None): }, params_map={ 'all': [ + 'accept', 'id', 'before_cursor', 'limit', @@ -144,6 +150,8 @@ def __init__(self, api_client=None): 'allowed_values': { }, 'openapi_types': { + 'accept': + (str,), 'id': (str,), 'before_cursor': @@ -154,12 +162,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 +180,7 @@ def __init__(self, api_client=None): }, headers_map={ 'accept': [ - 'application/hal+json' + 'application/json' ], 'content_type': [], }, @@ -190,6 +200,7 @@ def __init__(self, api_client=None): params_map={ 'all': [ 'merchant_profile_id', + 'accept', 'update_merchant_profile_request', ], 'required': [ @@ -210,14 +221,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 +240,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 +267,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 +343,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 +426,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..f8db7fd 100644 --- a/finix/api/merchants_api.py +++ b/finix/api/merchants_api.py @@ -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': + 'accept': (str,), - 'created_at_gte': - (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..c376605 100644 --- a/finix/api/onboarding_forms_api.py +++ b/finix/api/onboarding_forms_api.py @@ -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..5aa6401 100644 --- a/finix/api/payment_instruments_api.py +++ b/finix/api/payment_instruments_api.py @@ -29,7 +29,6 @@ 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 finix.model.finix_utils import FinixList @@ -109,10 +108,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 +129,8 @@ def __init__(self, api_client=None): }, params_map={ 'all': [ + 'accept', + 'finix_version', 'create_payment_instrument_request', ], 'required': [], @@ -146,12 +147,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 +168,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 +190,7 @@ def __init__(self, api_client=None): params_map={ 'all': [ 'payment_instrument_id', + 'accept', ], 'required': [ 'payment_instrument_id', @@ -200,85 +210,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 +245,7 @@ def __init__(self, api_client=None): }, params_map={ 'all': [ + 'accept', 'account_last4', 'account_routing_number', 'after_cursor', @@ -307,11 +256,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': [ @@ -334,6 +285,8 @@ def __init__(self, api_client=None): }, }, 'openapi_types': { + 'accept': + (str,), 'account_last4': (str,), 'account_routing_number': @@ -354,7 +307,7 @@ def __init__(self, api_client=None): (str,), 'expiration_year': (str,), - 'last_four': + 'last4': (str,), 'limit': (int,), @@ -364,8 +317,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 +334,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 +354,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 +387,8 @@ def __init__(self, api_client=None): params_map={ 'all': [ 'payment_instrument_id', + 'accept', + 'finix_version', 'update_payment_instrument_request', ], 'required': [ @@ -444,14 +409,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 +432,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 +447,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 +521,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,7 +530,9 @@ def create( Keyword Args: - create_payment_instrument_request (CreatePaymentInstrumentRequest): . [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" + create_payment_instrument_request (CreatePaymentInstrumentRequest): [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 @@ -634,6 +609,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 +670,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 +685,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 +696,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 +770,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 +781,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..2273902 --- /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 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.payout_profile import PayoutProfile +from finix.model.payout_profiles_list import PayoutProfilesList +from finix.model.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..5787695 100644 --- a/finix/api/settlements_api.py +++ b/finix/api/settlements_api.py @@ -19,13 +19,12 @@ none_type, validate_and_convert_types ) -from finix.model.create_settlement_request import CreateSettlementRequest +from finix.model.close_settlement import CloseSettlement 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 @@ -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..18210db --- /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 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.split_transfer import SplitTransfer +from finix.model.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..1dc1c79 100644 --- a/finix/api/transfers_api.py +++ b/finix/api/transfers_api.py @@ -79,6 +79,8 @@ def __init__(self, api_client=None): }, params_map={ 'all': [ + 'accept', + 'finix_version', 'create_transfer_request', ], 'required': [], @@ -95,12 +97,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 +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 @@ -130,6 +140,7 @@ def __init__(self, api_client=None): params_map={ 'all': [ 'transfer_id', + 'finix_version', 'create_reversal_request', ], 'required': [ @@ -150,14 +161,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 +180,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 +202,7 @@ def __init__(self, api_client=None): params_map={ 'all': [ 'transfer_id', + 'accept', ], 'required': [ 'transfer_id', @@ -206,19 +222,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 +258,7 @@ def __init__(self, api_client=None): params_map={ 'all': [ 'transfer_id', + 'accept', 'limit', 'after_cursor', 'before_cursor', @@ -260,6 +281,8 @@ def __init__(self, api_client=None): 'openapi_types': { 'transfer_id': (str,), + 'accept': + (str,), 'limit': (int,), 'after_cursor': @@ -269,12 +292,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 +309,7 @@ def __init__(self, api_client=None): }, headers_map={ 'accept': [ - 'application/hal+json' + 'application/json' ], 'content_type': [], }, @@ -303,7 +328,7 @@ def __init__(self, api_client=None): }, params_map={ 'all': [ - 'sort', + 'accept', 'after_cursor', 'limit', 'amount', @@ -315,9 +340,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 +360,8 @@ def __init__(self, api_client=None): 'merchant_processor_id', 'type', 'before_cursor', + 'tags_key', + 'tags_value', ], 'required': [], 'nullable': [ @@ -368,7 +395,7 @@ def __init__(self, api_client=None): }, }, 'openapi_types': { - 'sort': + 'accept': (str,), 'after_cursor': (str,), @@ -392,12 +419,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 +459,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 +477,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 +497,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 +513,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 +533,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 +561,7 @@ def __init__(self, api_client=None): params_map={ 'all': [ 'transfer_id', + 'accept', 'update_transfer_request', ], 'required': [ @@ -546,14 +582,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 +601,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 +616,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 +625,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 +693,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 +704,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 +784,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 +863,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 +944,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 +956,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 +976,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 +1056,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..e4d55b1 100644 --- a/finix/api/verifications_api.py +++ b/finix/api/verifications_api.py @@ -19,13 +19,10 @@ 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 finix.model.finix_utils import FinixList @@ -63,56 +60,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 +74,7 @@ def __init__(self, api_client=None): params_map={ 'all': [ 'verification_id', + 'accept', ], 'required': [ 'verification_id', @@ -146,19 +94,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 +130,7 @@ def __init__(self, api_client=None): params_map={ 'all': [ 'merchant_id', + 'accept', 'limit', 'after_cursor', 'before_cursor', @@ -200,6 +153,8 @@ def __init__(self, api_client=None): 'openapi_types': { 'merchant_id': (str,), + 'accept': + (str,), 'limit': (int,), 'after_cursor': @@ -209,12 +164,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 +181,7 @@ def __init__(self, api_client=None): }, headers_map={ 'accept': [ - 'application/hal+json' + 'application/json' ], 'content_type': [], }, @@ -236,21 +193,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 +223,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 +237,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 +257,7 @@ def __init__(self, api_client=None): }, headers_map={ 'accept': [ - 'application/hal+json' + 'application/json' ], 'content_type': [], }, @@ -314,6 +276,7 @@ def __init__(self, api_client=None): }, params_map={ 'all': [ + 'accept', 'limit', 'after_cursor', 'before_cursor', @@ -332,6 +295,8 @@ def __init__(self, api_client=None): 'allowed_values': { }, 'openapi_types': { + 'accept': + (str,), 'limit': (int,), 'after_cursor': @@ -340,11 +305,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 +321,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 +346,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 +425,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 +493,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 +502,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 +570,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 +591,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..7a2f5a2 100644 --- a/finix/api/webhooks_api.py +++ b/finix/api/webhooks_api.py @@ -77,6 +77,8 @@ def __init__(self, api_client=None): }, params_map={ 'all': [ + 'accept', + 'finix_version', 'create_webhook_request', ], 'required': [], @@ -93,12 +95,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 +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 @@ -128,6 +138,7 @@ def __init__(self, api_client=None): params_map={ 'all': [ 'webhook_id', + 'accept', ], 'required': [ 'webhook_id', @@ -147,19 +158,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 +233,7 @@ def __init__(self, api_client=None): }, headers_map={ 'accept': [ - 'application/hal+json' + 'application/json' ], 'content_type': [], }, @@ -238,6 +253,8 @@ def __init__(self, api_client=None): params_map={ 'all': [ 'webhook_id', + 'accept', + 'finix_version', 'update_webhook_request', ], 'required': [ @@ -258,14 +275,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 +298,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 +322,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 +401,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 +547,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 +558,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/model/accept_dispute.py b/finix/model/accept_dispute.py new file mode 100644 index 0000000..1da2568 --- /dev/null +++ b/finix/model/accept_dispute.py @@ -0,0 +1,256 @@ +""" + 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 = { + } + + @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 { + '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_healthcare_data.py b/finix/model/additional_healthcare_data.py new file mode 100644 index 0000000..deb5bad --- /dev/null +++ b/finix/model/additional_healthcare_data.py @@ -0,0 +1,262 @@ +""" + 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 AdditionalHealthcareData(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 = 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 { + 'clinic_amount': (int, none_type,), # noqa: E501 + 'dental_amount': (int, none_type,), # noqa: E501 + 'prescription_amount': (int, none_type,), # noqa: E501 + 'vision_amount': (int, none_type,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + '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 = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """AdditionalHealthcareData - 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,) + clinic_amount (int, none_type): The amount used for clinic and office visits such as a copay amount.. [optional] # noqa: E501 + dental_amount (int, none_type): The amount used for dental related expenses.. [optional] # noqa: E501 + prescription_amount (int, none_type): The amount used to purchase perscriptions and medications.. [optional] # noqa: E501 + vision_amount (int, none_type): The amount used for vision related expenses.. [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 + """AdditionalHealthcareData - 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,) + clinic_amount (int, none_type): The amount used for clinic and office visits such as a copay amount.. [optional] # noqa: E501 + dental_amount (int, none_type): The amount used for dental related expenses.. [optional] # noqa: E501 + prescription_amount (int, none_type): The amount used to purchase perscriptions and medications.. [optional] # noqa: E501 + vision_amount (int, none_type): The amount used for vision related expenses.. [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/additional_purchase_data.py b/finix/model/additional_purchase_data.py index 8a9cb4e..5cf8e09 100644 --- a/finix/model/additional_purchase_data.py +++ b/finix/model/additional_purchase_data.py @@ -28,9 +28,9 @@ def lazy_import(): - from finix.model.additional_purchase_data_item_data_inner import AdditionalPurchaseDataItemDataInner + from finix.model.additional_purchase_data_item_data import AdditionalPurchaseDataItemData from finix.model.additional_purchase_data_order_date import AdditionalPurchaseDataOrderDate - globals()['AdditionalPurchaseDataItemDataInner'] = AdditionalPurchaseDataItemDataInner + globals()['AdditionalPurchaseDataItemData'] = AdditionalPurchaseDataItemData globals()['AdditionalPurchaseDataOrderDate'] = AdditionalPurchaseDataOrderDate @@ -59,6 +59,18 @@ 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 @@ -85,14 +97,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': ([AdditionalPurchaseDataItemData],), # 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 +117,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 +125,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 +137,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 +175,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 ([AdditionalPurchaseDataItemData]): 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 +212,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 +234,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 +272,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 ([AdditionalPurchaseDataItemData]): 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 +307,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.py b/finix/model/additional_purchase_data_item_data.py new file mode 100644 index 0000000..d20e5e0 --- /dev/null +++ b/finix/model/additional_purchase_data_item_data.py @@ -0,0 +1,298 @@ +""" + 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 AdditionalPurchaseDataItemData(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 = { + ('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 + + _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 { + 'amount_excluding_sales_tax': (int,), # noqa: E501 + 'amount_including_sales_tax': (int,), # noqa: E501 + 'commodity_code': (str,), # noqa: E501 + 'cost_per_unit': (int,), # noqa: E501 + 'item_description': (str,), # noqa: E501 + 'item_discount_amount': (int,), # noqa: E501 + 'merchant_product_code': (str,), # noqa: E501 + 'quantity': (int,), # noqa: E501 + 'unit_of_measure': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'amount_excluding_sales_tax': 'amount_excluding_sales_tax', # noqa: E501 + 'amount_including_sales_tax': 'amount_including_sales_tax', # noqa: E501 + 'commodity_code': 'commodity_code', # noqa: E501 + 'cost_per_unit': 'cost_per_unit', # noqa: E501 + 'item_description': 'item_description', # noqa: E501 + 'item_discount_amount': 'item_discount_amount', # noqa: E501 + 'merchant_product_code': 'merchant_product_code', # noqa: E501 + 'quantity': 'quantity', # noqa: E501 + 'unit_of_measure': 'unit_of_measure', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """AdditionalPurchaseDataItemData - 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,) + 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 + item_discount_amount (int): Item discount amount in cents . [optional] # noqa: E501 + merchant_product_code (str): Merchant defined product code (max 12 characters).. [optional] # noqa: E501 + quantity (int): The number of items purchased. Must be greater than 0.. [optional] # noqa: E501 + unit_of_measure (str): The unit of measure of the purchased item (max 3 characters).. [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 + """AdditionalPurchaseDataItemData - 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,) + 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 + item_discount_amount (int): Item discount amount in cents . [optional] # noqa: E501 + merchant_product_code (str): Merchant defined product code (max 12 characters).. [optional] # noqa: E501 + quantity (int): The number of items purchased. Must be greater than 0.. [optional] # noqa: E501 + unit_of_measure (str): The unit of measure of the purchased item (max 3 characters).. [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/additional_purchase_data_order_date.py b/finix/model/additional_purchase_data_order_date.py index abcf61a..208ac1e 100644 --- a/finix/model/additional_purchase_data_order_date.py +++ b/finix/model/additional_purchase_data_order_date.py @@ -53,6 +53,9 @@ class AdditionalPurchaseDataOrderDate(ModelNormal): } validations = { + ('year',): { + 'inclusive_minimum': 1990, + }, } @cached_property diff --git a/finix/model/application.py b/finix/model/application.py index e146850..aa92ef9 100644 --- a/finix/model/application.py +++ b/finix/model/application.py @@ -29,9 +29,7 @@ def lazy_import(): from finix.model.application_links import ApplicationLinks - from finix.model.tags import Tags globals()['ApplicationLinks'] = ApplicationLinks - globals()['Tags'] = Tags class Application(ModelNormal): @@ -67,8 +65,9 @@ class Application(ModelNormal): 'SUCCESSFUL_CAPTURE': "SUCCESSFUL_CAPTURE", }, ('settlement_funding_identifier',): { - 'None': None, 'UNSET': "UNSET", + 'MID_AND_DATE': "MID_AND_DATE", + 'MID_AND_MERCHANT_NAME': "MID_AND_MERCHANT_NAME", }, } @@ -111,8 +110,8 @@ def openapi_types(): 'processing_enabled': (bool,), # noqa: E501 'ready_to_settle_upon': (str, none_type,), # 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': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type,), # noqa: E501 'links': (ApplicationLinks,), # noqa: E501 } @@ -192,10 +191,10 @@ def _from_openapi_data(cls, *args, **kwargs): # 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, none_type): 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 ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type): 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 """ @@ -289,10 +288,10 @@ def __init__(self, *args, **kwargs): # 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, none_type): 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 ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type): 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/model/application_links.py index 1e14492..f1d9fed 100644 --- a/finix/model/application_links.py +++ b/finix/model/application_links.py @@ -28,9 +28,9 @@ def lazy_import(): - from finix.model.application_links_application_profile import ApplicationLinksApplicationProfile + from finix.model.application_links_authorizations import ApplicationLinksAuthorizations from finix.model.application_links_self import ApplicationLinksSelf - globals()['ApplicationLinksApplicationProfile'] = ApplicationLinksApplicationProfile + globals()['ApplicationLinksAuthorizations'] = ApplicationLinksAuthorizations globals()['ApplicationLinksSelf'] = ApplicationLinksSelf @@ -84,21 +84,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 +107,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 +165,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 +261,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_authorizations.py b/finix/model/application_links_authorizations.py new file mode 100644 index 0000000..576f974 --- /dev/null +++ b/finix/model/application_links_authorizations.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 ApplicationLinksAuthorizations(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 { + 'href': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'href': 'href', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """ApplicationLinksAuthorizations - 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,) + href (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 + """ApplicationLinksAuthorizations - 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,) + href (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/application_profile.py b/finix/model/application_profile.py index 7a73d84..bf90576 100644 --- a/finix/model/application_profile.py +++ b/finix/model/application_profile.py @@ -29,9 +29,7 @@ def lazy_import(): from finix.model.application_profile_links import ApplicationProfileLinks - from finix.model.tags import Tags globals()['ApplicationProfileLinks'] = ApplicationProfileLinks - globals()['Tags'] = Tags class ApplicationProfile(ModelNormal): @@ -90,7 +88,7 @@ def openapi_types(): 'application': (str,), # noqa: E501 'fee_profile': (str, none_type,), # noqa: E501 'risk_profile': (str,), # noqa: E501 - 'tags': (Tags,), # noqa: E501 + 'tags': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type,), # noqa: E501 'links': (ApplicationProfileLinks,), # noqa: E501 } @@ -157,7 +155,7 @@ def _from_openapi_data(cls, *args, **kwargs): # 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 risk_profile (str): The ID of the `risk_profile` that was created during provisioning.. [optional] # noqa: E501 - tags (Tags): [optional] # noqa: E501 + tags ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type): 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 """ @@ -246,7 +244,7 @@ def __init__(self, *args, **kwargs): # 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 risk_profile (str): The ID of the `risk_profile` that was created during provisioning.. [optional] # noqa: E501 - tags (Tags): [optional] # noqa: E501 + tags ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type): 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/model/application_profile_links.py index e22e859..3058b8f 100644 --- a/finix/model/application_profile_links.py +++ b/finix/model/application_profile_links.py @@ -28,10 +28,10 @@ def lazy_import(): - from finix.model.application_links_application_profile import ApplicationLinksApplicationProfile + from finix.model.application_links_authorizations import ApplicationLinksAuthorizations from finix.model.application_links_self import ApplicationLinksSelf from finix.model.application_profile_links_application import ApplicationProfileLinksApplication - globals()['ApplicationLinksApplicationProfile'] = ApplicationLinksApplicationProfile + globals()['ApplicationLinksAuthorizations'] = ApplicationLinksAuthorizations globals()['ApplicationLinksSelf'] = ApplicationLinksSelf globals()['ApplicationProfileLinksApplication'] = ApplicationProfileLinksApplication @@ -87,8 +87,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 +146,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 +231,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_profiles_list.py b/finix/model/application_profiles_list.py index f1f22a6..84daee8 100644 --- a/finix/model/application_profiles_list.py +++ b/finix/model/application_profiles_list.py @@ -29,10 +29,10 @@ def lazy_import(): from finix.model.application_profiles_list_embedded import ApplicationProfilesListEmbedded - from finix.model.application_profiles_list_links import ApplicationProfilesListLinks + from finix.model.list_links import ListLinks from finix.model.page_cursor import PageCursor globals()['ApplicationProfilesListEmbedded'] = ApplicationProfilesListEmbedded - globals()['ApplicationProfilesListLinks'] = ApplicationProfilesListLinks + globals()['ListLinks'] = ListLinks globals()['PageCursor'] = PageCursor @@ -88,7 +88,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 +145,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 +229,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/associated_identity.py b/finix/model/associated_identity.py index 0bd4603..9f435fc 100644 --- a/finix/model/associated_identity.py +++ b/finix/model/associated_identity.py @@ -30,10 +30,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 class AssociatedIdentity(ModelNormal): @@ -97,7 +95,7 @@ def openapi_types(): 'updated_at': (datetime,), # noqa: E501 'application': (str,), # noqa: E501 'entity': (AssociatedIdentityEntity,), # noqa: E501 - 'tags': (Tags,), # noqa: E501 + 'tags': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type,), # noqa: E501 'links': (IdentityLinks,), # noqa: E501 } @@ -162,7 +160,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 ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type): 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 +248,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 ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type): 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/model/associated_identity_entity.py index 8310c0f..b252e56 100644 --- a/finix/model/associated_identity_entity.py +++ b/finix/model/associated_identity_entity.py @@ -30,11 +30,11 @@ 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_form_incorporation_date import IdentityEntityFormIncorporationDate from finix.model.identity_entity_personal_address import IdentityEntityPersonalAddress globals()['IdentityEntityBusinessAddress'] = IdentityEntityBusinessAddress globals()['IdentityEntityDob'] = IdentityEntityDob - globals()['IdentityEntityIncorporationDate'] = IdentityEntityIncorporationDate + globals()['IdentityEntityFormIncorporationDate'] = IdentityEntityFormIncorporationDate globals()['IdentityEntityPersonalAddress'] = IdentityEntityPersonalAddress @@ -129,8 +129,6 @@ 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 @@ -143,7 +141,7 @@ def openapi_types(): 'email': (str, none_type,), # noqa: E501 'first_name': (str, none_type,), # noqa: E501 'has_accepted_credit_cards_previously': (bool,), # noqa: E501 - 'incorporation_date': (IdentityEntityIncorporationDate,), # noqa: E501 + 'incorporation_date': (IdentityEntityFormIncorporationDate,), # noqa: E501 'last_name': (str, none_type,), # noqa: E501 'max_transaction_amount': (int, none_type,), # noqa: E501 'mcc': (str, none_type,), # noqa: E501 @@ -156,6 +154,8 @@ def openapi_types(): 'tax_id_provided': (bool,), # noqa: E501 'title': (str, none_type,), # noqa: E501 'url': (str, none_type,), # noqa: E501 + 'amex_mid': (int, none_type,), # noqa: E501 + 'annual_card_volume': (int, none_type,), # noqa: E501 } @cached_property @@ -164,8 +164,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 +189,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,8 +234,6 @@ 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).