cloudbeds-fiscal-document 1.9.2__py3-none-any.whl → 1.10.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (23) hide show
  1. cloudbeds_fiscal_document/__init__.py +4 -1
  2. cloudbeds_fiscal_document/api/configs_api.py +941 -92
  3. cloudbeds_fiscal_document/api/fiscal_documents_api.py +667 -0
  4. cloudbeds_fiscal_document/api_client.py +1 -1
  5. cloudbeds_fiscal_document/configuration.py +1 -1
  6. cloudbeds_fiscal_document/models/__init__.py +3 -0
  7. cloudbeds_fiscal_document/models/configs_response.py +13 -2
  8. cloudbeds_fiscal_document/models/create_invoice_request.py +5 -3
  9. cloudbeds_fiscal_document/models/document_action.py +1 -0
  10. cloudbeds_fiscal_document/models/fiscal_document_detailed_response.py +5 -3
  11. cloudbeds_fiscal_document/models/fiscal_document_kind.py +1 -0
  12. cloudbeds_fiscal_document/models/get_invoice_preview_request.py +5 -3
  13. cloudbeds_fiscal_document/models/get_logo_response.py +87 -0
  14. cloudbeds_fiscal_document/models/preview_request.py +102 -0
  15. cloudbeds_fiscal_document/models/property_configs_response.py +100 -0
  16. cloudbeds_fiscal_document/test/test_get_logo_response.py +51 -0
  17. cloudbeds_fiscal_document/test/test_preview_request.py +57 -0
  18. cloudbeds_fiscal_document/test/test_property_configs_response.py +84 -0
  19. {cloudbeds_fiscal_document-1.9.2.dist-info → cloudbeds_fiscal_document-1.10.0.dist-info}/METADATA +13 -7
  20. {cloudbeds_fiscal_document-1.9.2.dist-info → cloudbeds_fiscal_document-1.10.0.dist-info}/RECORD +23 -17
  21. {cloudbeds_fiscal_document-1.9.2.dist-info → cloudbeds_fiscal_document-1.10.0.dist-info}/WHEEL +0 -0
  22. {cloudbeds_fiscal_document-1.9.2.dist-info → cloudbeds_fiscal_document-1.10.0.dist-info}/licenses/LICENSE +0 -0
  23. {cloudbeds_fiscal_document-1.9.2.dist-info → cloudbeds_fiscal_document-1.10.0.dist-info}/top_level.txt +0 -0
@@ -3928,6 +3928,391 @@ class FiscalDocumentsApi:
3928
3928
 
3929
3929
 
3930
3930
 
