cloudbeds-fiscal-document 1.9.2__py3-none-any.whl → 1.11.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 (49) hide show
  1. cloudbeds_fiscal_document/__init__.py +5 -1
  2. cloudbeds_fiscal_document/api/configs_api.py +941 -92
  3. cloudbeds_fiscal_document/api/fiscal_documents_api.py +304 -3
  4. cloudbeds_fiscal_document/api_client.py +1 -1
  5. cloudbeds_fiscal_document/configuration.py +1 -1
  6. cloudbeds_fiscal_document/models/__init__.py +4 -0
  7. cloudbeds_fiscal_document/models/configs_response.py +13 -2
  8. cloudbeds_fiscal_document/models/configs_update_request.py +8 -2
  9. cloudbeds_fiscal_document/models/create_invoice_request.py +5 -3
  10. cloudbeds_fiscal_document/models/create_receipt_request.py +3 -5
  11. cloudbeds_fiscal_document/models/document_action.py +1 -0
  12. cloudbeds_fiscal_document/models/fiscal_document_detailed_response.py +5 -3
  13. cloudbeds_fiscal_document/models/fiscal_document_kind.py +1 -1
  14. cloudbeds_fiscal_document/models/get_invoice_preview_request.py +5 -3
  15. cloudbeds_fiscal_document/models/get_logo_response.py +87 -0
  16. cloudbeds_fiscal_document/models/government_integration.py +3 -5
  17. cloudbeds_fiscal_document/models/preview_request.py +102 -0
  18. cloudbeds_fiscal_document/models/property_configs_response.py +100 -0
  19. cloudbeds_fiscal_document/models/transaction_for_allocation_response.py +4 -1
  20. cloudbeds_fiscal_document/models/transaction_status.py +37 -0
  21. cloudbeds_fiscal_document/test/test_configs_api.py +28 -0
  22. cloudbeds_fiscal_document/test/test_configs_response.py +9 -1
  23. cloudbeds_fiscal_document/test/test_configs_update_request.py +12 -4
  24. cloudbeds_fiscal_document/test/test_create_credit_note_request.py +13 -6
  25. cloudbeds_fiscal_document/test/test_create_invoice_request.py +22 -8
  26. cloudbeds_fiscal_document/test/test_fiscal_document_detailed_response.py +32 -5
  27. cloudbeds_fiscal_document/test/test_fiscal_document_paginated.py +29 -7
  28. cloudbeds_fiscal_document/test/test_fiscal_document_patch_request.py +3 -1
  29. cloudbeds_fiscal_document/test/test_fiscal_document_recipient.py +25 -3
  30. cloudbeds_fiscal_document/test/test_fiscal_document_summary_response.py +2 -1
  31. cloudbeds_fiscal_document/test/test_fiscal_document_transaction_response.py +7 -1
  32. cloudbeds_fiscal_document/test/test_fiscal_document_transactions_for_allocation_paginated.py +1 -0
  33. cloudbeds_fiscal_document/test/test_fiscal_document_transactions_paginated.py +7 -1
  34. cloudbeds_fiscal_document/test/test_fiscal_documents_api.py +113 -1
  35. cloudbeds_fiscal_document/test/test_get_invoice_preview_request.py +2 -1
  36. cloudbeds_fiscal_document/test/test_get_logo_response.py +51 -0
  37. cloudbeds_fiscal_document/test/test_government_integration.py +2 -1
  38. cloudbeds_fiscal_document/test/test_preview_request.py +57 -0
  39. cloudbeds_fiscal_document/test/test_property_configs_response.py +84 -0
  40. cloudbeds_fiscal_document/test/test_recipient_details.py +4 -2
  41. cloudbeds_fiscal_document/test/test_recipient_tax_info.py +2 -1
  42. cloudbeds_fiscal_document/test/test_rectify_invoice_note_request.py +9 -0
  43. cloudbeds_fiscal_document/test/test_transaction_for_allocation_response.py +3 -1
  44. cloudbeds_fiscal_document/test/test_transaction_status.py +33 -0
  45. {cloudbeds_fiscal_document-1.9.2.dist-info → cloudbeds_fiscal_document-1.11.0.dist-info}/METADATA +13 -7
  46. {cloudbeds_fiscal_document-1.9.2.dist-info → cloudbeds_fiscal_document-1.11.0.dist-info}/RECORD +49 -41
  47. {cloudbeds_fiscal_document-1.9.2.dist-info → cloudbeds_fiscal_document-1.11.0.dist-info}/WHEEL +0 -0
  48. {cloudbeds_fiscal_document-1.9.2.dist-info → cloudbeds_fiscal_document-1.11.0.dist-info}/licenses/LICENSE +0 -0
  49. {cloudbeds_fiscal_document-1.9.2.dist-info → cloudbeds_fiscal_document-1.11.0.dist-info}/top_level.txt +0 -0
