cloudbeds-fiscal-document 1.9.1__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 (31) hide show
  1. cloudbeds_fiscal_document/__init__.py +7 -1
  2. cloudbeds_fiscal_document/api/configs_api.py +941 -92
  3. cloudbeds_fiscal_document/api/fiscal_documents_api.py +1160 -160
  4. cloudbeds_fiscal_document/api_client.py +1 -1
  5. cloudbeds_fiscal_document/configuration.py +1 -1
  6. cloudbeds_fiscal_document/models/__init__.py +6 -0
  7. cloudbeds_fiscal_document/models/allocations_data.py +104 -0
  8. cloudbeds_fiscal_document/models/configs_response.py +13 -2
  9. cloudbeds_fiscal_document/models/configs_update_request.py +3 -1
  10. cloudbeds_fiscal_document/models/create_invoice_request.py +5 -3
  11. cloudbeds_fiscal_document/models/document_action.py +2 -0
  12. cloudbeds_fiscal_document/models/fiscal_document_detailed_response.py +5 -3
  13. cloudbeds_fiscal_document/models/fiscal_document_kind.py +1 -0
  14. cloudbeds_fiscal_document/models/fiscal_document_transaction_allocation.py +87 -0
  15. cloudbeds_fiscal_document/models/fiscal_document_transaction_response.py +13 -12
  16. cloudbeds_fiscal_document/models/get_invoice_preview_request.py +5 -3
  17. cloudbeds_fiscal_document/models/get_logo_response.py +87 -0
  18. cloudbeds_fiscal_document/models/preview_request.py +102 -0
  19. cloudbeds_fiscal_document/models/property_configs_response.py +100 -0
  20. cloudbeds_fiscal_document/models/single_allocation.py +89 -0
  21. cloudbeds_fiscal_document/test/test_allocations_data.py +59 -0
  22. cloudbeds_fiscal_document/test/test_fiscal_document_transaction_allocation.py +51 -0
  23. cloudbeds_fiscal_document/test/test_get_logo_response.py +51 -0
  24. cloudbeds_fiscal_document/test/test_preview_request.py +57 -0
  25. cloudbeds_fiscal_document/test/test_property_configs_response.py +84 -0
  26. cloudbeds_fiscal_document/test/test_single_allocation.py +52 -0
  27. {cloudbeds_fiscal_document-1.9.1.dist-info → cloudbeds_fiscal_document-1.10.0.dist-info}/METADATA +17 -7
  28. {cloudbeds_fiscal_document-1.9.1.dist-info → cloudbeds_fiscal_document-1.10.0.dist-info}/RECORD +31 -19
  29. {cloudbeds_fiscal_document-1.9.1.dist-info → cloudbeds_fiscal_document-1.10.0.dist-info}/WHEEL +0 -0
  30. {cloudbeds_fiscal_document-1.9.1.dist-info → cloudbeds_fiscal_document-1.10.0.dist-info}/licenses/LICENSE +0 -0
  31. {cloudbeds_fiscal_document-1.9.1.dist-info → cloudbeds_fiscal_document-1.10.0.dist-info}/top_level.txt +0 -0
@@ -20,6 +20,7 @@ from pydantic import Field, StrictBool, StrictBytes, StrictInt, StrictStr
20
20
  from typing import Any, Dict, List, Optional, Tuple, Union
21
21
  from typing_extensions import Annotated
22
22
  from cloudbeds_fiscal_document.models.allocate_receipt_payment_request import AllocateReceiptPaymentRequest
23
+ from cloudbeds_fiscal_document.models.allocations_data import AllocationsData
23
24
  from cloudbeds_fiscal_document.models.allocations_summary import AllocationsSummary
24
25
  from cloudbeds_fiscal_document.models.create_credit_note_request import CreateCreditNoteRequest
25
26
  from cloudbeds_fiscal_document.models.create_invoice_request import CreateInvoiceRequest
@@ -79,7 +80,7 @@ class FiscalDocumentsApi:
79
80
  _content_type: Optional[StrictStr] = None,
80
81
  _headers: Optional[Dict[StrictStr, Any]] = None,
81
82
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
82
- ) -> None:
83
+ ) -> FiscalDocumentSummaryResponse:
83
84
  """Allocate payment associated with receipt to charge transactions.
84
85
 
85
86
  Allocate payment associated with receipt to charge transactions. The amounts of all allocations must be equal to the payment amount. The transactions should not be fully allocated already and the amount allocated should not be more than the remaining balance on the transaction. All transactions not part of an invoice will be added to newly created invoice.
@@ -120,7 +121,7 @@ class FiscalDocumentsApi:
120
121
  )
121
122
 
122
123
  _response_types_map: Dict[str, Optional[str]] = {
123
- '200': None,
124
+ '200': "FiscalDocumentSummaryResponse",
124
125
  '400': "ApiError",
125
126
  '404': None,
126
127
  }
@@ -152,7 +153,7 @@ class FiscalDocumentsApi:
152
153
  _content_type: Optional[StrictStr] = None,
153
154
  _headers: Optional[Dict[StrictStr, Any]] = None,
154
155
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
155
- ) -> ApiResponse[None]:
156
+ ) -> ApiResponse[FiscalDocumentSummaryResponse]:
156
157
  """Allocate payment associated with receipt to charge transactions.
157
158
 
158
159
  Allocate payment associated with receipt to charge transactions. The amounts of all allocations must be equal to the payment amount. The transactions should not be fully allocated already and the amount allocated should not be more than the remaining balance on the transaction. All transactions not part of an invoice will be added to newly created invoice.
@@ -193,7 +194,7 @@ class FiscalDocumentsApi:
193
194
  )
194
195
 
195
196
  _response_types_map: Dict[str, Optional[str]] = {
196
- '200': None,
197
+ '200': "FiscalDocumentSummaryResponse",
197
198
  '400': "ApiError",
198
199
  '404': None,
199
200
  }
@@ -266,7 +267,7 @@ class FiscalDocumentsApi:
266
267
  )
267
268
 
268
269
  _response_types_map: Dict[str, Optional[str]] = {
269
- '200': None,
270
+ '200': "FiscalDocumentSummaryResponse",
270
271
  '400': "ApiError",
271
272
  '404': None,
272
273
  }
@@ -2687,13 +2688,13 @@ class FiscalDocumentsApi:
2687
2688
 
2688
2689
 
2689
2690
  @validate_call