3931
+ @validate_call
3932
+ def get_fiscal_document_pending_transactions_for_allocation(
3933
+ self,
3934
+ x_property_id: Annotated[int, Field(strict=True, ge=1, description="Property id")],
3935
+ source_id: Annotated[int, Field(strict=True, ge=1, description="source ID.")],
3936
+ source_kind: Annotated[SourceKind, Field(description="Filter by source kind.")],
3937
+ page_token: Annotated[Optional[StrictStr], Field(description="Token for fetching the next page, as per cursor-based pagination.")] = None,
3938
+ limit: Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], Field(description="Number of results to return per page.")] = None,
3939
+ sort: Annotated[Optional[StrictStr], Field(description="Supported fields - createdAt, serviceDate, sourceId, transactionDate, internalCode")] = None,
3940
+ folio_ids: Annotated[Optional[Annotated[List[StrictInt], Field(min_length=1)]], Field(description="Filter by folio IDs.")] = None,
3941
+ document_ids: Annotated[Optional[Annotated[List[StrictInt], Field(min_length=1)]], Field(description="document IDs.")] = None,
3942
+ _request_timeout: Union[
3943
+ None,
3944
+ Annotated[StrictFloat, Field(gt=0)],
3945
+ Tuple[
3946
+ Annotated[StrictFloat, Field(gt=0)],
3947
+ Annotated[StrictFloat, Field(gt=0)]
3948
+ ]
3949
+ ] = None,
3950
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
3951
+ _content_type: Optional[StrictStr] = None,
3952
+ _headers: Optional[Dict[StrictStr, Any]] = None,
3953
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
3954
+ ) -> FiscalDocumentTransactionsForAllocationPaginated:
3955
+ """Get available pending transactions for allocations
3956
+
3957
+ Retrieves a paginated list of available pending transactions for allocations. Requires PENDING_TRANSACTIONS_ENABLED feature flag to be enabled.
3958
+
3959
+ :param x_property_id: Property id (required)
3960
+ :type x_property_id: int
3961
+ :param source_id: source ID. (required)
3962
+ :type source_id: int
3963
+ :param source_kind: Filter by source kind. (required)
3964
+ :type source_kind: SourceKind
3965
+ :param page_token: Token for fetching the next page, as per cursor-based pagination.
3966
+ :type page_token: str
3967
+ :param limit: Number of results to return per page.
3968
+ :type limit: int
3969
+ :param sort: Supported fields - createdAt, serviceDate, sourceId, transactionDate, internalCode
3970
+ :type sort: str
3971
+ :param folio_ids: Filter by folio IDs.
3972
+ :type folio_ids: List[int]
3973
+ :param document_ids: document IDs.
3974
+ :type document_ids: List[int]
3975
+ :param _request_timeout: timeout setting for this request. If one
3976
+ number provided, it will be total request
3977
+ timeout. It can also be a pair (tuple) of
3978
+ (connection, read) timeouts.
3979
+ :type _request_timeout: int, tuple(int, int), optional
3980
+ :param _request_auth: set to override the auth_settings for an a single
3981
+ request; this effectively ignores the
3982
+ authentication in the spec for a single request.
3983
+ :type _request_auth: dict, optional
3984
+ :param _content_type: force content-type for the request.
3985
+ :type _content_type: str, Optional
3986
+ :param _headers: set to override the headers for a single
3987
+ request; this effectively ignores the headers
3988
+ in the spec for a single request.
3989
+ :type _headers: dict, optional
3990
+ :param _host_index: set to override the host_index for a single
3991
+ request; this effectively ignores the host_index
3992
+ in the spec for a single request.
3993
+ :type _host_index: int, optional
3994
+ :return: Returns the result object.
3995
+ """ # noqa: E501
3996
+
3997
+ _param = self._get_fiscal_document_pending_transactions_for_allocation_serialize(
3998
+ x_property_id=x_property_id,
3999
+ source_id=source_id,
4000
+ source_kind=source_kind,
4001
+ page_token=page_token,
4002
+ limit=limit,
4003
+ sort=sort,
4004
+ folio_ids=folio_ids,
4005
+ document_ids=document_ids,
4006
+ _request_auth=_request_auth,
4007
+ _content_type=_content_type,
4008
+ _headers=_headers,
4009
+ _host_index=_host_index
4010
+ )
4011
+
4012
+ _response_types_map: Dict[str, Optional[str]] = {
4013
+ '200': "FiscalDocumentTransactionsForAllocationPaginated",
4014
+ '400': None,
4015
+ }
4016
+ response_data = self.api_client.call_api(
4017
+ *_param,
4018
+ _request_timeout=_request_timeout
4019
+ )
4020
+ response_data.read()
4021
+ return self.api_client.response_deserialize(
4022
+ response_data=response_data,
4023
+ response_types_map=_response_types_map,
4024
+ ).data
4025
+
4026
+
4027
+ @validate_call
4028
+ def get_fiscal_document_pending_transactions_for_allocation_with_http_info(
4029
+ self,
4030
+ x_property_id: Annotated[int, Field(strict=True, ge=1, description="Property id")],
4031
+ source_id: Annotated[int, Field(strict=True, ge=1, description="source ID.")],
4032
+ source_kind: Annotated[SourceKind, Field(description="Filter by source kind.")],
4033
+ page_token: Annotated[Optional[StrictStr], Field(description="Token for fetching the next page, as per cursor-based pagination.")] = None,
4034
+ limit: Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], Field(description="Number of results to return per page.")] = None,
4035
+ sort: Annotated[Optional[StrictStr], Field(description="Supported fields - createdAt, serviceDate, sourceId, transactionDate, internalCode")] = None,
4036
+ folio_ids: Annotated[Optional[Annotated[List[StrictInt], Field(min_length=1)]], Field(description="Filter by folio IDs.")] = None,
4037
+ document_ids: Annotated[Optional[Annotated[List[StrictInt], Field(min_length=1)]], Field(description="document IDs.")] = None,
4038
+ _request_timeout: Union[
4039
+ None,
4040
+ Annotated[StrictFloat, Field(gt=0)],
4041
+ Tuple[
4042
+ Annotated[StrictFloat, Field(gt=0)],
4043
+ Annotated[StrictFloat, Field(gt=0)]
4044
+ ]
4045
+ ] = None,
4046
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
4047
+ _content_type: Optional[StrictStr] = None,
4048
+ _headers: Optional[Dict[StrictStr, Any]] = None,
4049
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
4050
+ ) -> ApiResponse[FiscalDocumentTransactionsForAllocationPaginated]:
4051
+ """Get available pending transactions for allocations
4052
+
4053
+ Retrieves a paginated list of available pending transactions for allocations. Requires PENDING_TRANSACTIONS_ENABLED feature flag to be enabled.
4054
+
4055
+ :param x_property_id: Property id (required)
4056
+ :type x_property_id: int
4057
+ :param source_id: source ID. (required)
4058
+ :type source_id: int
4059
+ :param source_kind: Filter by source kind. (required)
4060
+ :type source_kind: SourceKind
4061
+ :param page_token: Token for fetching the next page, as per cursor-based pagination.
4062
+ :type page_token: str
4063
+ :param limit: Number of results to return per page.
4064
+ :type limit: int
4065
+ :param sort: Supported fields - createdAt, serviceDate, sourceId, transactionDate, internalCode
4066
+ :type sort: str
4067
+ :param folio_ids: Filter by folio IDs.
4068
+ :type folio_ids: List[int]
4069
+ :param document_ids: document IDs.
4070
+ :type document_ids: List[int]
4071
+ :param _request_timeout: timeout setting for this request. If one
4072
+ number provided, it will be total request
4073
+ timeout. It can also be a pair (tuple) of
4074
+ (connection, read) timeouts.
4075
+ :type _request_timeout: int, tuple(int, int), optional
4076
+ :param _request_auth: set to override the auth_settings for an a single
4077
+ request; this effectively ignores the
4078
+ authentication in the spec for a single request.
4079
+ :type _request_auth: dict, optional
4080
+ :param _content_type: force content-type for the request.
4081
+ :type _content_type: str, Optional
4082
+ :param _headers: set to override the headers for a single
4083
+ request; this effectively ignores the headers
4084
+ in the spec for a single request.
4085
+ :type _headers: dict, optional
4086
+ :param _host_index: set to override the host_index for a single
4087
+ request; this effectively ignores the host_index
4088
+ in the spec for a single request.
4089
+ :type _host_index: int, optional
4090
+ :return: Returns the result object.
4091
+ """ # noqa: E501
4092
+
4093
+ _param = self._get_fiscal_document_pending_transactions_for_allocation_serialize(
4094
+ x_property_id=x_property_id,
4095
+ source_id=source_id,
4096
+ source_kind=source_kind,
4097
+ page_token=page_token,
4098
+ limit=limit,
4099
+ sort=sort,
4100
+ folio_ids=folio_ids,
4101
+ document_ids=document_ids,
4102
+ _request_auth=_request_auth,
4103
+ _content_type=_content_type,
4104
+ _headers=_headers,
4105
+ _host_index=_host_index
4106
+ )
4107
+
4108
+ _response_types_map: Dict[str, Optional[str]] = {
4109
+ '200': "FiscalDocumentTransactionsForAllocationPaginated",
4110
+ '400': None,
4111
+ }
4112
+ response_data = self.api_client.call_api(
4113
+ *_param,
4114
+ _request_timeout=_request_timeout
4115
+ )
4116
+ response_data.read()
4117
+ return self.api_client.response_deserialize(
4118
+ response_data=response_data,
4119
+ response_types_map=_response_types_map,
4120
+ )
4121
+
4122
+
4123
+ @validate_call
4124
+ def get_fiscal_document_pending_transactions_for_allocation_without_preload_content(
4125
+ self,
4126
+ x_property_id: Annotated[int, Field(strict=True, ge=1, description="Property id")],
4127
+ source_id: Annotated[int, Field(strict=True, ge=1, description="source ID.")],
4128
+ source_kind: Annotated[SourceKind, Field(description="Filter by source kind.")],
4129
+ page_token: Annotated[Optional[StrictStr], Field(description="Token for fetching the next page, as per cursor-based pagination.")] = None,
4130
+ limit: Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], Field(description="Number of results to return per page.")] = None,
4131
+ sort: Annotated[Optional[StrictStr], Field(description="Supported fields - createdAt, serviceDate, sourceId, transactionDate, internalCode")] = None,
4132
+ folio_ids: Annotated[Optional[Annotated[List[StrictInt], Field(min_length=1)]], Field(description="Filter by folio IDs.")] = None,
4133
+ document_ids: Annotated[Optional[Annotated[List[StrictInt], Field(min_length=1)]], Field(description="document IDs.")] = None,
4134
+ _request_timeout: Union[
4135
+ None,
4136
+ Annotated[StrictFloat, Field(gt=0)],
4137
+ Tuple[
4138
+ Annotated[StrictFloat, Field(gt=0)],
4139
+ Annotated[StrictFloat, Field(gt=0)]
4140
+ ]
4141
+ ] = None,
4142
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
4143
+ _content_type: Optional[StrictStr] = None,
4144
+ _headers: Optional[Dict[StrictStr, Any]] = None,
4145
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
4146
+ ) -> RESTResponseType:
4147
+ """Get available pending transactions for allocations
4148
+
4149
+ Retrieves a paginated list of available pending transactions for allocations. Requires PENDING_TRANSACTIONS_ENABLED feature flag to be enabled.
4150
+
4151
+ :param x_property_id: Property id (required)
4152
+ :type x_property_id: int
4153
+ :param source_id: source ID. (required)
4154
+ :type source_id: int
4155
+ :param source_kind: Filter by source kind. (required)
4156
+ :type source_kind: SourceKind
4157
+ :param page_token: Token for fetching the next page, as per cursor-based pagination.
4158
+ :type page_token: str
4159
+ :param limit: Number of results to return per page.
4160
+ :type limit: int
4161
+ :param sort: Supported fields - createdAt, serviceDate, sourceId, transactionDate, internalCode
4162
+ :type sort: str
4163
+ :param folio_ids: Filter by folio IDs.
4164
+ :type folio_ids: List[int]
4165
+ :param document_ids: document IDs.
4166
+ :type document_ids: List[int]
4167
+ :param _request_timeout: timeout setting for this request. If one
4168
+ number provided, it will be total request
4169
+ timeout. It can also be a pair (tuple) of
4170
+ (connection, read) timeouts.
4171
+ :type _request_timeout: int, tuple(int, int), optional
4172
+ :param _request_auth: set to override the auth_settings for an a single
4173
+ request; this effectively ignores the
4174
+ authentication in the spec for a single request.
4175
+ :type _request_auth: dict, optional
4176
+ :param _content_type: force content-type for the request.
4177
+ :type _content_type: str, Optional
4178
+ :param _headers: set to override the headers for a single
4179
+ request; this effectively ignores the headers
4180
+ in the spec for a single request.
4181
+ :type _headers: dict, optional
4182
+ :param _host_index: set to override the host_index for a single
4183
+ request; this effectively ignores the host_index
4184
+ in the spec for a single request.
4185
+ :type _host_index: int, optional
4186
+ :return: Returns the result object.
4187
+ """ # noqa: E501
4188
+
4189
+ _param = self._get_fiscal_document_pending_transactions_for_allocation_serialize(
4190
+ x_property_id=x_property_id,
4191
+ source_id=source_id,
4192
+ source_kind=source_kind,
4193
+ page_token=page_token,
4194
+ limit=limit,
4195
+ sort=sort,
4196
+ folio_ids=folio_ids,
4197
+ document_ids=document_ids,
4198
+ _request_auth=_request_auth,
4199
+ _content_type=_content_type,
4200
+ _headers=_headers,
4201
+ _host_index=_host_index
4202
+ )
4203
+
4204
+ _response_types_map: Dict[str, Optional[str]] = {
4205
+ '200': "FiscalDocumentTransactionsForAllocationPaginated",
4206
+ '400': None,
4207
+ }
4208
+ response_data = self.api_client.call_api(
4209
+ *_param,
4210
+ _request_timeout=_request_timeout
4211
+ )
4212
+ return response_data.response
4213
+
4214
+
4215
+ def _get_fiscal_document_pending_transactions_for_allocation_serialize(
4216
+ self,
4217
+ x_property_id,
4218
+ source_id,
4219
+ source_kind,
4220
+ page_token,
4221
+ limit,
4222
+ sort,
4223
+ folio_ids,
4224
+ document_ids,
4225
+ _request_auth,
4226
+ _content_type,
4227
+ _headers,
4228
+ _host_index,
4229
+ ) -> RequestSerialized:
4230
+
4231
+ _host = None
4232
+
4233
+ _collection_formats: Dict[str, str] = {
4234
+ 'folioIds': 'multi',
4235
+ 'documentIds': 'multi',
4236
+ }
4237
+
4238
+ _path_params: Dict[str, str] = {}
4239
+ _query_params: List[Tuple[str, str]] = []
4240
+ _header_params: Dict[str, Optional[str]] = _headers or {}
4241
+ _form_params: List[Tuple[str, str]] = []
4242
+ _files: Dict[
4243
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
4244
+ ] = {}
4245
+ _body_params: Optional[bytes] = None
4246
+
4247
+ # process the path parameters
4248
+ # process the query parameters
4249
+ if page_token is not None:
4250
+
4251
+ _query_params.append(('pageToken', page_token))
4252
+
4253
+ if limit is not None:
4254
+
4255
+ _query_params.append(('limit', limit))
4256
+
4257
+ if source_id is not None:
4258
+
4259
+ _query_params.append(('sourceId', source_id))
4260
+
4261
+ if sort is not None:
4262
+
4263
+ _query_params.append(('sort', sort))
4264
+
4265
+ if source_kind is not None:
4266
+
4267
+ _query_params.append(('sourceKind', source_kind.value))
4268
+
4269
+ if folio_ids is not None:
4270
+
4271
+ _query_params.append(('folioIds', folio_ids))
4272
+
4273
+ if document_ids is not None:
4274
+
4275
+ _query_params.append(('documentIds', document_ids))
4276
+
4277
+ # process the header parameters
4278
+ if x_property_id is not None:
4279
+ _header_params['X-Property-ID'] = x_property_id
4280
+ # process the form parameters
4281
+ # process the body parameter
4282
+
4283
+
4284
+ # set the HTTP header `Accept`
4285
+ if 'Accept' not in _header_params:
4286
+ _header_params['Accept'] = self.api_client.select_header_accept(
4287
+ [
4288
+ 'application/json'
4289
+ ]
4290
+ )
4291
+
4292
+
4293
+ # authentication setting
4294
+ _auth_settings: List[str] = [
4295
+ 'bearerAuth'
4296
+ ]
4297
+
4298
+ return self.api_client.param_serialize(
4299
+ method='GET',
4300
+ resource_path='/fiscal-document/v1/fiscal-documents/allocations/pending-transactions',
4301
+ path_params=_path_params,
4302
+ query_params=_query_params,
4303
+ header_params=_header_params,
4304
+ body=_body_params,
4305
+ post_params=_form_params,
4306
+ files=_files,
4307
+ auth_settings=_auth_settings,
4308
+ collection_formats=_collection_formats,
4309
+ _host=_host,
4310
+ _request_auth=_request_auth
4311
+ )
4312
+
4313
+
4314
+
4315
+
3931
4316
  @validate_call