@@ -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
@@ -4231,7 +4232,7 @@ class FiscalDocumentsApi:
4231
4232
  ) -> FiscalDocumentTransactionsPaginated:
4232
4233
  """Get available transactions for fiscal documents
4233
4234
 
4234
- 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)
4235
4236
 
4236
4237
  :param x_property_id: Property id (required)
4237
4238
  :type x_property_id: int
@@ -4330,7 +4331,7 @@ class FiscalDocumentsApi:
4330
4331
  ) -> ApiResponse[FiscalDocumentTransactionsPaginated]:
4331
4332
  """Get available transactions for fiscal documents
4332
4333
 
4333
- 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)
4334
4335
 
4335
4336
  :param x_property_id: Property id (required)
4336
4337
  :type x_property_id: int
@@ -4429,7 +4430,7 @@ class FiscalDocumentsApi:
4429
4430
  ) -> RESTResponseType:
4430
4431
  """Get available transactions for fiscal documents
4431
4432
 
4432
- 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)
4433
4434
 
4434
4435
  :param x_property_id: Property id (required)
4435
4436
  :type x_property_id: int
@@ -4975,6 +4976,7 @@ class FiscalDocumentsApi:
4975
4976
  sort: Annotated[Optional[StrictStr], Field(description="Supported fields - createdAt, serviceDate, sourceId, transactionDate, internalCode")] = None,
4976
4977
  folio_ids: Annotated[Optional[Annotated[List[StrictInt], Field(min_length=1)]], Field(description="Filter by folio IDs.")] = None,
4977
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,
4978
4980
  _request_timeout: Union[
4979
4981
  None,
4980
4982
  Annotated[StrictFloat, Field(gt=0)],
@@ -5008,6 +5010,8 @@ class FiscalDocumentsApi:
5008
5010
  :type folio_ids: List[int]
5009
5011
  :param document_ids: document IDs.
5010
5012
  :type document_ids: List[int]
5013
+ :param statuses: Filter by status.
5014
+ :type statuses: List[TransactionStatus]
5011
5015
  :param _request_timeout: timeout setting for this request. If one
5012
5016
  number provided, it will be total request
5013
5017
  timeout. It can also be a pair (tuple) of
@@ -5039,6 +5043,7 @@ class FiscalDocumentsApi:
5039
5043
  sort=sort,
5040
5044
  folio_ids=folio_ids,
5041
5045
  document_ids=document_ids,
5046
+ statuses=statuses,
5042
5047
  _request_auth=_request_auth,
5043
5048
  _content_type=_content_type,
5044
5049
  _headers=_headers,
@@ -5070,6 +5075,7 @@ class FiscalDocumentsApi:
5070
5075
  sort: Annotated[Optional[StrictStr], Field(description="Supported fields - createdAt, serviceDate, sourceId, transactionDate, internalCode")] = None,
5071
5076
  folio_ids: Annotated[Optional[Annotated[List[StrictInt], Field(min_length=1)]], Field(description="Filter by folio IDs.")] = None,
5072
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,
5073
5079
  _request_timeout: Union[
5074
5080
  None,
5075
5081
  Annotated[StrictFloat, Field(gt=0)],
@@ -5103,6 +5109,8 @@ class FiscalDocumentsApi:
5103
5109
  :type folio_ids: List[int]
5104
5110
  :param document_ids: document IDs.
5105
5111
  :type document_ids: List[int]
5112
+ :param statuses: Filter by status.
5113
+ :type statuses: List[TransactionStatus]
5106
5114
  :param _request_timeout: timeout setting for this request. If one
5107
5115
  number provided, it will be total request
5108
5116
  timeout. It can also be a pair (tuple) of
@@ -5134,6 +5142,7 @@ class FiscalDocumentsApi:
5134
5142
  sort=sort,
5135
5143
  folio_ids=folio_ids,
5136
5144
  document_ids=document_ids,
5145
+ statuses=statuses,
5137
5146
  _request_auth=_request_auth,
5138
5147
  _content_type=_content_type,
5139
5148
  _headers=_headers,
@@ -5165,6 +5174,7 @@ class FiscalDocumentsApi:
5165
5174
  sort: Annotated[Optional[StrictStr], Field(description="Supported fields - createdAt, serviceDate, sourceId, transactionDate, internalCode")] = None,
5166
5175
  folio_ids: Annotated[Optional[Annotated[List[StrictInt], Field(min_length=1)]], Field(description="Filter by folio IDs.")] = None,
5167
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,
5168
5178
  _request_timeout: Union[
5169
5179
  None,
5170
5180
  Annotated[StrictFloat, Field(gt=0)],
@@ -5198,6 +5208,8 @@ class FiscalDocumentsApi:
5198
5208
  :type folio_ids: List[int]
5199
5209
  :param document_ids: document IDs.
5200
5210
  :type document_ids: List[int]
5211
+ :param statuses: Filter by status.
5212
+ :type statuses: List[TransactionStatus]
5201
5213
  :param _request_timeout: timeout setting for this request. If one
5202
5214
  number provided, it will be total request
5203
5215
  timeout. It can also be a pair (tuple) of
@@ -5229,6 +5241,7 @@ class FiscalDocumentsApi:
5229
5241
  sort=sort,
5230
5242
  folio_ids=folio_ids,
5231
5243
  document_ids=document_ids,
5244
+ statuses=statuses,
5232
5245
  _request_auth=_request_auth,
5233
5246
  _content_type=_content_type,
5234
5247
  _headers=_headers,
@@ -5255,6 +5268,7 @@ class FiscalDocumentsApi:
5255
5268
  sort,
5256
5269
  folio_ids,
5257
5270
  document_ids,
5271
+ statuses,
5258
5272
  _request_auth,
5259
5273
  _content_type,
5260
5274
  _headers,
@@ -5266,6 +5280,7 @@ class FiscalDocumentsApi:
5266
5280
  _collection_formats: Dict[str, str] = {
5267
5281
  'folioIds': 'multi',
5268
5282
  'documentIds': 'multi',
5283
+ 'statuses': 'multi',
5269
5284
  }
5270
5285
 
5271
5286
  _path_params: Dict[str, str] = {}
@@ -5307,6 +5322,10 @@ class FiscalDocumentsApi:
5307
5322
 
5308
5323
  _query_params.append(('documentIds', document_ids))
5309
5324
 
5325
+ if statuses is not None:
5326
+
5327
+ _query_params.append(('statuses', statuses))
5328
+
5310
5329
  # process the header parameters
5311
5330
  if x_property_id is not None:
5312
5331
  _header_params['X-Property-ID'] = x_property_id
@@ -7558,3 +7577,285 @@ class FiscalDocumentsApi:
7558
7577
  )
7559
7578
 
7560
7579
 
7580
+
7581
+
7582
+ @validate_call
7583
+ def void_receipt(
7584
+ self,
7585
+ x_property_id: Annotated[int, Field(strict=True, ge=1, description="Property id")],
7586
+ receipt_id: Annotated[StrictInt, Field(description="The ID of the receipt to void")],
7587
+ _request_timeout: Union[
7588
+ None,
7589
+ Annotated[StrictFloat, Field(gt=0)],
7590
+ Tuple[
7591
+ Annotated[StrictFloat, Field(gt=0)],
7592
+ Annotated[StrictFloat, Field(gt=0)]
7593
+ ]
7594
+ ] = None,
7595
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
7596
+ _content_type: Optional[StrictStr] = None,
7597
+ _headers: Optional[Dict[StrictStr, Any]] = None,
7598
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
7599
+ ) -> None:
7600
+ """Void a receipt
7601
+
7602
+ 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.
7603
+
7604
+ :param x_property_id: Property id (required)
7605
+ :type x_property_id: int
7606
+ :param receipt_id: The ID of the receipt to void (required)
7607
+ :type receipt_id: int
7608
+ :param _request_timeout: timeout setting for this request. If one
7609
+ number provided, it will be total request
7610
+ timeout. It can also be a pair (tuple) of
7611
+ (connection, read) timeouts.
7612
+ :type _request_timeout: int, tuple(int, int), optional
7613
+ :param _request_auth: set to override the auth_settings for an a single
7614
+ request; this effectively ignores the
7615
+ authentication in the spec for a single request.
7616
+ :type _request_auth: dict, optional
7617
+ :param _content_type: force content-type for the request.
7618
+ :type _content_type: str, Optional
7619
+ :param _headers: set to override the headers for a single
7620
+ request; this effectively ignores the headers
7621
+ in the spec for a single request.
7622
+ :type _headers: dict, optional
7623
+ :param _host_index: set to override the host_index for a single
7624
+ request; this effectively ignores the host_index
7625
+ in the spec for a single request.
7626
+ :type _host_index: int, optional
7627
+ :return: Returns the result object.
7628
+ """ # noqa: E501
7629
+
7630
+ _param = self._void_receipt_serialize(
7631
+ x_property_id=x_property_id,
7632
+ receipt_id=receipt_id,
7633
+ _request_auth=_request_auth,
7634
+ _content_type=_content_type,
7635
+ _headers=_headers,
7636
+ _host_index=_host_index
7637
+ )
7638
+
7639
+ _response_types_map: Dict[str, Optional[str]] = {
7640
+ '204': None,
7641
+ '400': "ApiError",
7642
+ '404': None,
7643
+ }
7644
+ response_data = self.api_client.call_api(
7645
+ *_param,
7646
+ _request_timeout=_request_timeout
7647
+ )
7648
+ response_data.read()
7649
+ return self.api_client.response_deserialize(
7650
+ response_data=response_data,
7651
+ response_types_map=_response_types_map,
7652
+ ).data
7653
+
7654
+
7655
+ @validate_call
7656
+ def void_receipt_with_http_info(
7657
+ self,
7658
+ x_property_id: Annotated[int, Field(strict=True, ge=1, description="Property id")],
7659
+ receipt_id: Annotated[StrictInt, Field(description="The ID of the receipt to void")],
7660
+ _request_timeout: Union[
7661
+ None,
7662
+ Annotated[StrictFloat, Field(gt=0)],
7663
+ Tuple[
7664
+ Annotated[StrictFloat, Field(gt=0)],
7665
+ Annotated[StrictFloat, Field(gt=0)]
7666
+ ]
7667
+ ] = None,
7668
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
7669
+ _content_type: Optional[StrictStr] = None,
7670
+ _headers: Optional[Dict[StrictStr, Any]] = None,
7671
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
7672
+ ) -> ApiResponse[None]:
7673
+ """Void a receipt
7674
+
7675
+ 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.
7676
+
7677
+ :param x_property_id: Property id (required)
7678
+ :type x_property_id: int
7679
+ :param receipt_id: The ID of the receipt to void (required)
7680
+ :type receipt_id: int
7681
+ :param _request_timeout: timeout setting for this request. If one
7682
+ number provided, it will be total request
7683
+ timeout. It can also be a pair (tuple) of
7684
+ (connection, read) timeouts.
7685
+ :type _request_timeout: int, tuple(int, int), optional
7686
+ :param _request_auth: set to override the auth_settings for an a single
7687
+ request; this effectively ignores the
7688
+ authentication in the spec for a single request.
7689
+ :type _request_auth: dict, optional
7690
+ :param _content_type: force content-type for the request.
7691
+ :type _content_type: str, Optional
7692
+ :param _headers: set to override the headers for a single
7693
+ request; this effectively ignores the headers
7694
+ in the spec for a single request.
7695
+ :type _headers: dict, optional
7696
+ :param _host_index: set to override the host_index for a single
7697
+ request; this effectively ignores the host_index
7698
+ in the spec for a single request.
7699
+ :type _host_index: int, optional
7700
+ :return: Returns the result object.
7701
+ """ # noqa: E501
7702
+
7703
+ _param = self._void_receipt_serialize(
7704
+ x_property_id=x_property_id,
7705
+ receipt_id=receipt_id,
7706
+ _request_auth=_request_auth,
7707
+ _content_type=_content_type,
7708
+ _headers=_headers,
7709
+ _host_index=_host_index
7710
+ )
7711
+
7712
+ _response_types_map: Dict[str, Optional[str]] = {
7713
+ '204': None,
7714
+ '400': "ApiError",
7715
+ '404': None,
7716
+ }
7717
+ response_data = self.api_client.call_api(
7718
+ *_param,
7719
+ _request_timeout=_request_timeout
7720
+ )
7721
+ response_data.read()
7722
+ return self.api_client.response_deserialize(
7723
+ response_data=response_data,
7724
+ response_types_map=_response_types_map,
7725
+ )
7726
+
7727
+
7728
+ @validate_call
7729
+ def void_receipt_without_preload_content(
7730
+ self,
7731
+ x_property_id: Annotated[int, Field(strict=True, ge=1, description="Property id")],
7732
+ receipt_id: Annotated[StrictInt, Field(description="The ID of the receipt to void")],
7733
+ _request_timeout: Union[
7734
+ None,
7735
+ Annotated[StrictFloat, Field(gt=0)],
7736
+ Tuple[
7737
+ Annotated[StrictFloat, Field(gt=0)],
7738
+ Annotated[StrictFloat, Field(gt=0)]
7739
+ ]
7740
+ ] = None,
7741
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
7742
+ _content_type: Optional[StrictStr] = None,
7743
+ _headers: Optional[Dict[StrictStr, Any]] = None,
7744
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
7745
+ ) -> RESTResponseType:
7746
+ """Void a receipt
7747
+
7748
+ 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.
7749
+
7750
+ :param x_property_id: Property id (required)
7751
+ :type x_property_id: int
7752
+ :param receipt_id: The ID of the receipt to void (required)
7753
+ :type receipt_id: int
7754
+ :param _request_timeout: timeout setting for this request. If one
7755
+ number provided, it will be total request
7756
+ timeout. It can also be a pair (tuple) of
7757
+ (connection, read) timeouts.
7758
+ :type _request_timeout: int, tuple(int, int), optional
7759
+ :param _request_auth: set to override the auth_settings for an a single
7760
+ request; this effectively ignores the
7761
+ authentication in the spec for a single request.
7762
+ :type _request_auth: dict, optional
7763
+ :param _content_type: force content-type for the request.
7764
+ :type _content_type: str, Optional
7765
+ :param _headers: set to override the headers for a single
7766
+ request; this effectively ignores the headers
7767
+ in the spec for a single request.
7768
+ :type _headers: dict, optional
7769
+ :param _host_index: set to override the host_index for a single
7770
+ request; this effectively ignores the host_index
7771
+ in the spec for a single request.
7772
+ :type _host_index: int, optional
7773
+ :return: Returns the result object.
7774
+ """ # noqa: E501
7775
+
7776
+ _param = self._void_receipt_serialize(
7777
+ x_property_id=x_property_id,
7778
+ receipt_id=receipt_id,
7779
+ _request_auth=_request_auth,
7780
+ _content_type=_content_type,
7781
+ _headers=_headers,
7782
+ _host_index=_host_index
7783
+ )
7784
+
7785
+ _response_types_map: Dict[str, Optional[str]] = {
7786
+ '204': None,
7787
+ '400': "ApiError",
7788
+ '404': None,
7789
+ }
7790
+ response_data = self.api_client.call_api(
7791
+ *_param,
7792
+ _request_timeout=_request_timeout
7793
+ )
7794
+ return response_data.response
7795
+
7796
+
7797
+ def _void_receipt_serialize(
7798
+ self,
7799
+ x_property_id,
7800
+ receipt_id,
7801
+ _request_auth,
7802
+ _content_type,
7803
+ _headers,
7804
+ _host_index,
7805
+ ) -> RequestSerialized:
7806
+
7807
+ _host = None
7808
+
7809
+ _collection_formats: Dict[str, str] = {
7810
+ }
7811
+
7812
+ _path_params: Dict[str, str] = {}
7813
+ _query_params: List[Tuple[str, str]] = []
7814
+ _header_params: Dict[str, Optional[str]] = _headers or {}
7815
+ _form_params: List[Tuple[str, str]] = []
7816
+ _files: Dict[
7817
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
7818
+ ] = {}
7819
+ _body_params: Optional[bytes] = None
7820
+
7821
+ # process the path parameters
7822
+ if receipt_id is not None:
7823
+ _path_params['receiptId'] = receipt_id
7824
+ # process the query parameters
7825
+ # process the header parameters
7826
+ if x_property_id is not None:
7827
+ _header_params['X-Property-ID'] = x_property_id
7828
+ # process the form parameters
7829
+ # process the body parameter
7830
+
7831
+
7832
+ # set the HTTP header `Accept`
7833
+ if 'Accept' not in _header_params:
7834
+ _header_params['Accept'] = self.api_client.select_header_accept(
7835
+ [
7836
+ 'application/json'
7837
+ ]
7838
+ )
7839
+
7840
+
7841
+ # authentication setting
7842
+ _auth_settings: List[str] = [
7843
+ 'bearerAuth'
7844
+ ]
7845
+
7846
+ return self.api_client.param_serialize(
7847
+ method='POST',
7848
+ resource_path='/fiscal-document/v1/fiscal-documents/receipts/{receiptId}/void',
7849
+ path_params=_path_params,
7850
+ query_params=_query_params,
7851
+ header_params=_header_params,
7852
+ body=_body_params,
7853
+ post_params=_form_params,
7854
+ files=_files,
7855
+ auth_settings=_auth_settings,
7856
+ collection_formats=_collection_formats,
7857
+ _host=_host,
7858
+ _request_auth=_request_auth
7859
+ )
7860
+
7861
+
@@ -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.11.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.9.2".\
507
+ "SDK Package Version: 1.11.0".\
508
508
  format(env=sys.platform, pyversion=sys.version)
509
509
 
510
510
  def get_host_settings(self) -> List[HostSetting]:
@@ -45,14 +45,17 @@ from cloudbeds_fiscal_document.models.fiscal_document_transactions_summary impor
45
45
  from cloudbeds_fiscal_document.models.fiscal_document_transactions_summary_taxes_inner import FiscalDocumentTransactionsSummaryTaxesInner
46
46
  from cloudbeds_fiscal_document.models.get_credit_note_preview_request import GetCreditNotePreviewRequest
47
47
  from cloudbeds_fiscal_document.models.get_invoice_preview_request import GetInvoicePreviewRequest
48
+ from cloudbeds_fiscal_document.models.get_logo_response import GetLogoResponse
48
49
  from cloudbeds_fiscal_document.models.get_rectify_invoice_note_preview_request import GetRectifyInvoiceNotePreviewRequest
49
50
  from cloudbeds_fiscal_document.models.government_integration import GovernmentIntegration
50
51
  from cloudbeds_fiscal_document.models.government_integration_qr import GovernmentIntegrationQr
51
52
  from cloudbeds_fiscal_document.models.latest_linked_document import LatestLinkedDocument
52
53
  from cloudbeds_fiscal_document.models.linked_document import LinkedDocument
54
+ from cloudbeds_fiscal_document.models.preview_request import PreviewRequest
53
55
  from cloudbeds_fiscal_document.models.pro_forma_invoice_preview_request import ProFormaInvoicePreviewRequest
54
56
  from cloudbeds_fiscal_document.models.pro_forma_invoice_request import ProFormaInvoiceRequest
55
57
  from cloudbeds_fiscal_document.models.pro_forma_status_update_request import ProFormaStatusUpdateRequest
58
+ from cloudbeds_fiscal_document.models.property_configs_response import PropertyConfigsResponse
56
59
  from cloudbeds_fiscal_document.models.receipt_transaction_allocation import ReceiptTransactionAllocation
57
60
  from cloudbeds_fiscal_document.models.recipient_address import RecipientAddress
58
61
  from cloudbeds_fiscal_document.models.recipient_company import RecipientCompany
@@ -66,3 +69,4 @@ from cloudbeds_fiscal_document.models.rectify_invoice_note_request import Rectif
66
69
  from cloudbeds_fiscal_document.models.single_allocation import SingleAllocation
67
70
  from cloudbeds_fiscal_document.models.source_kind import SourceKind
68
71
  from cloudbeds_fiscal_document.models.transaction_for_allocation_response import TransactionForAllocationResponse
72
+ from cloudbeds_fiscal_document.models.transaction_status import TransactionStatus
@@ -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 cloudbeds_fiscal_document.models.document_trigger_event import DocumentTriggerEvent
22
23
  from cloudbeds_fiscal_document.models.fiscal_document_kind import FiscalDocumentKind
23
24
  from typing import Optional, Set
24
25
  from typing_extensions import Self
@@ -47,7 +48,12 @@ class ConfigsResponse(BaseModel):
47
48
  tax_id2: Optional[StrictStr] = Field(default=None, alias="taxId2")
48
49
  cpf: Optional[StrictStr] = None
49
50
  custom_text: Optional[Dict[str, StrictStr]] = Field(default=None, alias="customText")
50
- __properties: ClassVar[List[str]] = ["propertyId", "documentKind", "showDetailedTaxFee", "showCreditNotesAndReceipts", "chargeBreakdown", "useGuestLang", "dueDays", "lang", "prefix", "suffix", "legalCompanyName", "title", "showLegalCompanyName", "includeRoomNumber", "useDocumentNumber", "isCompact", "taxId1", "taxId2", "cpf", "customText"]
51
+ create_invoice_on_allocation: Optional[StrictBool] = Field(default=False, alias="createInvoiceOnAllocation")
52
+ trigger_events: Optional[List[DocumentTriggerEvent]] = Field(default=None, alias="triggerEvents")
53
+ update_invoice_on_link_document: Optional[StrictBool] = Field(default=False, alias="updateInvoiceOnLinkDocument")
54
+ use_invoice_document_settings: Optional[StrictBool] = Field(default=False, alias="useInvoiceDocumentSettings")
55
+ 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"]
51
57
 
52
58
  model_config = ConfigDict(
53
59
  populate_by_name=True,
@@ -119,7 +125,12 @@ class ConfigsResponse(BaseModel):
119
125
  "taxId1": obj.get("taxId1"),
120
126
  "taxId2": obj.get("taxId2"),
121
127
  "cpf": obj.get("cpf"),
122
- "customText": obj.get("customText")
128
+ "customText": obj.get("customText"),
129
+ "createInvoiceOnAllocation": obj.get("createInvoiceOnAllocation") if obj.get("createInvoiceOnAllocation") is not None else False,
130
+ "triggerEvents": obj.get("triggerEvents"),
131
+ "updateInvoiceOnLinkDocument": obj.get("updateInvoiceOnLinkDocument") if obj.get("updateInvoiceOnLinkDocument") is not None else False,
132
+ "useInvoiceDocumentSettings": obj.get("useInvoiceDocumentSettings") if obj.get("useInvoiceDocumentSettings") is not None else False,
133
+ "useInvoiceTitleAndNumbering": obj.get("useInvoiceTitleAndNumbering") if obj.get("useInvoiceTitleAndNumbering") is not None else False
123
134
  })
124
135
  return _obj
125
136
 
@@ -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
@@ -93,6 +94,11 @@ class ConfigsUpdateRequest(BaseModel):
93
94
  exclude=excluded_fields,
94
95
  exclude_none=True,
95
96
  )
97
+ # set to None if sequence_start_number (nullable) is None
98
+ # and model_fields_set contains the field
99
+ if self.sequence_start_number is None and "sequence_start_number" in self.model_fields_set:
100
+ _dict['sequenceStartNumber'] = None
101
+
96
102
  # set to None if lang (nullable) is None
97
103
  # and model_fields_set contains the field
98
104
  if self.lang is None and "lang" in self.model_fields_set:
@@ -160,7 +166,7 @@ class ConfigsUpdateRequest(BaseModel):
160
166
  "chargeBreakdown": obj.get("chargeBreakdown"),
161
167
  "useGuestLang": obj.get("useGuestLang"),
162
168
  "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,
169
+ "sequenceStartNumber": obj.get("sequenceStartNumber"),
164
170
  "lang": obj.get("lang"),
165
171
  "prefix": obj.get("prefix"),
166
172
  "suffix": obj.get("suffix"),
@@ -17,7 +17,7 @@ import pprint
17
17
  import re # noqa: F401
18
18
  import json
19
19
 
20
- from pydantic import BaseModel, ConfigDict, Field
20
+ from pydantic import BaseModel, ConfigDict, Field, StrictBool
21
21
  from typing import Any, ClassVar, Dict, List, Optional
22
22
  from typing_extensions import Annotated
23
23
  from cloudbeds_fiscal_document.models.recipient_request import RecipientRequest
@@ -38,7 +38,8 @@ class CreateInvoiceRequest(BaseModel):
38
38
  folio_ids: Optional[List[Annotated[int, Field(strict=True, ge=1)]]] = Field(default=None, description="Include all transactions from the specified folio IDs", alias="folioIds")
39
39
  exclude_transaction_ids: Optional[List[Annotated[int, Field(strict=True, ge=1)]]] = Field(default=None, description="Exclude transactions with the specified IDs", alias="excludeTransactionIds")
40
40
  include_transaction_ids: Optional[List[Annotated[int, Field(strict=True, ge=1)]]] = Field(default=None, description="Include transactions with the specified IDs", alias="includeTransactionIds")
41
- __properties: ClassVar[List[str]] = ["transactionIds", "sourceId", "sequenceId", "sourceKind", "userId", "recipient", "folioIds", "excludeTransactionIds", "includeTransactionIds"]
41
+ simplified: Optional[StrictBool] = False
42
+ __properties: ClassVar[List[str]] = ["transactionIds", "sourceId", "sequenceId", "sourceKind", "userId", "recipient", "folioIds", "excludeTransactionIds", "includeTransactionIds", "simplified"]
42
43
 
43
44
  model_config = ConfigDict(
44
45
  populate_by_name=True,
@@ -112,7 +113,8 @@ class CreateInvoiceRequest(BaseModel):
112
113
  "recipient": RecipientRequest.from_dict(obj["recipient"]) if obj.get("recipient") is not None else None,
113
114
  "folioIds": obj.get("folioIds"),
114
115
  "excludeTransactionIds": obj.get("excludeTransactionIds"),
115
- "includeTransactionIds": obj.get("includeTransactionIds")
116
+ "includeTransactionIds": obj.get("includeTransactionIds"),
117
+ "simplified": obj.get("simplified") if obj.get("simplified") is not None else False
116
118
  })
117
119
  return _obj
118
120
 
@@ -17,7 +17,7 @@ import pprint
17
17
  import re # noqa: F401
18
18
  import json
19
19
 
20
- from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt
20
+ from pydantic import BaseModel, ConfigDict, Field, StrictInt
21
21
  from typing import Any, ClassVar, Dict, List, Optional
22
22
  from typing_extensions import Annotated
23
23
  from cloudbeds_fiscal_document.models.receipt_transaction_allocation import ReceiptTransactionAllocation
@@ -38,8 +38,7 @@ class CreateReceiptRequest(BaseModel):
38
38
  source_id: Annotated[int, Field(strict=True, ge=1)] = Field(alias="sourceId")
39
39
  source_kind: SourceKind = Field(alias="sourceKind")
40
40
  recipient: RecipientRequest
41
- generate_receipt: Optional[StrictBool] = Field(default=True, description="Whether to generate and print receipt (Italy only). Defaults to true. When false, receipt will not be sent to fiscal printer. ", alias="generateReceipt")
42
- __properties: ClassVar[List[str]] = ["allocations", "transactionId", "paymentId", "sequenceId", "userId", "sourceId", "sourceKind", "recipient", "generateReceipt"]
41
+ __properties: ClassVar[List[str]] = ["allocations", "transactionId", "paymentId", "sequenceId", "userId", "sourceId", "sourceKind", "recipient"]
43
42
 
44
43
  model_config = ConfigDict(
45
44
  populate_by_name=True,
@@ -129,8 +128,7 @@ class CreateReceiptRequest(BaseModel):
129
128
  "userId": obj.get("userId"),
130
129
  "sourceId": obj.get("sourceId"),
131
130
  "sourceKind": obj.get("sourceKind"),
132
- "recipient": RecipientRequest.from_dict(obj["recipient"]) if obj.get("recipient") is not None else None,
133
- "generateReceipt": obj.get("generateReceipt") if obj.get("generateReceipt") is not None else True
131
+ "recipient": RecipientRequest.from_dict(obj["recipient"]) if obj.get("recipient") is not None else None
134
132
  })
135
133
  return _obj
136
134
 
@@ -31,6 +31,7 @@ class DocumentAction(str, Enum):
31
31
  DOWNLOAD = 'DOWNLOAD'
32
32
  CREDIT_NOTE = 'CREDIT_NOTE'
33
33
  VOID = 'VOID'
34
+ VOID_AND_REFUND = 'VOID_AND_REFUND'
34
35
  ADD_PAYMENT = 'ADD_PAYMENT'
35
36
  APPLY_TO_INVOICE = 'APPLY_TO_INVOICE'
36
37
 
@@ -18,7 +18,7 @@ import re # noqa: F401
18
18
  import json
19
19
 
20
20
  from datetime import date, datetime
21
- from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr
21
+ from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictFloat, StrictInt, StrictStr
22
22
  from typing import Any, ClassVar, Dict, List, Optional, Union
23
23
  from cloudbeds_fiscal_document.models.action import Action
24
24
  from cloudbeds_fiscal_document.models.creation_method import CreationMethod
@@ -66,7 +66,8 @@ class FiscalDocumentDetailedResponse(BaseModel):
66
66
  linked_documents: Optional[List[LinkedDocument]] = Field(default=None, description="List of documents linked to this fiscal document (both parent and child relationships)", alias="linkedDocuments")
67
67
  actions: Optional[List[Action]] = Field(default=None, description="Returns the list of actions available for the transaction")
68
68
  source_identifier: Optional[StrictStr] = Field(default=None, description="Reservation Identifier or a group code", alias="sourceIdentifier")
69
- __properties: ClassVar[List[str]] = ["id", "number", "propertyId", "userId", "userFullName", "sourceName", "sourceId", "sourceKind", "kind", "invoiceDate", "invoiceDatePropertyTimezone", "fileName", "amount", "balance", "dueDate", "dueDatePropertyTimezone", "recipients", "status", "origin", "externalId", "failReason", "method", "createdAt", "parentId", "updatedAt", "governmentIntegration", "latestLinkedDocument", "linkedDocuments", "actions", "sourceIdentifier"]
69
+ simplified: Optional[StrictBool] = Field(default=None, description="Applies to invoices only.")
70
+ __properties: ClassVar[List[str]] = ["id", "number", "propertyId", "userId", "userFullName", "sourceName", "sourceId", "sourceKind", "kind", "invoiceDate", "invoiceDatePropertyTimezone", "fileName", "amount", "balance", "dueDate", "dueDatePropertyTimezone", "recipients", "status", "origin", "externalId", "failReason", "method", "createdAt", "parentId", "updatedAt", "governmentIntegration", "latestLinkedDocument", "linkedDocuments", "actions", "sourceIdentifier", "simplified"]
70
71
 
71
72
  model_config = ConfigDict(
72
73
  populate_by_name=True,
@@ -175,7 +176,8 @@ class FiscalDocumentDetailedResponse(BaseModel):
175
176
  "latestLinkedDocument": LatestLinkedDocument.from_dict(obj["latestLinkedDocument"]) if obj.get("latestLinkedDocument") is not None else None,
176
177
  "linkedDocuments": [LinkedDocument.from_dict(_item) for _item in obj["linkedDocuments"]] if obj.get("linkedDocuments") is not None else None,
177
178
  "actions": [Action.from_dict(_item) for _item in obj["actions"]] if obj.get("actions") is not None else None,
178
- "sourceIdentifier": obj.get("sourceIdentifier")
179
+ "sourceIdentifier": obj.get("sourceIdentifier"),
180
+ "simplified": obj.get("simplified")
179
181
  })
180
182
  return _obj
181
183
 
@@ -29,9 +29,9 @@ class FiscalDocumentKind(str, Enum):
29
29
  INVOICE = 'INVOICE'
30
30
  CREDIT_NOTE = 'CREDIT_NOTE'
31
31
  RECEIPT = 'RECEIPT'
32
- FISCALIZED_RECEIPT = 'FISCALIZED_RECEIPT'
33
32
  RECTIFY_INVOICE = 'RECTIFY_INVOICE'
34
33
  PRO_FORMA_INVOICE = 'PRO_FORMA_INVOICE'
34
+ REFUND_RECEIPT = 'REFUND_RECEIPT'
35
35
 
36
36
  @classmethod
37
37
  def from_json(cls, json_str: str) -> Self: