cloudbeds-fiscal-document 1.10.0__py3-none-any.whl → 1.12.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 (39) hide show
  1. cloudbeds_fiscal_document/__init__.py +2 -1
  2. cloudbeds_fiscal_document/api/fiscal_documents_api.py +22 -388
  3. cloudbeds_fiscal_document/api_client.py +1 -1
  4. cloudbeds_fiscal_document/configuration.py +1 -1
  5. cloudbeds_fiscal_document/models/__init__.py +1 -0
  6. cloudbeds_fiscal_document/models/configs_response.py +1 -3
  7. cloudbeds_fiscal_document/models/configs_update_request.py +9 -5
  8. cloudbeds_fiscal_document/models/create_receipt_request.py +3 -5
  9. cloudbeds_fiscal_document/models/document_trigger_event.py +1 -0
  10. cloudbeds_fiscal_document/models/fiscal_document_kind.py +1 -1
  11. cloudbeds_fiscal_document/models/government_integration.py +3 -5
  12. cloudbeds_fiscal_document/models/transaction_for_allocation_response.py +4 -1
  13. cloudbeds_fiscal_document/models/transaction_status.py +37 -0
  14. cloudbeds_fiscal_document/test/test_configs_api.py +28 -0
  15. cloudbeds_fiscal_document/test/test_configs_response.py +9 -1
  16. cloudbeds_fiscal_document/test/test_configs_update_request.py +12 -4
  17. cloudbeds_fiscal_document/test/test_create_credit_note_request.py +13 -6
  18. cloudbeds_fiscal_document/test/test_create_invoice_request.py +22 -8
  19. cloudbeds_fiscal_document/test/test_fiscal_document_detailed_response.py +32 -5
  20. cloudbeds_fiscal_document/test/test_fiscal_document_paginated.py +29 -7
  21. cloudbeds_fiscal_document/test/test_fiscal_document_patch_request.py +3 -1
  22. cloudbeds_fiscal_document/test/test_fiscal_document_recipient.py +25 -3
  23. cloudbeds_fiscal_document/test/test_fiscal_document_summary_response.py +2 -1
  24. cloudbeds_fiscal_document/test/test_fiscal_document_transaction_response.py +7 -1
  25. cloudbeds_fiscal_document/test/test_fiscal_document_transactions_for_allocation_paginated.py +1 -0
  26. cloudbeds_fiscal_document/test/test_fiscal_document_transactions_paginated.py +7 -1
  27. cloudbeds_fiscal_document/test/test_fiscal_documents_api.py +113 -1
  28. cloudbeds_fiscal_document/test/test_get_invoice_preview_request.py +2 -1
  29. cloudbeds_fiscal_document/test/test_government_integration.py +2 -1
  30. cloudbeds_fiscal_document/test/test_recipient_details.py +4 -2
  31. cloudbeds_fiscal_document/test/test_recipient_tax_info.py +2 -1
  32. cloudbeds_fiscal_document/test/test_rectify_invoice_note_request.py +9 -0
  33. cloudbeds_fiscal_document/test/test_transaction_for_allocation_response.py +3 -1
  34. cloudbeds_fiscal_document/test/test_transaction_status.py +33 -0
  35. {cloudbeds_fiscal_document-1.10.0.dist-info → cloudbeds_fiscal_document-1.12.0.dist-info}/METADATA +3 -3
  36. {cloudbeds_fiscal_document-1.10.0.dist-info → cloudbeds_fiscal_document-1.12.0.dist-info}/RECORD +39 -37
  37. {cloudbeds_fiscal_document-1.10.0.dist-info → cloudbeds_fiscal_document-1.12.0.dist-info}/WHEEL +0 -0
  38. {cloudbeds_fiscal_document-1.10.0.dist-info → cloudbeds_fiscal_document-1.12.0.dist-info}/licenses/LICENSE +0 -0
  39. {cloudbeds_fiscal_document-1.10.0.dist-info → cloudbeds_fiscal_document-1.12.0.dist-info}/top_level.txt +0 -0