2690
- def get_allocations_summary(
2691
+ def get_allocations(
2691
2692
  self,
2692
2693
  x_property_id: Annotated[int, Field(strict=True, ge=1, description="Property id")],
2693
- source_id: Annotated[int, Field(strict=True, ge=1, description="source ID.")],
2694
- source_kind: Annotated[SourceKind, Field(description="Filter by source kind.")],
2695
- folio_ids: Annotated[Optional[Annotated[List[StrictInt], Field(min_length=1)]], Field(description="Filter by folio IDs.")] = None,
2696
- document_ids: Annotated[Optional[Annotated[List[StrictInt], Field(min_length=1)]], Field(description="document IDs.")] = None,
2694
+ source_ids: Annotated[Optional[List[StrictInt]], Field(description="source IDs.")] = None,
2695
+ source_identifiers: Annotated[Optional[List[StrictStr]], Field(description="source Identifiers.")] = None,
2696
+ source_kind: Annotated[Optional[SourceKind], Field(description="Filter by source kind.")] = None,
2697
+ receipt_ids: Annotated[Optional[List[StrictInt]], Field(description="document IDs.")] = None,
2697
2698
  _request_timeout: Union[
2698
2699
  None,
2699
2700
  Annotated[StrictFloat, Field(gt=0)],
@@ -2706,21 +2707,21 @@ class FiscalDocumentsApi:
2706
2707
  _content_type: Optional[StrictStr] = None,
2707
2708
  _headers: Optional[Dict[StrictStr, Any]] = None,
2708
2709
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2709
- ) -> AllocationsSummary:
2710
- """Get allocations summary
2710
+ ) -> List[AllocationsData]:
2711
+ """Get payment allocation transactions
2711
2712
 
2712
- Retrieves allocations summary.
2713
+ Retrieves payment allocations.
2713
2714
 
2714
2715
  :param x_property_id: Property id (required)
2715
2716
  :type x_property_id: int
2716
- :param source_id: source ID. (required)
2717
- :type source_id: int
2718
- :param source_kind: Filter by source kind. (required)
2717
+ :param source_ids: source IDs.
2718
+ :type source_ids: List[int]
2719
+ :param source_identifiers: source Identifiers.
2720
+ :type source_identifiers: List[str]
2721
+ :param source_kind: Filter by source kind.
2719
2722
  :type source_kind: SourceKind
2720
- :param folio_ids: Filter by folio IDs.
2721
- :type folio_ids: List[int]
2722
- :param document_ids: document IDs.
2723
- :type document_ids: List[int]
2723
+ :param receipt_ids: document IDs.
2724
+ :type receipt_ids: List[int]
2724
2725
  :param _request_timeout: timeout setting for this request. If one
2725
2726
  number provided, it will be total request
2726
2727
  timeout. It can also be a pair (tuple) of
@@ -2743,12 +2744,12 @@ class FiscalDocumentsApi:
2743
2744
  :return: Returns the result object.
2744
2745
  """ # noqa: E501
2745
2746
 
2746
- _param = self._get_allocations_summary_serialize(
2747
+ _param = self._get_allocations_serialize(
2747
2748
  x_property_id=x_property_id,
2748
- source_id=source_id,
2749
+ source_ids=source_ids,
2750
+ source_identifiers=source_identifiers,
2749
2751
  source_kind=source_kind,
2750
- folio_ids=folio_ids,
2751
- document_ids=document_ids,
2752
+ receipt_ids=receipt_ids,
2752
2753
  _request_auth=_request_auth,
2753
2754
  _content_type=_content_type,
2754
2755
  _headers=_headers,
@@ -2756,7 +2757,7 @@ class FiscalDocumentsApi:
2756
2757
  )
2757
2758
 
2758
2759
  _response_types_map: Dict[str, Optional[str]] = {
2759
- '200': "AllocationsSummary",
2760
+ '200': "List[AllocationsData]",
2760
2761
  }
2761
2762
  response_data = self.api_client.call_api(
2762
2763
  *_param,
@@ -2770,13 +2771,13 @@ class FiscalDocumentsApi:
2770
2771
 
2771
2772
 
2772
2773
  @validate_call
2773
- def get_allocations_summary_with_http_info(
2774
+ def get_allocations_with_http_info(
2774
2775
  self,
2775
2776
  x_property_id: Annotated[int, Field(strict=True, ge=1, description="Property id")],
2776
- source_id: Annotated[int, Field(strict=True, ge=1, description="source ID.")],
2777
- source_kind: Annotated[SourceKind, Field(description="Filter by source kind.")],
2778
- folio_ids: Annotated[Optional[Annotated[List[StrictInt], Field(min_length=1)]], Field(description="Filter by folio IDs.")] = None,
2779
- document_ids: Annotated[Optional[Annotated[List[StrictInt], Field(min_length=1)]], Field(description="document IDs.")] = None,
2777
+ source_ids: Annotated[Optional[List[StrictInt]], Field(description="source IDs.")] = None,
2778
+ source_identifiers: Annotated[Optional[List[StrictStr]], Field(description="source Identifiers.")] = None,
2779
+ source_kind: Annotated[Optional[SourceKind], Field(description="Filter by source kind.")] = None,
2780
+ receipt_ids: Annotated[Optional[List[StrictInt]], Field(description="document IDs.")] = None,
2780
2781
  _request_timeout: Union[
2781
2782
  None,
2782
2783
  Annotated[StrictFloat, Field(gt=0)],
@@ -2789,21 +2790,21 @@ class FiscalDocumentsApi:
2789
2790
  _content_type: Optional[StrictStr] = None,
2790
2791
  _headers: Optional[Dict[StrictStr, Any]] = None,
2791
2792
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2792
- ) -> ApiResponse[AllocationsSummary]:
2793
- """Get allocations summary
2793
+ ) -> ApiResponse[List[AllocationsData]]:
2794
+ """Get payment allocation transactions
2794
2795
 
2795
- Retrieves allocations summary.
2796
+ Retrieves payment allocations.
2796
2797
 
2797
2798
  :param x_property_id: Property id (required)
2798
2799
  :type x_property_id: int
2799
- :param source_id: source ID. (required)
2800
- :type source_id: int
2801
- :param source_kind: Filter by source kind. (required)
2800
+ :param source_ids: source IDs.
2801
+ :type source_ids: List[int]
2802
+ :param source_identifiers: source Identifiers.
2803
+ :type source_identifiers: List[str]
2804
+ :param source_kind: Filter by source kind.
2802
2805
  :type source_kind: SourceKind
2803
- :param folio_ids: Filter by folio IDs.
2804
- :type folio_ids: List[int]
2805
- :param document_ids: document IDs.
2806
- :type document_ids: List[int]
2806
+ :param receipt_ids: document IDs.
2807
+ :type receipt_ids: List[int]
2807
2808
  :param _request_timeout: timeout setting for this request. If one
2808
2809
  number provided, it will be total request
2809
2810
  timeout. It can also be a pair (tuple) of
@@ -2826,12 +2827,12 @@ class FiscalDocumentsApi:
2826
2827
  :return: Returns the result object.
2827
2828
  """ # noqa: E501
2828
2829
 
2829
- _param = self._get_allocations_summary_serialize(
2830
+ _param = self._get_allocations_serialize(
2830
2831
  x_property_id=x_property_id,
2831
- source_id=source_id,
2832
+ source_ids=source_ids,
2833
+ source_identifiers=source_identifiers,
2832
2834
  source_kind=source_kind,
2833
- folio_ids=folio_ids,
2834
- document_ids=document_ids,
2835
+ receipt_ids=receipt_ids,
2835
2836
  _request_auth=_request_auth,
2836
2837
  _content_type=_content_type,
2837
2838
  _headers=_headers,
@@ -2839,7 +2840,7 @@ class FiscalDocumentsApi:
2839
2840
  )
2840
2841
 
2841
2842
  _response_types_map: Dict[str, Optional[str]] = {
2842
- '200': "AllocationsSummary",
2843
+ '200': "List[AllocationsData]",
2843
2844
  }
2844
2845
  response_data = self.api_client.call_api(
2845
2846
  *_param,
@@ -2853,13 +2854,13 @@ class FiscalDocumentsApi:
2853
2854
 
2854
2855
 
2855
2856
  @validate_call
2856
- def get_allocations_summary_without_preload_content(
2857
+ def get_allocations_without_preload_content(
2857
2858
  self,
2858
2859
  x_property_id: Annotated[int, Field(strict=True, ge=1, description="Property id")],
2859
- source_id: Annotated[int, Field(strict=True, ge=1, description="source ID.")],
2860
- source_kind: Annotated[SourceKind, Field(description="Filter by source kind.")],
2861
- folio_ids: Annotated[Optional[Annotated[List[StrictInt], Field(min_length=1)]], Field(description="Filter by folio IDs.")] = None,
2862
- document_ids: Annotated[Optional[Annotated[List[StrictInt], Field(min_length=1)]], Field(description="document IDs.")] = None,
2860
+ source_ids: Annotated[Optional[List[StrictInt]], Field(description="source IDs.")] = None,
2861
+ source_identifiers: Annotated[Optional[List[StrictStr]], Field(description="source Identifiers.")] = None,
2862
+ source_kind: Annotated[Optional[SourceKind], Field(description="Filter by source kind.")] = None,
2863
+ receipt_ids: Annotated[Optional[List[StrictInt]], Field(description="document IDs.")] = None,
2863
2864
  _request_timeout: Union[
2864
2865
  None,
2865
2866
  Annotated[StrictFloat, Field(gt=0)],
@@ -2873,20 +2874,20 @@ class FiscalDocumentsApi:
2873
2874
  _headers: Optional[Dict[StrictStr, Any]] = None,
2874
2875
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2875
2876
  ) -> RESTResponseType:
2876
- """Get allocations summary
2877
+ """Get payment allocation transactions
2877
2878
 
2878
- Retrieves allocations summary.
2879
+ Retrieves payment allocations.
2879
2880
 
2880
2881
  :param x_property_id: Property id (required)
2881
2882
  :type x_property_id: int
2882
- :param source_id: source ID. (required)
2883
- :type source_id: int
2884
- :param source_kind: Filter by source kind. (required)
2883
+ :param source_ids: source IDs.
2884
+ :type source_ids: List[int]
2885
+ :param source_identifiers: source Identifiers.
2886
+ :type source_identifiers: List[str]
2887
+ :param source_kind: Filter by source kind.
2885
2888
  :type source_kind: SourceKind
2886
- :param folio_ids: Filter by folio IDs.
2887
- :type folio_ids: List[int]
2888
- :param document_ids: document IDs.
2889
- :type document_ids: List[int]
2889
+ :param receipt_ids: document IDs.
2890
+ :type receipt_ids: List[int]
2890
2891
  :param _request_timeout: timeout setting for this request. If one
2891
2892
  number provided, it will be total request
2892
2893
  timeout. It can also be a pair (tuple) of
@@ -2909,12 +2910,12 @@ class FiscalDocumentsApi:
2909
2910
  :return: Returns the result object.
2910
2911
  """ # noqa: E501
2911
2912
 
2912
- _param = self._get_allocations_summary_serialize(
2913
+ _param = self._get_allocations_serialize(
2913
2914
  x_property_id=x_property_id,
2914
- source_id=source_id,
2915
+ source_ids=source_ids,
2916
+ source_identifiers=source_identifiers,
2915
2917
  source_kind=source_kind,
2916
- folio_ids=folio_ids,
2917
- document_ids=document_ids,
2918
+ receipt_ids=receipt_ids,
2918
2919
  _request_auth=_request_auth,
2919
2920
  _content_type=_content_type,
2920
2921
  _headers=_headers,
@@ -2922,7 +2923,7 @@ class FiscalDocumentsApi:
2922
2923
  )
2923
2924
 
2924
2925
  _response_types_map: Dict[str, Optional[str]] = {
2925
- '200': "AllocationsSummary",
2926
+ '200': "List[AllocationsData]",
2926
2927
  }
2927
2928
  response_data = self.api_client.call_api(
2928
2929
  *_param,
@@ -2931,13 +2932,13 @@ class FiscalDocumentsApi:
2931
2932
  return response_data.response
2932
2933
 
2933
2934
 
2934
- def _get_allocations_summary_serialize(
2935
+ def _get_allocations_serialize(
2935
2936
  self,
2936
2937
  x_property_id,
2937
- source_id,
2938
+ source_ids,
2939
+ source_identifiers,
2938
2940
  source_kind,
2939
- folio_ids,
2940
- document_ids,
2941
+ receipt_ids,
2941
2942
  _request_auth,
2942
2943
  _content_type,
2943
2944
  _headers,
@@ -2947,8 +2948,9 @@ class FiscalDocumentsApi:
2947
2948
  _host = None
2948
2949
 
2949
2950
  _collection_formats: Dict[str, str] = {
2950
- 'folioIds': 'multi',
2951
- 'documentIds': 'multi',
2951
+ 'sourceIds': 'multi',
2952
+ 'sourceIdentifiers': 'multi',
2953
+ 'receiptIds': 'multi',
2952
2954
  }
2953
2955
 
2954
2956
  _path_params: Dict[str, str] = {}
@@ -2962,21 +2964,21 @@ class FiscalDocumentsApi:
2962
2964
 
2963
2965
  # process the path parameters
2964
2966
  # process the query parameters
2965
- if source_id is not None:
2967
+ if source_ids is not None:
2966
2968
 
2967
- _query_params.append(('sourceId', source_id))
2969
+ _query_params.append(('sourceIds', source_ids))
2968
2970
 
2969
- if source_kind is not None:
2971
+ if source_identifiers is not None:
2970
2972
 
2971
- _query_params.append(('sourceKind', source_kind.value))
2973
+ _query_params.append(('sourceIdentifiers', source_identifiers))
2972
2974
 
2973
- if folio_ids is not None:
2975
+ if source_kind is not None:
2974
2976
 
2975
- _query_params.append(('folioIds', folio_ids))
2977
+ _query_params.append(('sourceKind', source_kind.value))
2976
2978
 
2977
- if document_ids is not None:
2979
+ if receipt_ids is not None:
2978
2980
 
2979
- _query_params.append(('documentIds', document_ids))
2981
+ _query_params.append(('receiptIds', receipt_ids))
2980
2982
 
2981
2983
  # process the header parameters
2982
2984
  if x_property_id is not None:
@@ -3001,7 +3003,7 @@ class FiscalDocumentsApi:
3001
3003
 
3002
3004
  return self.api_client.param_serialize(
3003
3005
  method='GET',
3004
- resource_path='/fiscal-document/v1/fiscal-documents/allocations/summary',
3006
+ resource_path='/fiscal-document/v1/fiscal-documents/allocations',
3005
3007
  path_params=_path_params,
3006
3008
  query_params=_query_params,
3007
3009
  header_params=_header_params,
@@ -3018,10 +3020,13 @@ class FiscalDocumentsApi:
3018
3020
 
3019
3021
 
3020
3022
  @validate_call
3021
- def get_credit_note_preview(
3023
+ def get_allocations_summary(
3022
3024
  self,
3023
3025
  x_property_id: Annotated[int, Field(strict=True, ge=1, description="Property id")],
3024
- get_credit_note_preview_request: GetCreditNotePreviewRequest,
3026
+ source_id: Annotated[int, Field(strict=True, ge=1, description="source ID.")],
3027
+ source_kind: Annotated[SourceKind, Field(description="Filter by source kind.")],
3028
+ folio_ids: Annotated[Optional[Annotated[List[StrictInt], Field(min_length=1)]], Field(description="Filter by folio IDs.")] = None,
3029
+ document_ids: Annotated[Optional[Annotated[List[StrictInt], Field(min_length=1)]], Field(description="document IDs.")] = None,
3025
3030
  _request_timeout: Union[
3026
3031
  None,
3027
3032
  Annotated[StrictFloat, Field(gt=0)],
@@ -3034,15 +3039,21 @@ class FiscalDocumentsApi:
3034
3039
  _content_type: Optional[StrictStr] = None,
3035
3040
  _headers: Optional[Dict[StrictStr, Any]] = None,
3036
3041
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
3037
- ) -> bytearray:
3038
- """Get fiscal document preview of the type credit note
3042
+ ) -> AllocationsSummary:
3043
+ """Get allocations summary
3039
3044
 
3040
- Get fiscal document preview of the type credit note.
3045
+ Retrieves allocations summary.
3041
3046
 
3042
3047
  :param x_property_id: Property id (required)
3043
3048
  :type x_property_id: int
3044
- :param get_credit_note_preview_request: (required)
3045
- :type get_credit_note_preview_request: GetCreditNotePreviewRequest
3049
+ :param source_id: source ID. (required)
3050
+ :type source_id: int
3051
+ :param source_kind: Filter by source kind. (required)
3052
+ :type source_kind: SourceKind
3053
+ :param folio_ids: Filter by folio IDs.
3054
+ :type folio_ids: List[int]
3055
+ :param document_ids: document IDs.
3056
+ :type document_ids: List[int]
3046
3057
  :param _request_timeout: timeout setting for this request. If one
3047
3058
  number provided, it will be total request
3048
3059
  timeout. It can also be a pair (tuple) of
@@ -3065,9 +3076,12 @@ class FiscalDocumentsApi:
3065
3076
  :return: Returns the result object.
3066
3077
  """ # noqa: E501
3067
3078
 
3068
- _param = self._get_credit_note_preview_serialize(
3079
+ _param = self._get_allocations_summary_serialize(
3069
3080
  x_property_id=x_property_id,
3070
- get_credit_note_preview_request=get_credit_note_preview_request,
3081
+ source_id=source_id,
3082
+ source_kind=source_kind,
3083
+ folio_ids=folio_ids,
3084
+ document_ids=document_ids,
3071
3085
  _request_auth=_request_auth,
3072
3086
  _content_type=_content_type,
3073
3087
  _headers=_headers,
@@ -3075,7 +3089,7 @@ class FiscalDocumentsApi:
3075
3089
  )
3076
3090
 
3077
3091
  _response_types_map: Dict[str, Optional[str]] = {
3078
- '200': "bytearray",
3092
+ '200': "AllocationsSummary",
3079
3093
  }
3080
3094
  response_data = self.api_client.call_api(
3081
3095
  *_param,
@@ -3089,10 +3103,13 @@ class FiscalDocumentsApi:
3089
3103
 
3090
3104
 
3091
3105
  @validate_call
3092
- def get_credit_note_preview_with_http_info(
3106
+ def get_allocations_summary_with_http_info(
3093
3107
  self,
3094
3108
  x_property_id: Annotated[int, Field(strict=True, ge=1, description="Property id")],
3095
- get_credit_note_preview_request: GetCreditNotePreviewRequest,
3109
+ source_id: Annotated[int, Field(strict=True, ge=1, description="source ID.")],
3110
+ source_kind: Annotated[SourceKind, Field(description="Filter by source kind.")],
3111
+ folio_ids: Annotated[Optional[Annotated[List[StrictInt], Field(min_length=1)]], Field(description="Filter by folio IDs.")] = None,
3112
+ document_ids: Annotated[Optional[Annotated[List[StrictInt], Field(min_length=1)]], Field(description="document IDs.")] = None,
3096
3113
  _request_timeout: Union[
3097
3114
  None,
3098
3115
  Annotated[StrictFloat, Field(gt=0)],
@@ -3105,15 +3122,21 @@ class FiscalDocumentsApi:
3105
3122
  _content_type: Optional[StrictStr] = None,
3106
3123
  _headers: Optional[Dict[StrictStr, Any]] = None,
3107
3124
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
3108
- ) -> ApiResponse[bytearray]:
3109
- """Get fiscal document preview of the type credit note
3125
+ ) -> ApiResponse[AllocationsSummary]:
3126
+ """Get allocations summary
3110
3127
 
3111
- Get fiscal document preview of the type credit note.
3128
+ Retrieves allocations summary.
3112
3129
 
3113
3130
  :param x_property_id: Property id (required)
3114
3131
  :type x_property_id: int
3115
- :param get_credit_note_preview_request: (required)
3116
- :type get_credit_note_preview_request: GetCreditNotePreviewRequest
3132
+ :param source_id: source ID. (required)
3133
+ :type source_id: int
3134
+ :param source_kind: Filter by source kind. (required)
3135
+ :type source_kind: SourceKind
3136
+ :param folio_ids: Filter by folio IDs.
3137
+ :type folio_ids: List[int]
3138
+ :param document_ids: document IDs.
3139
+ :type document_ids: List[int]
3117
3140
  :param _request_timeout: timeout setting for this request. If one
3118
3141
  number provided, it will be total request
3119
3142
  timeout. It can also be a pair (tuple) of
@@ -3136,9 +3159,12 @@ class FiscalDocumentsApi:
3136
3159
  :return: Returns the result object.
3137
3160
  """ # noqa: E501
3138
3161
 
3139
- _param = self._get_credit_note_preview_serialize(
3162
+ _param = self._get_allocations_summary_serialize(
3140
3163
  x_property_id=x_property_id,
3141
- get_credit_note_preview_request=get_credit_note_preview_request,
3164
+ source_id=source_id,
3165
+ source_kind=source_kind,
3166
+ folio_ids=folio_ids,
3167
+ document_ids=document_ids,
3142
3168
  _request_auth=_request_auth,
3143
3169
  _content_type=_content_type,
3144
3170
  _headers=_headers,
@@ -3146,7 +3172,7 @@ class FiscalDocumentsApi:
3146
3172
  )
3147
3173
 
3148
3174
  _response_types_map: Dict[str, Optional[str]] = {
3149
- '200': "bytearray",
3175
+ '200': "AllocationsSummary",
3150
3176
  }
3151
3177
  response_data = self.api_client.call_api(
3152
3178
  *_param,
@@ -3160,10 +3186,13 @@ class FiscalDocumentsApi:
3160
3186
 
3161
3187
 
3162
3188
  @validate_call
3163
- def get_credit_note_preview_without_preload_content(
3189
+ def get_allocations_summary_without_preload_content(
3164
3190
  self,
3165
3191
  x_property_id: Annotated[int, Field(strict=True, ge=1, description="Property id")],
3166
- get_credit_note_preview_request: GetCreditNotePreviewRequest,
3192
+ source_id: Annotated[int, Field(strict=True, ge=1, description="source ID.")],
3193
+ source_kind: Annotated[SourceKind, Field(description="Filter by source kind.")],
3194
+ folio_ids: Annotated[Optional[Annotated[List[StrictInt], Field(min_length=1)]], Field(description="Filter by folio IDs.")] = None,
3195
+ document_ids: Annotated[Optional[Annotated[List[StrictInt], Field(min_length=1)]], Field(description="document IDs.")] = None,
3167
3196
  _request_timeout: Union[
3168
3197
  None,
3169
3198
  Annotated[StrictFloat, Field(gt=0)],
@@ -3177,14 +3206,20 @@ class FiscalDocumentsApi:
3177
3206
  _headers: Optional[Dict[StrictStr, Any]] = None,
3178
3207
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
3179
3208
  ) -> RESTResponseType:
3180
- """Get fiscal document preview of the type credit note
3209
+ """Get allocations summary
3181
3210
 
3182
- Get fiscal document preview of the type credit note.
3211
+ Retrieves allocations summary.
3183
3212
 
3184
3213
  :param x_property_id: Property id (required)
3185
3214
  :type x_property_id: int
3186
- :param get_credit_note_preview_request: (required)
3187
- :type get_credit_note_preview_request: GetCreditNotePreviewRequest
3215
+ :param source_id: source ID. (required)
3216
+ :type source_id: int
3217
+ :param source_kind: Filter by source kind. (required)
3218
+ :type source_kind: SourceKind
3219
+ :param folio_ids: Filter by folio IDs.
3220
+ :type folio_ids: List[int]
3221
+ :param document_ids: document IDs.
3222
+ :type document_ids: List[int]
3188
3223
  :param _request_timeout: timeout setting for this request. If one
3189
3224
  number provided, it will be total request
3190
3225
  timeout. It can also be a pair (tuple) of
@@ -3207,9 +3242,12 @@ class FiscalDocumentsApi:
3207
3242
  :return: Returns the result object.
3208
3243
  """ # noqa: E501
3209
3244
 
3210
- _param = self._get_credit_note_preview_serialize(
3245
+ _param = self._get_allocations_summary_serialize(
3211
3246
  x_property_id=x_property_id,
3212
- get_credit_note_preview_request=get_credit_note_preview_request,
3247
+ source_id=source_id,
3248
+ source_kind=source_kind,
3249
+ folio_ids=folio_ids,
3250
+ document_ids=document_ids,
3213
3251
  _request_auth=_request_auth,
3214
3252
  _content_type=_content_type,
3215
3253
  _headers=_headers,
@@ -3217,7 +3255,7 @@ class FiscalDocumentsApi:
3217
3255
  )
3218
3256
 
3219
3257
  _response_types_map: Dict[str, Optional[str]] = {
3220
- '200': "bytearray",
3258
+ '200': "AllocationsSummary",
3221
3259
  }
3222
3260
  response_data = self.api_client.call_api(
3223
3261
  *_param,
@@ -3226,10 +3264,13 @@ class FiscalDocumentsApi:
3226
3264
  return response_data.response
3227
3265
 
3228
3266
 
3229
- def _get_credit_note_preview_serialize(
3267
+ def _get_allocations_summary_serialize(
3230
3268
  self,
3231
3269
  x_property_id,
3232
- get_credit_note_preview_request,
3270
+ source_id,
3271
+ source_kind,
3272
+ folio_ids,
3273
+ document_ids,
3233
3274
  _request_auth,
3234
3275
  _content_type,
3235
3276
  _headers,
@@ -3239,6 +3280,8 @@ class FiscalDocumentsApi:
3239
3280
  _host = None
3240
3281
 
3241
3282
  _collection_formats: Dict[str, str] = {
3283
+ 'folioIds': 'multi',
3284
+ 'documentIds': 'multi',
3242
3285
  }
3243
3286
 
3244
3287
  _path_params: Dict[str, str] = {}
@@ -3252,36 +3295,37 @@ class FiscalDocumentsApi:
3252
3295
 
3253
3296
  # process the path parameters
3254
3297
  # process the query parameters
3298
+ if source_id is not None:
3299
+
3300
+ _query_params.append(('sourceId', source_id))
3301
+
3302
+ if source_kind is not None:
3303
+
3304
+ _query_params.append(('sourceKind', source_kind.value))
3305
+
3306
+ if folio_ids is not None:
3307
+
3308
+ _query_params.append(('folioIds', folio_ids))
3309
+
3310
+ if document_ids is not None:
3311
+
3312
+ _query_params.append(('documentIds', document_ids))
3313
+
3255
3314
  # process the header parameters
3256
3315
  if x_property_id is not None:
3257
3316
  _header_params['X-Property-ID'] = x_property_id
3258
3317
  # process the form parameters
3259
3318
  # process the body parameter
3260
- if get_credit_note_preview_request is not None:
3261
- _body_params = get_credit_note_preview_request
3262
3319
 
3263
3320
 
3264
3321
  # set the HTTP header `Accept`
3265
3322
  if 'Accept' not in _header_params:
3266
3323
  _header_params['Accept'] = self.api_client.select_header_accept(
3267
3324
  [
3268
- 'application/octet-stream'
3325
+ 'application/json'
3269
3326
  ]
3270
3327
  )
3271
3328
 
3272
- # set the HTTP header `Content-Type`
3273
- if _content_type:
3274
- _header_params['Content-Type'] = _content_type
3275
- else:
3276
- _default_content_type = (
3277
- self.api_client.select_header_content_type(
3278
- [
3279
- 'application/json'
3280
- ]
3281
- )
3282
- )
3283
- if _default_content_type is not None:
3284
- _header_params['Content-Type'] = _default_content_type
3285
3329
 
3286
3330
  # authentication setting
3287
3331
  _auth_settings: List[str] = [
@@ -3289,8 +3333,8 @@ class FiscalDocumentsApi:
3289
3333
  ]
3290
3334
 
3291
3335
  return self.api_client.param_serialize(
3292
- method='POST',
3293
- resource_path='/fiscal-document/v1/fiscal-documents/credit-note/preview',
3336
+ method='GET',
3337
+ resource_path='/fiscal-document/v1/fiscal-documents/allocations/summary',
3294
3338
  path_params=_path_params,
3295
3339
  query_params=_query_params,
3296
3340
  header_params=_header_params,
@@ -3307,10 +3351,10 @@ class FiscalDocumentsApi:
3307
3351
 
3308
3352
 
3309
3353
  @validate_call
3310
- def get_document_preview(
3354
+ def get_credit_note_preview(
3311
3355
  self,
3312
3356
  x_property_id: Annotated[int, Field(strict=True, ge=1, description="Property id")],
3313
- get_invoice_preview_request: GetInvoicePreviewRequest,
3357
+ get_credit_note_preview_request: GetCreditNotePreviewRequest,
3314
3358
  _request_timeout: Union[
3315
3359
  None,
3316
3360
  Annotated[StrictFloat, Field(gt=0)],
@@ -3324,14 +3368,14 @@ class FiscalDocumentsApi:
3324
3368
  _headers: Optional[Dict[StrictStr, Any]] = None,
3325
3369
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
3326
3370
  ) -> bytearray:
3327
- """Get fiscal document preview of the type invoice
3371
+ """Get fiscal document preview of the type credit note
3328
3372
 
3329
- Get fiscal document preview of the type invoice.
3373
+ Get fiscal document preview of the type credit note.
3330
3374
 
3331
3375
  :param x_property_id: Property id (required)
3332
3376
  :type x_property_id: int
3333
- :param get_invoice_preview_request: (required)
3334
- :type get_invoice_preview_request: GetInvoicePreviewRequest
3377
+ :param get_credit_note_preview_request: (required)
3378
+ :type get_credit_note_preview_request: GetCreditNotePreviewRequest
3335
3379
  :param _request_timeout: timeout setting for this request. If one
3336
3380
  number provided, it will be total request
3337
3381
  timeout. It can also be a pair (tuple) of
@@ -3354,9 +3398,9 @@ class FiscalDocumentsApi:
3354
3398
  :return: Returns the result object.
3355
3399
  """ # noqa: E501
3356
3400
 
3357
- _param = self._get_document_preview_serialize(
3401
+ _param = self._get_credit_note_preview_serialize(
3358
3402
  x_property_id=x_property_id,
3359
- get_invoice_preview_request=get_invoice_preview_request,
3403
+ get_credit_note_preview_request=get_credit_note_preview_request,
3360
3404
  _request_auth=_request_auth,
3361
3405
  _content_type=_content_type,
3362
3406
  _headers=_headers,
@@ -3378,10 +3422,10 @@ class FiscalDocumentsApi:
3378
3422
 
3379
3423
 
3380
3424
  @validate_call
3381
- def get_document_preview_with_http_info(
3425
+ def get_credit_note_preview_with_http_info(
3382
3426
  self,
3383
3427
  x_property_id: Annotated[int, Field(strict=True, ge=1, description="Property id")],
3384
- get_invoice_preview_request: GetInvoicePreviewRequest,
3428
+ get_credit_note_preview_request: GetCreditNotePreviewRequest,
3385
3429
  _request_timeout: Union[
3386
3430
  None,
3387
3431
  Annotated[StrictFloat, Field(gt=0)],
@@ -3395,14 +3439,14 @@ class FiscalDocumentsApi:
3395
3439
  _headers: Optional[Dict[StrictStr, Any]] = None,
3396
3440
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
3397
3441
  ) -> ApiResponse[bytearray]:
3398
- """Get fiscal document preview of the type invoice
3442
+ """Get fiscal document preview of the type credit note
3399
3443
 
3400
- Get fiscal document preview of the type invoice.
3444
+ Get fiscal document preview of the type credit note.
3401
3445
 
3402
3446
  :param x_property_id: Property id (required)
3403
3447
  :type x_property_id: int
3404
- :param get_invoice_preview_request: (required)
3405
- :type get_invoice_preview_request: GetInvoicePreviewRequest
3448
+ :param get_credit_note_preview_request: (required)
3449
+ :type get_credit_note_preview_request: GetCreditNotePreviewRequest
3406
3450
  :param _request_timeout: timeout setting for this request. If one
3407
3451
  number provided, it will be total request
3408
3452
  timeout. It can also be a pair (tuple) of
@@ -3425,9 +3469,9 @@ class FiscalDocumentsApi:
3425
3469
  :return: Returns the result object.
3426
3470
  """ # noqa: E501
3427
3471
 
3428
- _param = self._get_document_preview_serialize(
3472
+ _param = self._get_credit_note_preview_serialize(
3429
3473
  x_property_id=x_property_id,
3430
- get_invoice_preview_request=get_invoice_preview_request,
3474
+ get_credit_note_preview_request=get_credit_note_preview_request,
3431
3475
  _request_auth=_request_auth,
3432
3476
  _content_type=_content_type,
3433
3477
  _headers=_headers,
@@ -3449,10 +3493,10 @@ class FiscalDocumentsApi:
3449
3493
 
3450
3494
 
3451
3495
  @validate_call
3452
- def get_document_preview_without_preload_content(
3496
+ def get_credit_note_preview_without_preload_content(
3453
3497
  self,
3454
3498
  x_property_id: Annotated[int, Field(strict=True, ge=1, description="Property id")],
3455
- get_invoice_preview_request: GetInvoicePreviewRequest,
3499
+ get_credit_note_preview_request: GetCreditNotePreviewRequest,
3456
3500
  _request_timeout: Union[
3457
3501
  None,
3458
3502
  Annotated[StrictFloat, Field(gt=0)],
@@ -3466,14 +3510,14 @@ class FiscalDocumentsApi:
3466
3510
  _headers: Optional[Dict[StrictStr, Any]] = None,
3467
3511
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
3468
3512
  ) -> RESTResponseType:
3469
- """Get fiscal document preview of the type invoice
3513
+ """Get fiscal document preview of the type credit note
3470
3514
 
3471
- Get fiscal document preview of the type invoice.
3515
+ Get fiscal document preview of the type credit note.
3472
3516
 
3473
3517
  :param x_property_id: Property id (required)
3474
3518
  :type x_property_id: int
3475
- :param get_invoice_preview_request: (required)
3476
- :type get_invoice_preview_request: GetInvoicePreviewRequest
3519
+ :param get_credit_note_preview_request: (required)
3520
+ :type get_credit_note_preview_request: GetCreditNotePreviewRequest
3477
3521
  :param _request_timeout: timeout setting for this request. If one
3478
3522
  number provided, it will be total request
3479
3523
  timeout. It can also be a pair (tuple) of
@@ -3496,9 +3540,9 @@ class FiscalDocumentsApi:
3496
3540
  :return: Returns the result object.
3497
3541
  """ # noqa: E501
3498
3542
 
3499
- _param = self._get_document_preview_serialize(
3543
+ _param = self._get_credit_note_preview_serialize(
3500
3544
  x_property_id=x_property_id,
3501
- get_invoice_preview_request=get_invoice_preview_request,
3545
+ get_credit_note_preview_request=get_credit_note_preview_request,
3502
3546
  _request_auth=_request_auth,
3503
3547
  _content_type=_content_type,
3504
3548
  _headers=_headers,
@@ -3515,10 +3559,10 @@ class FiscalDocumentsApi:
3515
3559
  return response_data.response
3516
3560
 
3517
3561
 
3518
- def _get_document_preview_serialize(
3562
+ def _get_credit_note_preview_serialize(
3519
3563
  self,
3520
3564
  x_property_id,
3521
- get_invoice_preview_request,
3565
+ get_credit_note_preview_request,
3522
3566
  _request_auth,
3523
3567
  _content_type,
3524
3568
  _headers,
@@ -3546,8 +3590,8 @@ class FiscalDocumentsApi:
3546
3590
  _header_params['X-Property-ID'] = x_property_id
3547
3591
  # process the form parameters
3548
3592
  # process the body parameter
3549
- if get_invoice_preview_request is not None:
3550
- _body_params = get_invoice_preview_request
3593
+ if get_credit_note_preview_request is not None:
3594
+ _body_params = get_credit_note_preview_request
3551
3595
 
3552
3596
 
3553
3597
  # set the HTTP header `Accept`
@@ -3569,8 +3613,682 @@ class FiscalDocumentsApi:
3569
3613
  ]
3570
3614
  )
3571
3615
  )
3572
- if _default_content_type is not None:
3573
- _header_params['Content-Type'] = _default_content_type
3616
+ if _default_content_type is not None:
3617
+ _header_params['Content-Type'] = _default_content_type
3618
+
3619
+ # authentication setting
3620
+ _auth_settings: List[str] = [
3621
+ 'bearerAuth'
3622
+ ]
3623
+
3624
+ return self.api_client.param_serialize(
3625
+ method='POST',
3626
+ resource_path='/fiscal-document/v1/fiscal-documents/credit-note/preview',
3627
+ path_params=_path_params,
3628
+ query_params=_query_params,
3629
+ header_params=_header_params,
3630
+ body=_body_params,
3631
+ post_params=_form_params,
3632
+ files=_files,
3633
+ auth_settings=_auth_settings,
3634
+ collection_formats=_collection_formats,
3635
+ _host=_host,
3636
+ _request_auth=_request_auth
3637
+ )
3638
+
3639
+
3640
+
3641
+
3642
+ @validate_call
3643
+ def get_document_preview(
3644
+ self,
3645
+ x_property_id: Annotated[int, Field(strict=True, ge=1, description="Property id")],
3646
+ get_invoice_preview_request: GetInvoicePreviewRequest,
3647
+ _request_timeout: Union[
3648
+ None,
3649
+ Annotated[StrictFloat, Field(gt=0)],
3650
+ Tuple[
3651
+ Annotated[StrictFloat, Field(gt=0)],
3652
+ Annotated[StrictFloat, Field(gt=0)]
3653
+ ]
3654
+ ] = None,
3655
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
3656
+ _content_type: Optional[StrictStr] = None,
3657
+ _headers: Optional[Dict[StrictStr, Any]] = None,
3658
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
3659
+ ) -> bytearray:
3660
+ """Get fiscal document preview of the type invoice
3661
+
3662
+ Get fiscal document preview of the type invoice.
3663
+
3664
+ :param x_property_id: Property id (required)
3665
+ :type x_property_id: int
3666
+ :param get_invoice_preview_request: (required)
3667
+ :type get_invoice_preview_request: GetInvoicePreviewRequest
3668
+ :param _request_timeout: timeout setting for this request. If one
3669
+ number provided, it will be total request
3670
+ timeout. It can also be a pair (tuple) of
3671
+ (connection, read) timeouts.
3672
+ :type _request_timeout: int, tuple(int, int), optional
3673
+ :param _request_auth: set to override the auth_settings for an a single
3674
+ request; this effectively ignores the
3675
+ authentication in the spec for a single request.
3676
+ :type _request_auth: dict, optional
3677
+ :param _content_type: force content-type for the request.
3678
+ :type _content_type: str, Optional
3679
+ :param _headers: set to override the headers for a single
3680
+ request; this effectively ignores the headers
3681
+ in the spec for a single request.
3682
+ :type _headers: dict, optional
3683
+ :param _host_index: set to override the host_index for a single
3684
+ request; this effectively ignores the host_index
3685
+ in the spec for a single request.
3686
+ :type _host_index: int, optional
3687
+ :return: Returns the result object.
3688
+ """ # noqa: E501
3689
+
3690
+ _param = self._get_document_preview_serialize(
3691
+ x_property_id=x_property_id,
3692
+ get_invoice_preview_request=get_invoice_preview_request,
3693
+ _request_auth=_request_auth,
3694
+ _content_type=_content_type,
3695
+ _headers=_headers,
3696
+ _host_index=_host_index
3697
+ )
3698
+
3699
+ _response_types_map: Dict[str, Optional[str]] = {
3700
+ '200': "bytearray",
3701
+ }
3702
+ response_data = self.api_client.call_api(
3703
+ *_param,
3704
+ _request_timeout=_request_timeout
3705
+ )
3706
+ response_data.read()
3707
+ return self.api_client.response_deserialize(
3708
+ response_data=response_data,
3709
+ response_types_map=_response_types_map,
3710
+ ).data
3711
+
3712
+
3713
+ @validate_call
3714
+ def get_document_preview_with_http_info(
3715
+ self,
3716
+ x_property_id: Annotated[int, Field(strict=True, ge=1, description="Property id")],
3717
+ get_invoice_preview_request: GetInvoicePreviewRequest,
3718
+ _request_timeout: Union[
3719
+ None,
3720
+ Annotated[StrictFloat, Field(gt=0)],
3721
+ Tuple[
3722
+ Annotated[StrictFloat, Field(gt=0)],
3723
+ Annotated[StrictFloat, Field(gt=0)]
3724
+ ]
3725
+ ] = None,
3726
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
3727
+ _content_type: Optional[StrictStr] = None,
3728
+ _headers: Optional[Dict[StrictStr, Any]] = None,
3729
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
3730
+ ) -> ApiResponse[bytearray]:
3731
+ """Get fiscal document preview of the type invoice
3732
+
3733
+ Get fiscal document preview of the type invoice.
3734
+
3735
+ :param x_property_id: Property id (required)
3736
+ :type x_property_id: int
3737
+ :param get_invoice_preview_request: (required)
3738
+ :type get_invoice_preview_request: GetInvoicePreviewRequest
3739
+ :param _request_timeout: timeout setting for this request. If one
3740
+ number provided, it will be total request
3741
+ timeout. It can also be a pair (tuple) of
3742
+ (connection, read) timeouts.
3743
+ :type _request_timeout: int, tuple(int, int), optional
3744
+ :param _request_auth: set to override the auth_settings for an a single
3745
+ request; this effectively ignores the
3746
+ authentication in the spec for a single request.
3747
+ :type _request_auth: dict, optional
3748
+ :param _content_type: force content-type for the request.
3749
+ :type _content_type: str, Optional
3750
+ :param _headers: set to override the headers for a single
3751
+ request; this effectively ignores the headers
3752
+ in the spec for a single request.
3753
+ :type _headers: dict, optional
3754
+ :param _host_index: set to override the host_index for a single
3755
+ request; this effectively ignores the host_index
3756
+ in the spec for a single request.
3757
+ :type _host_index: int, optional
3758
+ :return: Returns the result object.
3759
+ """ # noqa: E501
3760
+
3761
+ _param = self._get_document_preview_serialize(
3762
+ x_property_id=x_property_id,
3763
+ get_invoice_preview_request=get_invoice_preview_request,
3764
+ _request_auth=_request_auth,
3765
+ _content_type=_content_type,
3766
+ _headers=_headers,
3767
+ _host_index=_host_index
3768
+ )
3769
+
3770
+ _response_types_map: Dict[str, Optional[str]] = {
3771
+ '200': "bytearray",
3772
+ }
3773
+ response_data = self.api_client.call_api(
3774
+ *_param,
3775
+ _request_timeout=_request_timeout
3776
+ )
3777
+ response_data.read()
3778
+ return self.api_client.response_deserialize(
3779
+ response_data=response_data,
3780
+ response_types_map=_response_types_map,
3781
+ )
3782
+
3783
+
3784
+ @validate_call
3785
+ def get_document_preview_without_preload_content(
3786
+ self,
3787
+ x_property_id: Annotated[int, Field(strict=True, ge=1, description="Property id")],
3788
+ get_invoice_preview_request: GetInvoicePreviewRequest,
3789
+ _request_timeout: Union[
3790
+ None,
3791
+ Annotated[StrictFloat, Field(gt=0)],
3792
+ Tuple[
3793
+ Annotated[StrictFloat, Field(gt=0)],
3794
+ Annotated[StrictFloat, Field(gt=0)]
3795
+ ]
3796
+ ] = None,
3797
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
3798
+ _content_type: Optional[StrictStr] = None,
3799
+ _headers: Optional[Dict[StrictStr, Any]] = None,
3800
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
3801
+ ) -> RESTResponseType:
3802
+ """Get fiscal document preview of the type invoice
3803
+
3804
+ Get fiscal document preview of the type invoice.
3805
+
3806
+ :param x_property_id: Property id (required)
3807
+ :type x_property_id: int
3808
+ :param get_invoice_preview_request: (required)
3809
+ :type get_invoice_preview_request: GetInvoicePreviewRequest
3810
+ :param _request_timeout: timeout setting for this request. If one
3811
+ number provided, it will be total request
3812
+ timeout. It can also be a pair (tuple) of
3813
+ (connection, read) timeouts.
3814
+ :type _request_timeout: int, tuple(int, int), optional
3815
+ :param _request_auth: set to override the auth_settings for an a single
3816
+ request; this effectively ignores the
3817
+ authentication in the spec for a single request.
3818
+ :type _request_auth: dict, optional
3819
+ :param _content_type: force content-type for the request.
3820
+ :type _content_type: str, Optional
3821
+ :param _headers: set to override the headers for a single
3822
+ request; this effectively ignores the headers
3823
+ in the spec for a single request.
3824
+ :type _headers: dict, optional
3825
+ :param _host_index: set to override the host_index for a single
3826
+ request; this effectively ignores the host_index
3827
+ in the spec for a single request.
3828
+ :type _host_index: int, optional
3829
+ :return: Returns the result object.
3830
+ """ # noqa: E501
3831
+
3832
+ _param = self._get_document_preview_serialize(
3833
+ x_property_id=x_property_id,
3834
+ get_invoice_preview_request=get_invoice_preview_request,
3835
+ _request_auth=_request_auth,
3836
+ _content_type=_content_type,
3837
+ _headers=_headers,
3838
+ _host_index=_host_index
3839
+ )
3840
+
3841
+ _response_types_map: Dict[str, Optional[str]] = {
3842
+ '200': "bytearray",
3843
+ }
3844
+ response_data = self.api_client.call_api(
3845
+ *_param,
3846
+ _request_timeout=_request_timeout
3847
+ )
3848
+ return response_data.response
3849
+
3850
+
3851
+ def _get_document_preview_serialize(
3852
+ self,
3853
+ x_property_id,
3854
+ get_invoice_preview_request,
3855
+ _request_auth,
3856
+ _content_type,
3857
+ _headers,
3858
+ _host_index,
3859
+ ) -> RequestSerialized:
3860
+
3861
+ _host = None
3862
+
3863
+ _collection_formats: Dict[str, str] = {
3864
+ }
3865
+
3866
+ _path_params: Dict[str, str] = {}
3867
+ _query_params: List[Tuple[str, str]] = []
3868
+ _header_params: Dict[str, Optional[str]] = _headers or {}
3869
+ _form_params: List[Tuple[str, str]] = []
3870
+ _files: Dict[
3871
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
3872
+ ] = {}
3873
+ _body_params: Optional[bytes] = None
3874
+
3875
+ # process the path parameters
3876
+ # process the query parameters
3877
+ # process the header parameters
3878
+ if x_property_id is not None:
3879
+ _header_params['X-Property-ID'] = x_property_id
3880
+ # process the form parameters
3881
+ # process the body parameter
3882
+ if get_invoice_preview_request is not None:
3883
+ _body_params = get_invoice_preview_request
3884
+
3885
+
3886
+ # set the HTTP header `Accept`
3887
+ if 'Accept' not in _header_params:
3888
+ _header_params['Accept'] = self.api_client.select_header_accept(
3889
+ [
3890
+ 'application/octet-stream'
3891
+ ]
3892
+ )
3893
+
3894
+ # set the HTTP header `Content-Type`
3895
+ if _content_type:
3896
+ _header_params['Content-Type'] = _content_type
3897
+ else:
3898
+ _default_content_type = (
3899
+ self.api_client.select_header_content_type(
3900
+ [
3901
+ 'application/json'
3902
+ ]
3903
+ )
3904
+ )
3905
+ if _default_content_type is not None:
3906
+ _header_params['Content-Type'] = _default_content_type
3907
+
3908
+ # authentication setting
3909
+ _auth_settings: List[str] = [
3910
+ 'bearerAuth'
3911
+ ]
3912
+
3913
+ return self.api_client.param_serialize(
3914
+ method='POST',
3915
+ resource_path='/fiscal-document/v1/fiscal-documents/invoice/preview',
3916
+ path_params=_path_params,
3917
+ query_params=_query_params,
3918
+ header_params=_header_params,
3919
+ body=_body_params,
3920
+ post_params=_form_params,
3921
+ files=_files,
3922
+ auth_settings=_auth_settings,
3923
+ collection_formats=_collection_formats,
3924
+ _host=_host,
3925
+ _request_auth=_request_auth
3926
+ )
3927
+
3928
+
3929
+
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
+
3574
4292
 
3575
4293
  # authentication setting
3576
4294
  _auth_settings: List[str] = [
@@ -3578,8 +4296,8 @@ class FiscalDocumentsApi:
3578
4296
  ]
3579
4297
 
3580
4298
  return self.api_client.param_serialize(
3581
- method='POST',
3582
- resource_path='/fiscal-document/v1/fiscal-documents/invoice/preview',
4299
+ method='GET',
4300
+ resource_path='/fiscal-document/v1/fiscal-documents/allocations/pending-transactions',
3583
4301
  path_params=_path_params,
3584
4302
  query_params=_query_params,
3585
4303
  header_params=_header_params,
@@ -7225,3 +7943,285 @@ class FiscalDocumentsApi:
7225
7943
  )
7226
7944
 
7227
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
+