3932
4317
  def get_fiscal_document_recipients_by_id(
3933
4318
  self,
@@ -7558,3 +7943,285 @@ class FiscalDocumentsApi:
7558
7943
  )
7559
7944
 
7560
7945
 
7946
+
7947
+
7948
+ @validate_call
7949
+ def void_receipt(
7950
+ self,
7951
+ x_property_id: Annotated[int, Field(strict=True, ge=1, description="Property id")],
7952
+ receipt_id: Annotated[StrictInt, Field(description="The ID of the receipt to void")],
7953
+ _request_timeout: Union[
7954
+ None,
7955
+ Annotated[StrictFloat, Field(gt=0)],
7956
+ Tuple[
7957
+ Annotated[StrictFloat, Field(gt=0)],
7958
+ Annotated[StrictFloat, Field(gt=0)]
7959
+ ]
7960
+ ] = None,
7961
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
7962
+ _content_type: Optional[StrictStr] = None,
7963
+ _headers: Optional[Dict[StrictStr, Any]] = None,
7964
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
7965
+ ) -> None:
7966
+ """Void a receipt
7967
+
7968
+ Voids a receipt by updating its status to VOIDED. The receipt must be in OPEN status. For Italy, a refund receipt will be automatically created and linked to the voided receipt.
7969
+
7970
+ :param x_property_id: Property id (required)
7971
+ :type x_property_id: int
7972
+ :param receipt_id: The ID of the receipt to void (required)
7973
+ :type receipt_id: int
7974
+ :param _request_timeout: timeout setting for this request. If one
7975
+ number provided, it will be total request
7976
+ timeout. It can also be a pair (tuple) of
7977
+ (connection, read) timeouts.
7978
+ :type _request_timeout: int, tuple(int, int), optional
7979
+ :param _request_auth: set to override the auth_settings for an a single
7980
+ request; this effectively ignores the
7981
+ authentication in the spec for a single request.
7982
+ :type _request_auth: dict, optional
7983
+ :param _content_type: force content-type for the request.
7984
+ :type _content_type: str, Optional
7985
+ :param _headers: set to override the headers for a single
7986
+ request; this effectively ignores the headers
7987
+ in the spec for a single request.
7988
+ :type _headers: dict, optional
7989
+ :param _host_index: set to override the host_index for a single
7990
+ request; this effectively ignores the host_index
7991
+ in the spec for a single request.
7992
+ :type _host_index: int, optional
7993
+ :return: Returns the result object.
7994
+ """ # noqa: E501
7995
+
7996
+ _param = self._void_receipt_serialize(
7997
+ x_property_id=x_property_id,
7998
+ receipt_id=receipt_id,
7999
+ _request_auth=_request_auth,
8000
+ _content_type=_content_type,
8001
+ _headers=_headers,
8002
+ _host_index=_host_index
8003
+ )
8004
+
8005
+ _response_types_map: Dict[str, Optional[str]] = {
8006
+ '204': None,
8007
+ '400': "ApiError",
8008
+ '404': None,
8009
+ }
8010
+ response_data = self.api_client.call_api(
8011
+ *_param,
8012
+ _request_timeout=_request_timeout
8013
+ )
8014
+ response_data.read()
8015
+ return self.api_client.response_deserialize(
8016
+ response_data=response_data,
8017
+ response_types_map=_response_types_map,
8018
+ ).data
8019
+
8020
+
8021
+ @validate_call
8022
+ def void_receipt_with_http_info(
8023
+ self,
8024
+ x_property_id: Annotated[int, Field(strict=True, ge=1, description="Property id")],
8025
+ receipt_id: Annotated[StrictInt, Field(description="The ID of the receipt to void")],
8026
+ _request_timeout: Union[
8027
+ None,
8028
+ Annotated[StrictFloat, Field(gt=0)],
8029
+ Tuple[
8030
+ Annotated[StrictFloat, Field(gt=0)],
8031
+ Annotated[StrictFloat, Field(gt=0)]
8032
+ ]
8033
+ ] = None,
8034
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
8035
+ _content_type: Optional[StrictStr] = None,
8036
+ _headers: Optional[Dict[StrictStr, Any]] = None,
8037
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
8038
+ ) -> ApiResponse[None]:
8039
+ """Void a receipt
8040
+
8041
+ Voids a receipt by updating its status to VOIDED. The receipt must be in OPEN status. For Italy, a refund receipt will be automatically created and linked to the voided receipt.
8042
+
8043
+ :param x_property_id: Property id (required)
8044
+ :type x_property_id: int
8045
+ :param receipt_id: The ID of the receipt to void (required)
8046
+ :type receipt_id: int
8047
+ :param _request_timeout: timeout setting for this request. If one
8048
+ number provided, it will be total request
8049
+ timeout. It can also be a pair (tuple) of
8050
+ (connection, read) timeouts.
8051
+ :type _request_timeout: int, tuple(int, int), optional
8052
+ :param _request_auth: set to override the auth_settings for an a single
8053
+ request; this effectively ignores the
8054
+ authentication in the spec for a single request.
8055
+ :type _request_auth: dict, optional
8056
+ :param _content_type: force content-type for the request.
8057
+ :type _content_type: str, Optional
8058
+ :param _headers: set to override the headers for a single
8059
+ request; this effectively ignores the headers
8060
+ in the spec for a single request.
8061
+ :type _headers: dict, optional
8062
+ :param _host_index: set to override the host_index for a single
8063
+ request; this effectively ignores the host_index
8064
+ in the spec for a single request.
8065
+ :type _host_index: int, optional
8066
+ :return: Returns the result object.
8067
+ """ # noqa: E501
8068
+
8069
+ _param = self._void_receipt_serialize(
8070
+ x_property_id=x_property_id,
8071
+ receipt_id=receipt_id,
8072
+ _request_auth=_request_auth,
8073
+ _content_type=_content_type,
8074
+ _headers=_headers,
8075
+ _host_index=_host_index
8076
+ )
8077
+
8078
+ _response_types_map: Dict[str, Optional[str]] = {
8079
+ '204': None,
8080
+ '400': "ApiError",
8081
+ '404': None,
8082
+ }
8083
+ response_data = self.api_client.call_api(
8084
+ *_param,
8085
+ _request_timeout=_request_timeout
8086
+ )
8087
+ response_data.read()
8088
+ return self.api_client.response_deserialize(
8089
+ response_data=response_data,
8090
+ response_types_map=_response_types_map,
8091
+ )
8092
+
8093
+
8094
+ @validate_call
8095
+ def void_receipt_without_preload_content(
8096
+ self,
8097
+ x_property_id: Annotated[int, Field(strict=True, ge=1, description="Property id")],
8098
+ receipt_id: Annotated[StrictInt, Field(description="The ID of the receipt to void")],
8099
+ _request_timeout: Union[
8100
+ None,
8101
+ Annotated[StrictFloat, Field(gt=0)],
8102
+ Tuple[
8103
+ Annotated[StrictFloat, Field(gt=0)],
8104
+ Annotated[StrictFloat, Field(gt=0)]
8105
+ ]
8106
+ ] = None,
8107
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
8108
+ _content_type: Optional[StrictStr] = None,
8109
+ _headers: Optional[Dict[StrictStr, Any]] = None,
8110
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
8111
+ ) -> RESTResponseType:
8112
+ """Void a receipt
8113
+
8114
+ Voids a receipt by updating its status to VOIDED. The receipt must be in OPEN status. For Italy, a refund receipt will be automatically created and linked to the voided receipt.
8115
+
8116
+ :param x_property_id: Property id (required)
8117
+ :type x_property_id: int
8118
+ :param receipt_id: The ID of the receipt to void (required)
8119
+ :type receipt_id: int
8120
+ :param _request_timeout: timeout setting for this request. If one
8121
+ number provided, it will be total request
8122
+ timeout. It can also be a pair (tuple) of
8123
+ (connection, read) timeouts.
8124
+ :type _request_timeout: int, tuple(int, int), optional
8125
+ :param _request_auth: set to override the auth_settings for an a single
8126
+ request; this effectively ignores the
8127
+ authentication in the spec for a single request.
8128
+ :type _request_auth: dict, optional
8129
+ :param _content_type: force content-type for the request.
8130
+ :type _content_type: str, Optional
8131
+ :param _headers: set to override the headers for a single
8132
+ request; this effectively ignores the headers
8133
+ in the spec for a single request.
8134
+ :type _headers: dict, optional
8135
+ :param _host_index: set to override the host_index for a single
8136
+ request; this effectively ignores the host_index
8137
+ in the spec for a single request.
8138
+ :type _host_index: int, optional
8139
+ :return: Returns the result object.
8140
+ """ # noqa: E501
8141
+
8142
+ _param = self._void_receipt_serialize(
8143
+ x_property_id=x_property_id,
8144
+ receipt_id=receipt_id,
8145
+ _request_auth=_request_auth,
8146
+ _content_type=_content_type,
8147
+ _headers=_headers,
8148
+ _host_index=_host_index
8149
+ )
8150
+
8151
+ _response_types_map: Dict[str, Optional[str]] = {
8152
+ '204': None,
8153
+ '400': "ApiError",
8154
+ '404': None,
8155
+ }
8156
+ response_data = self.api_client.call_api(
8157
+ *_param,
8158
+ _request_timeout=_request_timeout
8159
+ )
8160
+ return response_data.response
8161
+
8162
+
8163
+ def _void_receipt_serialize(
8164
+ self,
8165
+ x_property_id,
8166
+ receipt_id,
8167
+ _request_auth,
8168
+ _content_type,
8169
+ _headers,
8170
+ _host_index,
8171
+ ) -> RequestSerialized:
8172
+
8173
+ _host = None
8174
+
8175
+ _collection_formats: Dict[str, str] = {
8176
+ }
8177
+
8178
+ _path_params: Dict[str, str] = {}
8179
+ _query_params: List[Tuple[str, str]] = []
8180
+ _header_params: Dict[str, Optional[str]] = _headers or {}
8181
+ _form_params: List[Tuple[str, str]] = []
8182
+ _files: Dict[
8183
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
8184
+ ] = {}
8185
+ _body_params: Optional[bytes] = None
8186
+
8187
+ # process the path parameters
8188
+ if receipt_id is not None:
8189
+ _path_params['receiptId'] = receipt_id
8190
+ # process the query parameters
8191
+ # process the header parameters
8192
+ if x_property_id is not None:
8193
+ _header_params['X-Property-ID'] = x_property_id
8194
+ # process the form parameters
8195
+ # process the body parameter
8196
+
8197
+
8198
+ # set the HTTP header `Accept`
8199
+ if 'Accept' not in _header_params:
8200
+ _header_params['Accept'] = self.api_client.select_header_accept(
8201
+ [
8202
+ 'application/json'
8203
+ ]
8204
+ )
8205
+
8206
+
8207
+ # authentication setting
8208
+ _auth_settings: List[str] = [
8209
+ 'bearerAuth'
8210
+ ]
8211
+
8212
+ return self.api_client.param_serialize(
8213
+ method='POST',
8214
+ resource_path='/fiscal-document/v1/fiscal-documents/receipts/{receiptId}/void',
8215
+ path_params=_path_params,
8216
+ query_params=_query_params,
8217
+ header_params=_header_params,
8218
+ body=_body_params,
8219
+ post_params=_form_params,
8220
+ files=_files,
8221
+ auth_settings=_auth_settings,
8222
+ collection_formats=_collection_formats,
8223
+ _host=_host,
8224
+ _request_auth=_request_auth
8225
+ )
8226
+
8227
+
@@ -90,7 +90,7 @@ class ApiClient:
90
90
  self.default_headers[header_name] = header_value
91
91
  self.cookie = cookie
92
92
  # Set default User-Agent.
93
- self.user_agent = 'OpenAPI-Generator/1.9.2/python'
93
+ self.user_agent = 'OpenAPI-Generator/1.10.0/python'
94
94
  self.client_side_validation = configuration.client_side_validation
95
95
 
96
96
  def __enter__(self):