@@ -14,7 +14,7 @@
14
14
  """ # noqa: E501
15
15
 
16
16
 
17
- __version__ = "1.10.0"
17
+ __version__ = "1.12.0"
18
18
 
19
19
  # import apis into sdk package
20
20
  from cloudbeds_fiscal_document.api.configs_api import ConfigsApi
@@ -88,3 +88,4 @@ from cloudbeds_fiscal_document.models.rectify_invoice_note_request import Rectif
88
88
  from cloudbeds_fiscal_document.models.single_allocation import SingleAllocation
89
89
  from cloudbeds_fiscal_document.models.source_kind import SourceKind
90
90
  from cloudbeds_fiscal_document.models.transaction_for_allocation_response import TransactionForAllocationResponse
91
+ from cloudbeds_fiscal_document.models.transaction_status import TransactionStatus
@@ -44,6 +44,7 @@ from cloudbeds_fiscal_document.models.pro_forma_invoice_request import ProFormaI
44
44
  from cloudbeds_fiscal_document.models.pro_forma_status_update_request import ProFormaStatusUpdateRequest
45
45
  from cloudbeds_fiscal_document.models.rectify_invoice_note_request import RectifyInvoiceNoteRequest
46
46
  from cloudbeds_fiscal_document.models.source_kind import SourceKind
47
+ from cloudbeds_fiscal_document.models.transaction_status import TransactionStatus
47
48
 
48
49
  from cloudbeds_fiscal_document.api_client import ApiClient, RequestSerialized
49
50
  from cloudbeds_fiscal_document.api_response import ApiResponse
@@ -3928,391 +3929,6 @@ class FiscalDocumentsApi:
3928
3929
 
3929
3930
 
3930
3931
 
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
-
4316
3932
  @validate_call
4317
3933
  def get_fiscal_document_recipients_by_id(
4318
3934
  self,
@@ -4616,7 +4232,7 @@ class FiscalDocumentsApi:
4616
4232
  ) -> FiscalDocumentTransactionsPaginated:
4617
4233
  """Get available transactions for fiscal documents
4618
4234
 
4619
- Retrieves a paginated list of available transactions for a source based on the document type. - For INVOICE: Returns only posted (paid) transactions - For PRO_FORMA_INVOICE: Returns both pending transactions and posted (paid) payments - Transactions already included in fiscal documents are excluded - Each transaction includes a status field (PENDING or POSTED)
4235
+ Retrieves a paginated list of available transactions for a source based on the document type. - For INVOICE: Returns posted (paid) transactions, and pending transactions when feature.fiscal-document.pending-transactions is enabled - For CREDIT_NOTE: Returns posted (paid) transactions, and pending transactions when feature.fiscal-document.pending-transactions is enabled - For PRO_FORMA_INVOICE: Returns both pending transactions and posted (paid) payments - Transactions already included in fiscal documents are excluded - Each transaction includes a status field (PENDING or POSTED)
4620
4236
 
4621
4237
  :param x_property_id: Property id (required)
4622
4238
  :type x_property_id: int
@@ -4715,7 +4331,7 @@ class FiscalDocumentsApi:
4715
4331
  ) -> ApiResponse[FiscalDocumentTransactionsPaginated]:
4716
4332
  """Get available transactions for fiscal documents
4717
4333
 
4718
- Retrieves a paginated list of available transactions for a source based on the document type. - For INVOICE: Returns only posted (paid) transactions - For PRO_FORMA_INVOICE: Returns both pending transactions and posted (paid) payments - Transactions already included in fiscal documents are excluded - Each transaction includes a status field (PENDING or POSTED)
4334
+ Retrieves a paginated list of available transactions for a source based on the document type. - For INVOICE: Returns posted (paid) transactions, and pending transactions when feature.fiscal-document.pending-transactions is enabled - For CREDIT_NOTE: Returns posted (paid) transactions, and pending transactions when feature.fiscal-document.pending-transactions is enabled - For PRO_FORMA_INVOICE: Returns both pending transactions and posted (paid) payments - Transactions already included in fiscal documents are excluded - Each transaction includes a status field (PENDING or POSTED)
4719
4335
 
4720
4336
  :param x_property_id: Property id (required)
4721
4337
  :type x_property_id: int
@@ -4814,7 +4430,7 @@ class FiscalDocumentsApi:
4814
4430
  ) -> RESTResponseType:
4815
4431
  """Get available transactions for fiscal documents
4816
4432
 
4817
- Retrieves a paginated list of available transactions for a source based on the document type. - For INVOICE: Returns only posted (paid) transactions - For PRO_FORMA_INVOICE: Returns both pending transactions and posted (paid) payments - Transactions already included in fiscal documents are excluded - Each transaction includes a status field (PENDING or POSTED)
4433
+ Retrieves a paginated list of available transactions for a source based on the document type. - For INVOICE: Returns posted (paid) transactions, and pending transactions when feature.fiscal-document.pending-transactions is enabled - For CREDIT_NOTE: Returns posted (paid) transactions, and pending transactions when feature.fiscal-document.pending-transactions is enabled - For PRO_FORMA_INVOICE: Returns both pending transactions and posted (paid) payments - Transactions already included in fiscal documents are excluded - Each transaction includes a status field (PENDING or POSTED)
4818
4434
 
4819
4435
  :param x_property_id: Property id (required)
4820
4436
  :type x_property_id: int
@@ -5360,6 +4976,7 @@ class FiscalDocumentsApi:
5360
4976
  sort: Annotated[Optional[StrictStr], Field(description="Supported fields - createdAt, serviceDate, sourceId, transactionDate, internalCode")] = None,
5361
4977
  folio_ids: Annotated[Optional[Annotated[List[StrictInt], Field(min_length=1)]], Field(description="Filter by folio IDs.")] = None,
5362
4978
  document_ids: Annotated[Optional[Annotated[List[StrictInt], Field(min_length=1)]], Field(description="document IDs.")] = None,
4979
+ statuses: Annotated[Optional[List[TransactionStatus]], Field(description="Filter by status.")] = None,
5363
4980
  _request_timeout: Union[
5364
4981
  None,
5365
4982
  Annotated[StrictFloat, Field(gt=0)],
@@ -5393,6 +5010,8 @@ class FiscalDocumentsApi:
5393
5010
  :type folio_ids: List[int]
5394
5011
  :param document_ids: document IDs.
5395
5012
  :type document_ids: List[int]
5013
+ :param statuses: Filter by status.
5014
+ :type statuses: List[TransactionStatus]
5396
5015
  :param _request_timeout: timeout setting for this request. If one
5397
5016
  number provided, it will be total request
5398
5017
  timeout. It can also be a pair (tuple) of
@@ -5424,6 +5043,7 @@ class FiscalDocumentsApi:
5424
5043
  sort=sort,
5425
5044
  folio_ids=folio_ids,
5426
5045
  document_ids=document_ids,
5046
+ statuses=statuses,
5427
5047
  _request_auth=_request_auth,
5428
5048
  _content_type=_content_type,
5429
5049
  _headers=_headers,
@@ -5455,6 +5075,7 @@ class FiscalDocumentsApi:
5455
5075
  sort: Annotated[Optional[StrictStr], Field(description="Supported fields - createdAt, serviceDate, sourceId, transactionDate, internalCode")] = None,
5456
5076
  folio_ids: Annotated[Optional[Annotated[List[StrictInt], Field(min_length=1)]], Field(description="Filter by folio IDs.")] = None,
5457
5077
  document_ids: Annotated[Optional[Annotated[List[StrictInt], Field(min_length=1)]], Field(description="document IDs.")] = None,
5078
+ statuses: Annotated[Optional[List[TransactionStatus]], Field(description="Filter by status.")] = None,
5458
5079
  _request_timeout: Union[
5459
5080
  None,
5460
5081
  Annotated[StrictFloat, Field(gt=0)],
@@ -5488,6 +5109,8 @@ class FiscalDocumentsApi:
5488
5109
  :type folio_ids: List[int]
5489
5110
  :param document_ids: document IDs.
5490
5111
  :type document_ids: List[int]
5112
+ :param statuses: Filter by status.
5113
+ :type statuses: List[TransactionStatus]
5491
5114
  :param _request_timeout: timeout setting for this request. If one
5492
5115
  number provided, it will be total request
5493
5116
  timeout. It can also be a pair (tuple) of
@@ -5519,6 +5142,7 @@ class FiscalDocumentsApi:
5519
5142
  sort=sort,
5520
5143
  folio_ids=folio_ids,
5521
5144
  document_ids=document_ids,
5145
+ statuses=statuses,
5522
5146
  _request_auth=_request_auth,
5523
5147
  _content_type=_content_type,
5524
5148
  _headers=_headers,
@@ -5550,6 +5174,7 @@ class FiscalDocumentsApi:
5550
5174
  sort: Annotated[Optional[StrictStr], Field(description="Supported fields - createdAt, serviceDate, sourceId, transactionDate, internalCode")] = None,
5551
5175
  folio_ids: Annotated[Optional[Annotated[List[StrictInt], Field(min_length=1)]], Field(description="Filter by folio IDs.")] = None,
5552
5176
  document_ids: Annotated[Optional[Annotated[List[StrictInt], Field(min_length=1)]], Field(description="document IDs.")] = None,
5177
+ statuses: Annotated[Optional[List[TransactionStatus]], Field(description="Filter by status.")] = None,
5553
5178
  _request_timeout: Union[
5554
5179
  None,
5555
5180
  Annotated[StrictFloat, Field(gt=0)],
@@ -5583,6 +5208,8 @@ class FiscalDocumentsApi:
5583
5208
  :type folio_ids: List[int]
5584
5209
  :param document_ids: document IDs.
5585
5210
  :type document_ids: List[int]
5211
+ :param statuses: Filter by status.
5212
+ :type statuses: List[TransactionStatus]
5586
5213
  :param _request_timeout: timeout setting for this request. If one
5587
5214
  number provided, it will be total request
5588
5215
  timeout. It can also be a pair (tuple) of
@@ -5614,6 +5241,7 @@ class FiscalDocumentsApi:
5614
5241
  sort=sort,
5615
5242
  folio_ids=folio_ids,
5616
5243
  document_ids=document_ids,
5244
+ statuses=statuses,
5617
5245
  _request_auth=_request_auth,
5618
5246
  _content_type=_content_type,
5619
5247
  _headers=_headers,
@@ -5640,6 +5268,7 @@ class FiscalDocumentsApi:
5640
5268
  sort,
5641
5269
  folio_ids,
5642
5270
  document_ids,
5271
+ statuses,
5643
5272
  _request_auth,
5644
5273
  _content_type,
5645
5274
  _headers,
@@ -5651,6 +5280,7 @@ class FiscalDocumentsApi:
5651
5280
  _collection_formats: Dict[str, str] = {
5652
5281
  'folioIds': 'multi',
5653
5282
  'documentIds': 'multi',
5283
+ 'statuses': 'multi',
5654
5284
  }
5655
5285
 
5656
5286
  _path_params: Dict[str, str] = {}
@@ -5692,6 +5322,10 @@ class FiscalDocumentsApi:
5692
5322
 
5693
5323
  _query_params.append(('documentIds', document_ids))
5694
5324
 
5325
+ if statuses is not None:
5326
+
5327
+ _query_params.append(('statuses', statuses))
5328
+
5695
5329
  # process the header parameters
5696
5330
  if x_property_id is not None:
5697
5331
  _header_params['X-Property-ID'] = x_property_id
@@ -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.10.0/python'
93
+ self.user_agent = 'OpenAPI-Generator/1.12.0/python'
94
94
  self.client_side_validation = configuration.client_side_validation
95
95
 
96
96
  def __enter__(self):
@@ -504,7 +504,7 @@ class Configuration:
504
504
  "OS: {env}\n"\
505
505
  "Python Version: {pyversion}\n"\
506
506
  "Version of the API: v1\n"\
507
- "SDK Package Version: 1.10.0".\
507
+ "SDK Package Version: 1.12.0".\
508
508
  format(env=sys.platform, pyversion=sys.version)
509
509
 
510
510
  def get_host_settings(self) -> List[HostSetting]:
@@ -69,3 +69,4 @@ from cloudbeds_fiscal_document.models.rectify_invoice_note_request import Rectif
69
69
  from cloudbeds_fiscal_document.models.single_allocation import SingleAllocation
70
70
  from cloudbeds_fiscal_document.models.source_kind import SourceKind
71
71
  from cloudbeds_fiscal_document.models.transaction_for_allocation_response import TransactionForAllocationResponse
72
+ from cloudbeds_fiscal_document.models.transaction_status import TransactionStatus
@@ -48,12 +48,11 @@ class ConfigsResponse(BaseModel):
48
48
  tax_id2: Optional[StrictStr] = Field(default=None, alias="taxId2")
49
49
  cpf: Optional[StrictStr] = None
50
50
  custom_text: Optional[Dict[str, StrictStr]] = Field(default=None, alias="customText")
51
- create_invoice_on_allocation: Optional[StrictBool] = Field(default=False, alias="createInvoiceOnAllocation")
52
51
  trigger_events: Optional[List[DocumentTriggerEvent]] = Field(default=None, alias="triggerEvents")
53
52
  update_invoice_on_link_document: Optional[StrictBool] = Field(default=False, alias="updateInvoiceOnLinkDocument")
54
53
  use_invoice_document_settings: Optional[StrictBool] = Field(default=False, alias="useInvoiceDocumentSettings")
55
54
  use_invoice_title_and_numbering: Optional[StrictBool] = Field(default=False, alias="useInvoiceTitleAndNumbering")
56
- __properties: ClassVar[List[str]] = ["propertyId", "documentKind", "showDetailedTaxFee", "showCreditNotesAndReceipts", "chargeBreakdown", "useGuestLang", "dueDays", "lang", "prefix", "suffix", "legalCompanyName", "title", "showLegalCompanyName", "includeRoomNumber", "useDocumentNumber", "isCompact", "taxId1", "taxId2", "cpf", "customText", "createInvoiceOnAllocation", "triggerEvents", "updateInvoiceOnLinkDocument", "useInvoiceDocumentSettings", "useInvoiceTitleAndNumbering"]
55
+ __properties: ClassVar[List[str]] = ["propertyId", "documentKind", "showDetailedTaxFee", "showCreditNotesAndReceipts", "chargeBreakdown", "useGuestLang", "dueDays", "lang", "prefix", "suffix", "legalCompanyName", "title", "showLegalCompanyName", "includeRoomNumber", "useDocumentNumber", "isCompact", "taxId1", "taxId2", "cpf", "customText", "triggerEvents", "updateInvoiceOnLinkDocument", "useInvoiceDocumentSettings", "useInvoiceTitleAndNumbering"]
57
56
 
58
57
  model_config = ConfigDict(
59
58
  populate_by_name=True,
@@ -126,7 +125,6 @@ class ConfigsResponse(BaseModel):
126
125
  "taxId2": obj.get("taxId2"),
127
126
  "cpf": obj.get("cpf"),
128
127
  "customText": obj.get("customText"),
129
- "createInvoiceOnAllocation": obj.get("createInvoiceOnAllocation") if obj.get("createInvoiceOnAllocation") is not None else False,
130
128
  "triggerEvents": obj.get("triggerEvents"),
131
129
  "updateInvoiceOnLinkDocument": obj.get("updateInvoiceOnLinkDocument") if obj.get("updateInvoiceOnLinkDocument") is not None else False,
132
130
  "useInvoiceDocumentSettings": obj.get("useInvoiceDocumentSettings") if obj.get("useInvoiceDocumentSettings") is not None else False,
@@ -19,6 +19,7 @@ import json
19
19
 
20
20
  from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr
21
21
  from typing import Any, ClassVar, Dict, List, Optional
22
+ from typing_extensions import Annotated
22
23
  from cloudbeds_fiscal_document.models.document_trigger_event import DocumentTriggerEvent
23
24
  from typing import Optional, Set
24
25
  from typing_extensions import Self
@@ -32,7 +33,7 @@ class ConfigsUpdateRequest(BaseModel):
32
33
  charge_breakdown: StrictBool = Field(alias="chargeBreakdown")
33
34
  use_guest_lang: StrictBool = Field(alias="useGuestLang")
34
35
  due_days: Optional[StrictInt] = Field(default=0, alias="dueDays")
35
- sequence_start_number: Optional[StrictInt] = Field(default=0, alias="sequenceStartNumber")
36
+ sequence_start_number: Optional[Annotated[int, Field(strict=True, ge=1)]] = Field(default=None, alias="sequenceStartNumber")
36
37
  lang: Optional[StrictStr] = None
37
38
  prefix: Optional[StrictStr] = None
38
39
  suffix: Optional[StrictStr] = None
@@ -41,7 +42,6 @@ class ConfigsUpdateRequest(BaseModel):
41
42
  show_legal_company_name: StrictBool = Field(alias="showLegalCompanyName")
42
43
  include_room_number: StrictBool = Field(alias="includeRoomNumber")
43
44
  use_document_number: StrictBool = Field(alias="useDocumentNumber")
44
- create_invoice_on_allocation: Optional[StrictBool] = Field(default=False, alias="createInvoiceOnAllocation")
45
45
  update_invoice_on_link_document: Optional[StrictBool] = Field(default=False, alias="updateInvoiceOnLinkDocument")
46
46
  is_compact: StrictBool = Field(alias="isCompact")
47
47
  use_invoice_title_and_numbering: Optional[StrictBool] = Field(default=False, description="Flag to determine if invoice title, sequenceStartNumber, prefix and suffix should be used.", alias="useInvoiceTitleAndNumbering")
@@ -52,7 +52,7 @@ class ConfigsUpdateRequest(BaseModel):
52
52
  cpf: Optional[StrictStr] = None
53
53
  custom_text: Optional[Dict[str, StrictStr]] = Field(default=None, alias="customText")
54
54
  logo_id: Optional[StrictInt] = Field(default=None, alias="logoId")
55
- __properties: ClassVar[List[str]] = ["triggerEvents", "showDetailedTaxFee", "chargeBreakdown", "useGuestLang", "dueDays", "sequenceStartNumber", "lang", "prefix", "suffix", "legalCompanyName", "title", "showLegalCompanyName", "includeRoomNumber", "useDocumentNumber", "createInvoiceOnAllocation", "updateInvoiceOnLinkDocument", "isCompact", "useInvoiceTitleAndNumbering", "useInvoiceDocumentSettings", "showCreditNotesAndReceipts", "taxId1", "taxId2", "cpf", "customText", "logoId"]
55
+ __properties: ClassVar[List[str]] = ["triggerEvents", "showDetailedTaxFee", "chargeBreakdown", "useGuestLang", "dueDays", "sequenceStartNumber", "lang", "prefix", "suffix", "legalCompanyName", "title", "showLegalCompanyName", "includeRoomNumber", "useDocumentNumber", "updateInvoiceOnLinkDocument", "isCompact", "useInvoiceTitleAndNumbering", "useInvoiceDocumentSettings", "showCreditNotesAndReceipts", "taxId1", "taxId2", "cpf", "customText", "logoId"]
56
56
 
57
57
  model_config = ConfigDict(
58
58
  populate_by_name=True,
@@ -93,6 +93,11 @@ class ConfigsUpdateRequest(BaseModel):
93
93
  exclude=excluded_fields,
94
94
  exclude_none=True,
95
95
  )
96
+ # set to None if sequence_start_number (nullable) is None
97
+ # and model_fields_set contains the field
98
+ if self.sequence_start_number is None and "sequence_start_number" in self.model_fields_set:
99
+ _dict['sequenceStartNumber'] = None
100
+
96
101
  # set to None if lang (nullable) is None
97
102
  # and model_fields_set contains the field
98
103
  if self.lang is None and "lang" in self.model_fields_set:
@@ -160,7 +165,7 @@ class ConfigsUpdateRequest(BaseModel):
160
165
  "chargeBreakdown": obj.get("chargeBreakdown"),
161
166
  "useGuestLang": obj.get("useGuestLang"),
162
167
  "dueDays": obj.get("dueDays") if obj.get("dueDays") is not None else 0,
163
- "sequenceStartNumber": obj.get("sequenceStartNumber") if obj.get("sequenceStartNumber") is not None else 0,
168
+ "sequenceStartNumber": obj.get("sequenceStartNumber"),
164
169
  "lang": obj.get("lang"),
165
170
  "prefix": obj.get("prefix"),
166
171
  "suffix": obj.get("suffix"),
@@ -169,7 +174,6 @@ class ConfigsUpdateRequest(BaseModel):
169
174
  "showLegalCompanyName": obj.get("showLegalCompanyName") if obj.get("showLegalCompanyName") is not None else False,
170
175
  "includeRoomNumber": obj.get("includeRoomNumber") if obj.get("includeRoomNumber") is not None else False,
171
176
  "useDocumentNumber": obj.get("useDocumentNumber"),
172
- "createInvoiceOnAllocation": obj.get("createInvoiceOnAllocation") if obj.get("createInvoiceOnAllocation") is not None else False,
173
177
  "updateInvoiceOnLinkDocument": obj.get("updateInvoiceOnLinkDocument") if obj.get("updateInvoiceOnLinkDocument") is not None else False,
174
178
  "isCompact": obj.get("isCompact") if obj.get("isCompact") is not None else False,
175
179
  "useInvoiceTitleAndNumbering": obj.get("useInvoiceTitleAndNumbering") if obj.get("useInvoiceTitleAndNumbering") is not None else False,