cloudbeds-fiscal-document 1.14.0__py3-none-any.whl → 1.16.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.
- cloudbeds_fiscal_document/__init__.py +4 -1
- cloudbeds_fiscal_document/api/fiscal_documents_api.py +283 -0
- cloudbeds_fiscal_document/api_client.py +1 -1
- cloudbeds_fiscal_document/configuration.py +1 -1
- cloudbeds_fiscal_document/models/__init__.py +3 -0
- cloudbeds_fiscal_document/models/create_invoice_request.py +9 -2
- cloudbeds_fiscal_document/models/create_simple_receipt_request.py +5 -3
- cloudbeds_fiscal_document/models/fiscal_document_transaction_response.py +3 -1
- cloudbeds_fiscal_document/models/get_invoice_preview_request.py +9 -2
- cloudbeds_fiscal_document/models/government_integration.py +12 -2
- cloudbeds_fiscal_document/models/integration_signature.py +107 -0
- cloudbeds_fiscal_document/models/invoice_allocations_response.py +95 -0
- cloudbeds_fiscal_document/models/invoice_transaction_allocation.py +89 -0
- cloudbeds_fiscal_document/models/pro_forma_invoice_preview_request.py +9 -2
- cloudbeds_fiscal_document/models/pro_forma_invoice_request.py +9 -2
- cloudbeds_fiscal_document/test/test_integration_signature.py +58 -0
- cloudbeds_fiscal_document/test/test_invoice_allocations_response.py +55 -0
- cloudbeds_fiscal_document/test/test_invoice_transaction_allocation.py +52 -0
- {cloudbeds_fiscal_document-1.14.0.dist-info → cloudbeds_fiscal_document-1.16.0.dist-info}/METADATA +6 -2
- {cloudbeds_fiscal_document-1.14.0.dist-info → cloudbeds_fiscal_document-1.16.0.dist-info}/RECORD +23 -17
- {cloudbeds_fiscal_document-1.14.0.dist-info → cloudbeds_fiscal_document-1.16.0.dist-info}/WHEEL +1 -1
- {cloudbeds_fiscal_document-1.14.0.dist-info → cloudbeds_fiscal_document-1.16.0.dist-info}/licenses/LICENSE +0 -0
- {cloudbeds_fiscal_document-1.14.0.dist-info → cloudbeds_fiscal_document-1.16.0.dist-info}/top_level.txt +0 -0
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
""" # noqa: E501
|
|
15
15
|
|
|
16
16
|
|
|
17
|
-
__version__ = "1.
|
|
17
|
+
__version__ = "1.16.0"
|
|
18
18
|
|
|
19
19
|
# import apis into sdk package
|
|
20
20
|
from cloudbeds_fiscal_document.api.configs_api import ConfigsApi
|
|
@@ -72,6 +72,9 @@ from cloudbeds_fiscal_document.models.government_integration import GovernmentIn
|
|
|
72
72
|
from cloudbeds_fiscal_document.models.government_integration_qr import GovernmentIntegrationQr
|
|
73
73
|
from cloudbeds_fiscal_document.models.guest_document_type import GuestDocumentType
|
|
74
74
|
from cloudbeds_fiscal_document.models.guest_gender import GuestGender
|
|
75
|
+
from cloudbeds_fiscal_document.models.integration_signature import IntegrationSignature
|
|
76
|
+
from cloudbeds_fiscal_document.models.invoice_allocations_response import InvoiceAllocationsResponse
|
|
77
|
+
from cloudbeds_fiscal_document.models.invoice_transaction_allocation import InvoiceTransactionAllocation
|
|
75
78
|
from cloudbeds_fiscal_document.models.latest_linked_document import LatestLinkedDocument
|
|
76
79
|
from cloudbeds_fiscal_document.models.linked_document import LinkedDocument
|
|
77
80
|
from cloudbeds_fiscal_document.models.manual_recipient_request import ManualRecipientRequest
|
|
@@ -39,6 +39,7 @@ from cloudbeds_fiscal_document.models.fiscal_document_transactions_summary impor
|
|
|
39
39
|
from cloudbeds_fiscal_document.models.get_credit_note_preview_request import GetCreditNotePreviewRequest
|
|
40
40
|
from cloudbeds_fiscal_document.models.get_invoice_preview_request import GetInvoicePreviewRequest
|
|
41
41
|
from cloudbeds_fiscal_document.models.get_rectify_invoice_note_preview_request import GetRectifyInvoiceNotePreviewRequest
|
|
42
|
+
from cloudbeds_fiscal_document.models.invoice_allocations_response import InvoiceAllocationsResponse
|
|
42
43
|
from cloudbeds_fiscal_document.models.pro_forma_invoice_preview_request import ProFormaInvoicePreviewRequest
|
|
43
44
|
from cloudbeds_fiscal_document.models.pro_forma_invoice_request import ProFormaInvoiceRequest
|
|
44
45
|
from cloudbeds_fiscal_document.models.pro_forma_status_update_request import ProFormaStatusUpdateRequest
|
|
@@ -5711,6 +5712,288 @@ class FiscalDocumentsApi:
|
|
|
5711
5712
|
|
|
5712
5713
|
|
|
5713
5714
|
|
|
5715
|
+
@validate_call
|
|
5716
|
+
def get_invoice_allocations(
|
|
5717
|
+
self,
|
|
5718
|
+
x_property_id: Annotated[int, Field(strict=True, ge=1, description="Property id")],
|
|
5719
|
+
id: Annotated[StrictStr, Field(description="Invoice ID")],
|
|
5720
|
+
_request_timeout: Union[
|
|
5721
|
+
None,
|
|
5722
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
5723
|
+
Tuple[
|
|
5724
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
5725
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
5726
|
+
]
|
|
5727
|
+
] = None,
|
|
5728
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
5729
|
+
_content_type: Optional[StrictStr] = None,
|
|
5730
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
5731
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
5732
|
+
) -> InvoiceAllocationsResponse:
|
|
5733
|
+
"""Get allocations for an invoice
|
|
5734
|
+
|
|
5735
|
+
Retrieves all active allocations for the specified invoice, grouped by transaction ID. Only includes allocations from receipts with active statuses.
|
|
5736
|
+
|
|
5737
|
+
:param x_property_id: Property id (required)
|
|
5738
|
+
:type x_property_id: int
|
|
5739
|
+
:param id: Invoice ID (required)
|
|
5740
|
+
:type id: str
|
|
5741
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
5742
|
+
number provided, it will be total request
|
|
5743
|
+
timeout. It can also be a pair (tuple) of
|
|
5744
|
+
(connection, read) timeouts.
|
|
5745
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
5746
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
5747
|
+
request; this effectively ignores the
|
|
5748
|
+
authentication in the spec for a single request.
|
|
5749
|
+
:type _request_auth: dict, optional
|
|
5750
|
+
:param _content_type: force content-type for the request.
|
|
5751
|
+
:type _content_type: str, Optional
|
|
5752
|
+
:param _headers: set to override the headers for a single
|
|
5753
|
+
request; this effectively ignores the headers
|
|
5754
|
+
in the spec for a single request.
|
|
5755
|
+
:type _headers: dict, optional
|
|
5756
|
+
:param _host_index: set to override the host_index for a single
|
|
5757
|
+
request; this effectively ignores the host_index
|
|
5758
|
+
in the spec for a single request.
|
|
5759
|
+
:type _host_index: int, optional
|
|
5760
|
+
:return: Returns the result object.
|
|
5761
|
+
""" # noqa: E501
|
|
5762
|
+
|
|
5763
|
+
_param = self._get_invoice_allocations_serialize(
|
|
5764
|
+
x_property_id=x_property_id,
|
|
5765
|
+
id=id,
|
|
5766
|
+
_request_auth=_request_auth,
|
|
5767
|
+
_content_type=_content_type,
|
|
5768
|
+
_headers=_headers,
|
|
5769
|
+
_host_index=_host_index
|
|
5770
|
+
)
|
|
5771
|
+
|
|
5772
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
5773
|
+
'200': "InvoiceAllocationsResponse",
|
|
5774
|
+
'400': "ApiError",
|
|
5775
|
+
'404': "ApiError",
|
|
5776
|
+
}
|
|
5777
|
+
response_data = self.api_client.call_api(
|
|
5778
|
+
*_param,
|
|
5779
|
+
_request_timeout=_request_timeout
|
|
5780
|
+
)
|
|
5781
|
+
response_data.read()
|
|
5782
|
+
return self.api_client.response_deserialize(
|
|
5783
|
+
response_data=response_data,
|
|
5784
|
+
response_types_map=_response_types_map,
|
|
5785
|
+
).data
|
|
5786
|
+
|
|
5787
|
+
|
|
5788
|
+
@validate_call
|
|
5789
|
+
def get_invoice_allocations_with_http_info(
|
|
5790
|
+
self,
|
|
5791
|
+
x_property_id: Annotated[int, Field(strict=True, ge=1, description="Property id")],
|
|
5792
|
+
id: Annotated[StrictStr, Field(description="Invoice ID")],
|
|
5793
|
+
_request_timeout: Union[
|
|
5794
|
+
None,
|
|
5795
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
5796
|
+
Tuple[
|
|
5797
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
5798
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
5799
|
+
]
|
|
5800
|
+
] = None,
|
|
5801
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
5802
|
+
_content_type: Optional[StrictStr] = None,
|
|
5803
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
5804
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
5805
|
+
) -> ApiResponse[InvoiceAllocationsResponse]:
|
|
5806
|
+
"""Get allocations for an invoice
|
|
5807
|
+
|
|
5808
|
+
Retrieves all active allocations for the specified invoice, grouped by transaction ID. Only includes allocations from receipts with active statuses.
|
|
5809
|
+
|
|
5810
|
+
:param x_property_id: Property id (required)
|
|
5811
|
+
:type x_property_id: int
|
|
5812
|
+
:param id: Invoice ID (required)
|
|
5813
|
+
:type id: str
|
|
5814
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
5815
|
+
number provided, it will be total request
|
|
5816
|
+
timeout. It can also be a pair (tuple) of
|
|
5817
|
+
(connection, read) timeouts.
|
|
5818
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
5819
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
5820
|
+
request; this effectively ignores the
|
|
5821
|
+
authentication in the spec for a single request.
|
|
5822
|
+
:type _request_auth: dict, optional
|
|
5823
|
+
:param _content_type: force content-type for the request.
|
|
5824
|
+
:type _content_type: str, Optional
|
|
5825
|
+
:param _headers: set to override the headers for a single
|
|
5826
|
+
request; this effectively ignores the headers
|
|
5827
|
+
in the spec for a single request.
|
|
5828
|
+
:type _headers: dict, optional
|
|
5829
|
+
:param _host_index: set to override the host_index for a single
|
|
5830
|
+
request; this effectively ignores the host_index
|
|
5831
|
+
in the spec for a single request.
|
|
5832
|
+
:type _host_index: int, optional
|
|
5833
|
+
:return: Returns the result object.
|
|
5834
|
+
""" # noqa: E501
|
|
5835
|
+
|
|
5836
|
+
_param = self._get_invoice_allocations_serialize(
|
|
5837
|
+
x_property_id=x_property_id,
|
|
5838
|
+
id=id,
|
|
5839
|
+
_request_auth=_request_auth,
|
|
5840
|
+
_content_type=_content_type,
|
|
5841
|
+
_headers=_headers,
|
|
5842
|
+
_host_index=_host_index
|
|
5843
|
+
)
|
|
5844
|
+
|
|
5845
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
5846
|
+
'200': "InvoiceAllocationsResponse",
|
|
5847
|
+
'400': "ApiError",
|
|
5848
|
+
'404': "ApiError",
|
|
5849
|
+
}
|
|
5850
|
+
response_data = self.api_client.call_api(
|
|
5851
|
+
*_param,
|
|
5852
|
+
_request_timeout=_request_timeout
|
|
5853
|
+
)
|
|
5854
|
+
response_data.read()
|
|
5855
|
+
return self.api_client.response_deserialize(
|
|
5856
|
+
response_data=response_data,
|
|
5857
|
+
response_types_map=_response_types_map,
|
|
5858
|
+
)
|
|
5859
|
+
|
|
5860
|
+
|
|
5861
|
+
@validate_call
|
|
5862
|
+
def get_invoice_allocations_without_preload_content(
|
|
5863
|
+
self,
|
|
5864
|
+
x_property_id: Annotated[int, Field(strict=True, ge=1, description="Property id")],
|
|
5865
|
+
id: Annotated[StrictStr, Field(description="Invoice ID")],
|
|
5866
|
+
_request_timeout: Union[
|
|
5867
|
+
None,
|
|
5868
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
5869
|
+
Tuple[
|
|
5870
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
5871
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
5872
|
+
]
|
|
5873
|
+
] = None,
|
|
5874
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
5875
|
+
_content_type: Optional[StrictStr] = None,
|
|
5876
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
5877
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
5878
|
+
) -> RESTResponseType:
|
|
5879
|
+
"""Get allocations for an invoice
|
|
5880
|
+
|
|
5881
|
+
Retrieves all active allocations for the specified invoice, grouped by transaction ID. Only includes allocations from receipts with active statuses.
|
|
5882
|
+
|
|
5883
|
+
:param x_property_id: Property id (required)
|
|
5884
|
+
:type x_property_id: int
|
|
5885
|
+
:param id: Invoice ID (required)
|
|
5886
|
+
:type id: str
|
|
5887
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
5888
|
+
number provided, it will be total request
|
|
5889
|
+
timeout. It can also be a pair (tuple) of
|
|
5890
|
+
(connection, read) timeouts.
|
|
5891
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
5892
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
5893
|
+
request; this effectively ignores the
|
|
5894
|
+
authentication in the spec for a single request.
|
|
5895
|
+
:type _request_auth: dict, optional
|
|
5896
|
+
:param _content_type: force content-type for the request.
|
|
5897
|
+
:type _content_type: str, Optional
|
|
5898
|
+
:param _headers: set to override the headers for a single
|
|
5899
|
+
request; this effectively ignores the headers
|
|
5900
|
+
in the spec for a single request.
|
|
5901
|
+
:type _headers: dict, optional
|
|
5902
|
+
:param _host_index: set to override the host_index for a single
|
|
5903
|
+
request; this effectively ignores the host_index
|
|
5904
|
+
in the spec for a single request.
|
|
5905
|
+
:type _host_index: int, optional
|
|
5906
|
+
:return: Returns the result object.
|
|
5907
|
+
""" # noqa: E501
|
|
5908
|
+
|
|
5909
|
+
_param = self._get_invoice_allocations_serialize(
|
|
5910
|
+
x_property_id=x_property_id,
|
|
5911
|
+
id=id,
|
|
5912
|
+
_request_auth=_request_auth,
|
|
5913
|
+
_content_type=_content_type,
|
|
5914
|
+
_headers=_headers,
|
|
5915
|
+
_host_index=_host_index
|
|
5916
|
+
)
|
|
5917
|
+
|
|
5918
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
5919
|
+
'200': "InvoiceAllocationsResponse",
|
|
5920
|
+
'400': "ApiError",
|
|
5921
|
+
'404': "ApiError",
|
|
5922
|
+
}
|
|
5923
|
+
response_data = self.api_client.call_api(
|
|
5924
|
+
*_param,
|
|
5925
|
+
_request_timeout=_request_timeout
|
|
5926
|
+
)
|
|
5927
|
+
return response_data.response
|
|
5928
|
+
|
|
5929
|
+
|
|
5930
|
+
def _get_invoice_allocations_serialize(
|
|
5931
|
+
self,
|
|
5932
|
+
x_property_id,
|
|
5933
|
+
id,
|
|
5934
|
+
_request_auth,
|
|
5935
|
+
_content_type,
|
|
5936
|
+
_headers,
|
|
5937
|
+
_host_index,
|
|
5938
|
+
) -> RequestSerialized:
|
|
5939
|
+
|
|
5940
|
+
_host = None
|
|
5941
|
+
|
|
5942
|
+
_collection_formats: Dict[str, str] = {
|
|
5943
|
+
}
|
|
5944
|
+
|
|
5945
|
+
_path_params: Dict[str, str] = {}
|
|
5946
|
+
_query_params: List[Tuple[str, str]] = []
|
|
5947
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
5948
|
+
_form_params: List[Tuple[str, str]] = []
|
|
5949
|
+
_files: Dict[
|
|
5950
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
5951
|
+
] = {}
|
|
5952
|
+
_body_params: Optional[bytes] = None
|
|
5953
|
+
|
|
5954
|
+
# process the path parameters
|
|
5955
|
+
if id is not None:
|
|
5956
|
+
_path_params['id'] = id
|
|
5957
|
+
# process the query parameters
|
|
5958
|
+
# process the header parameters
|
|
5959
|
+
if x_property_id is not None:
|
|
5960
|
+
_header_params['X-Property-ID'] = x_property_id
|
|
5961
|
+
# process the form parameters
|
|
5962
|
+
# process the body parameter
|
|
5963
|
+
|
|
5964
|
+
|
|
5965
|
+
# set the HTTP header `Accept`
|
|
5966
|
+
if 'Accept' not in _header_params:
|
|
5967
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
5968
|
+
[
|
|
5969
|
+
'application/json'
|
|
5970
|
+
]
|
|
5971
|
+
)
|
|
5972
|
+
|
|
5973
|
+
|
|
5974
|
+
# authentication setting
|
|
5975
|
+
_auth_settings: List[str] = [
|
|
5976
|
+
'bearerAuth'
|
|
5977
|
+
]
|
|
5978
|
+
|
|
5979
|
+
return self.api_client.param_serialize(
|
|
5980
|
+
method='GET',
|
|
5981
|
+
resource_path='/fiscal-document/v1/invoices/{id}/receipts/allocations',
|
|
5982
|
+
path_params=_path_params,
|
|
5983
|
+
query_params=_query_params,
|
|
5984
|
+
header_params=_header_params,
|
|
5985
|
+
body=_body_params,
|
|
5986
|
+
post_params=_form_params,
|
|
5987
|
+
files=_files,
|
|
5988
|
+
auth_settings=_auth_settings,
|
|
5989
|
+
collection_formats=_collection_formats,
|
|
5990
|
+
_host=_host,
|
|
5991
|
+
_request_auth=_request_auth
|
|
5992
|
+
)
|
|
5993
|
+
|
|
5994
|
+
|
|
5995
|
+
|
|
5996
|
+
|
|
5714
5997
|
@validate_call
|
|
5715
5998
|
def get_pro_forma_preview(
|
|
5716
5999
|
self,
|
|
@@ -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.
|
|
93
|
+
self.user_agent = 'OpenAPI-Generator/1.16.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.
|
|
507
|
+
"SDK Package Version: 1.16.0".\
|
|
508
508
|
format(env=sys.platform, pyversion=sys.version)
|
|
509
509
|
|
|
510
510
|
def get_host_settings(self) -> List[HostSetting]:
|
|
@@ -52,6 +52,9 @@ from cloudbeds_fiscal_document.models.government_integration import GovernmentIn
|
|
|
52
52
|
from cloudbeds_fiscal_document.models.government_integration_qr import GovernmentIntegrationQr
|
|
53
53
|
from cloudbeds_fiscal_document.models.guest_document_type import GuestDocumentType
|
|
54
54
|
from cloudbeds_fiscal_document.models.guest_gender import GuestGender
|
|
55
|
+
from cloudbeds_fiscal_document.models.integration_signature import IntegrationSignature
|
|
56
|
+
from cloudbeds_fiscal_document.models.invoice_allocations_response import InvoiceAllocationsResponse
|
|
57
|
+
from cloudbeds_fiscal_document.models.invoice_transaction_allocation import InvoiceTransactionAllocation
|
|
55
58
|
from cloudbeds_fiscal_document.models.latest_linked_document import LatestLinkedDocument
|
|
56
59
|
from cloudbeds_fiscal_document.models.linked_document import LinkedDocument
|
|
57
60
|
from cloudbeds_fiscal_document.models.manual_recipient_request import ManualRecipientRequest
|
|
@@ -18,7 +18,7 @@ import re # noqa: F401
|
|
|
18
18
|
import json
|
|
19
19
|
|
|
20
20
|
from datetime import date
|
|
21
|
-
from pydantic import BaseModel, ConfigDict, Field, StrictBool
|
|
21
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt
|
|
22
22
|
from typing import Any, ClassVar, Dict, List, Optional
|
|
23
23
|
from typing_extensions import Annotated
|
|
24
24
|
from cloudbeds_fiscal_document.models.manual_recipient_request import ManualRecipientRequest
|
|
@@ -32,6 +32,7 @@ class CreateInvoiceRequest(BaseModel):
|
|
|
32
32
|
CreateInvoiceRequest
|
|
33
33
|
""" # noqa: E501
|
|
34
34
|
transaction_ids: List[Annotated[int, Field(strict=True, ge=1)]] = Field(description="Include transactions with the specified IDs (deprecated, use `includeTransactionIds` instead)", alias="transactionIds")
|
|
35
|
+
transaction_id_to_amount: Optional[Dict[str, StrictInt]] = Field(default=None, description="Map of transaction ID to amount for partial transaction inclusion", alias="transactionIdToAmount")
|
|
35
36
|
source_id: Annotated[int, Field(strict=True, ge=1)] = Field(alias="sourceId")
|
|
36
37
|
sequence_id: Optional[Annotated[int, Field(strict=True, ge=1)]] = Field(default=None, alias="sequenceId")
|
|
37
38
|
source_kind: SourceKind = Field(alias="sourceKind")
|
|
@@ -43,7 +44,7 @@ class CreateInvoiceRequest(BaseModel):
|
|
|
43
44
|
include_transaction_ids: Optional[List[Annotated[int, Field(strict=True, ge=1)]]] = Field(default=None, description="Include transactions with the specified IDs", alias="includeTransactionIds")
|
|
44
45
|
simplified: Optional[StrictBool] = False
|
|
45
46
|
due_date_property_timezone: Optional[date] = Field(default=None, alias="dueDatePropertyTimezone")
|
|
46
|
-
__properties: ClassVar[List[str]] = ["transactionIds", "sourceId", "sequenceId", "sourceKind", "userId", "recipient", "manualRecipient", "folioIds", "excludeTransactionIds", "includeTransactionIds", "simplified", "dueDatePropertyTimezone"]
|
|
47
|
+
__properties: ClassVar[List[str]] = ["transactionIds", "transactionIdToAmount", "sourceId", "sequenceId", "sourceKind", "userId", "recipient", "manualRecipient", "folioIds", "excludeTransactionIds", "includeTransactionIds", "simplified", "dueDatePropertyTimezone"]
|
|
47
48
|
|
|
48
49
|
model_config = ConfigDict(
|
|
49
50
|
populate_by_name=True,
|
|
@@ -90,6 +91,11 @@ class CreateInvoiceRequest(BaseModel):
|
|
|
90
91
|
# override the default output from pydantic by calling `to_dict()` of manual_recipient
|
|
91
92
|
if self.manual_recipient:
|
|
92
93
|
_dict['manualRecipient'] = self.manual_recipient.to_dict()
|
|
94
|
+
# set to None if transaction_id_to_amount (nullable) is None
|
|
95
|
+
# and model_fields_set contains the field
|
|
96
|
+
if self.transaction_id_to_amount is None and "transaction_id_to_amount" in self.model_fields_set:
|
|
97
|
+
_dict['transactionIdToAmount'] = None
|
|
98
|
+
|
|
93
99
|
# set to None if sequence_id (nullable) is None
|
|
94
100
|
# and model_fields_set contains the field
|
|
95
101
|
if self.sequence_id is None and "sequence_id" in self.model_fields_set:
|
|
@@ -113,6 +119,7 @@ class CreateInvoiceRequest(BaseModel):
|
|
|
113
119
|
|
|
114
120
|
_obj = cls.model_validate({
|
|
115
121
|
"transactionIds": obj.get("transactionIds"),
|
|
122
|
+
"transactionIdToAmount": obj.get("transactionIdToAmount"),
|
|
116
123
|
"sourceId": obj.get("sourceId"),
|
|
117
124
|
"sequenceId": obj.get("sequenceId"),
|
|
118
125
|
"sourceKind": obj.get("sourceKind"),
|
|
@@ -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, StrictInt
|
|
20
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictBool, 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.manual_recipient_request import ManualRecipientRequest
|
|
@@ -37,7 +37,8 @@ class CreateSimpleReceiptRequest(BaseModel):
|
|
|
37
37
|
source_kind: SourceKind = Field(alias="sourceKind")
|
|
38
38
|
recipient: RecipientRequest
|
|
39
39
|
manual_recipient: Optional[ManualRecipientRequest] = Field(default=None, alias="manualRecipient")
|
|
40
|
-
|
|
40
|
+
handwritten: Optional[StrictBool] = Field(default=False, description="Indicates this is a handwritten receipt created during POS unavailability. Only allowed for properties with Fiskaltrust integration enabled.")
|
|
41
|
+
__properties: ClassVar[List[str]] = ["transactionIds", "sequenceId", "userId", "sourceId", "sourceKind", "recipient", "manualRecipient", "handwritten"]
|
|
41
42
|
|
|
42
43
|
model_config = ConfigDict(
|
|
43
44
|
populate_by_name=True,
|
|
@@ -107,7 +108,8 @@ class CreateSimpleReceiptRequest(BaseModel):
|
|
|
107
108
|
"sourceId": obj.get("sourceId"),
|
|
108
109
|
"sourceKind": obj.get("sourceKind"),
|
|
109
110
|
"recipient": RecipientRequest.from_dict(obj["recipient"]) if obj.get("recipient") is not None else None,
|
|
110
|
-
"manualRecipient": ManualRecipientRequest.from_dict(obj["manualRecipient"]) if obj.get("manualRecipient") is not None else None
|
|
111
|
+
"manualRecipient": ManualRecipientRequest.from_dict(obj["manualRecipient"]) if obj.get("manualRecipient") is not None else None,
|
|
112
|
+
"handwritten": obj.get("handwritten") if obj.get("handwritten") is not None else False
|
|
111
113
|
})
|
|
112
114
|
return _obj
|
|
113
115
|
|
|
@@ -38,11 +38,12 @@ class FiscalDocumentTransactionResponse(BaseModel):
|
|
|
38
38
|
description: Optional[StrictStr] = None
|
|
39
39
|
internal_code: Optional[StrictStr] = Field(default=None, alias="internalCode")
|
|
40
40
|
amount: Optional[Union[StrictFloat, StrictInt]] = None
|
|
41
|
+
available_amount: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, alias="availableAmount")
|
|
41
42
|
folio_id: Optional[StrictStr] = Field(default=None, alias="folioId")
|
|
42
43
|
status: Optional[StrictStr] = Field(default=None, description="Status of the transaction - PENDING for unpaid transactions, POSTED for paid transactions")
|
|
43
44
|
paid_amount: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, alias="paidAmount")
|
|
44
45
|
allocations: Optional[List[FiscalDocumentTransactionAllocation]] = None
|
|
45
|
-
__properties: ClassVar[List[str]] = ["id", "propertyId", "sourceId", "sourceKind", "transactionDate", "guestName", "description", "internalCode", "amount", "folioId", "status", "paidAmount", "allocations"]
|
|
46
|
+
__properties: ClassVar[List[str]] = ["id", "propertyId", "sourceId", "sourceKind", "transactionDate", "guestName", "description", "internalCode", "amount", "availableAmount", "folioId", "status", "paidAmount", "allocations"]
|
|
46
47
|
|
|
47
48
|
@field_validator('status')
|
|
48
49
|
def status_validate_enum(cls, value):
|
|
@@ -121,6 +122,7 @@ class FiscalDocumentTransactionResponse(BaseModel):
|
|
|
121
122
|
"description": obj.get("description"),
|
|
122
123
|
"internalCode": obj.get("internalCode"),
|
|
123
124
|
"amount": obj.get("amount"),
|
|
125
|
+
"availableAmount": obj.get("availableAmount"),
|
|
124
126
|
"folioId": obj.get("folioId"),
|
|
125
127
|
"status": obj.get("status"),
|
|
126
128
|
"paidAmount": obj.get("paidAmount"),
|
|
@@ -18,7 +18,7 @@ import re # noqa: F401
|
|
|
18
18
|
import json
|
|
19
19
|
|
|
20
20
|
from datetime import date
|
|
21
|
-
from pydantic import BaseModel, ConfigDict, Field, StrictBool
|
|
21
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt
|
|
22
22
|
from typing import Any, ClassVar, Dict, List, Optional
|
|
23
23
|
from typing_extensions import Annotated
|
|
24
24
|
from cloudbeds_fiscal_document.models.manual_recipient_request import ManualRecipientRequest
|
|
@@ -31,6 +31,7 @@ class GetInvoicePreviewRequest(BaseModel):
|
|
|
31
31
|
"""
|
|
32
32
|
GetInvoicePreviewRequest
|
|
33
33
|
""" # noqa: E501
|
|
34
|
+
transaction_id_to_amount: Optional[Dict[str, StrictInt]] = Field(default=None, description="Map of transaction ID to amount for partial transaction inclusion", alias="transactionIdToAmount")
|
|
34
35
|
transaction_ids: List[Annotated[int, Field(strict=True, ge=1)]] = Field(description="Include transactions with the specified IDs (deprecated, use `includeTransactionIds` instead)", alias="transactionIds")
|
|
35
36
|
source_id: Annotated[int, Field(strict=True, ge=1)] = Field(alias="sourceId")
|
|
36
37
|
sequence_id: Optional[Annotated[int, Field(strict=True, ge=1)]] = Field(default=None, alias="sequenceId")
|
|
@@ -43,7 +44,7 @@ class GetInvoicePreviewRequest(BaseModel):
|
|
|
43
44
|
include_transaction_ids: Optional[List[Annotated[int, Field(strict=True, ge=1)]]] = Field(default=None, description="Include transactions with the specified IDs", alias="includeTransactionIds")
|
|
44
45
|
simplified: Optional[StrictBool] = False
|
|
45
46
|
due_date_property_timezone: Optional[date] = Field(default=None, alias="dueDatePropertyTimezone")
|
|
46
|
-
__properties: ClassVar[List[str]] = ["transactionIds", "sourceId", "sequenceId", "sourceKind", "userId", "recipient", "manualRecipient", "folioIds", "excludeTransactionIds", "includeTransactionIds", "simplified", "dueDatePropertyTimezone"]
|
|
47
|
+
__properties: ClassVar[List[str]] = ["transactionIdToAmount", "transactionIds", "sourceId", "sequenceId", "sourceKind", "userId", "recipient", "manualRecipient", "folioIds", "excludeTransactionIds", "includeTransactionIds", "simplified", "dueDatePropertyTimezone"]
|
|
47
48
|
|
|
48
49
|
model_config = ConfigDict(
|
|
49
50
|
populate_by_name=True,
|
|
@@ -90,6 +91,11 @@ class GetInvoicePreviewRequest(BaseModel):
|
|
|
90
91
|
# override the default output from pydantic by calling `to_dict()` of manual_recipient
|
|
91
92
|
if self.manual_recipient:
|
|
92
93
|
_dict['manualRecipient'] = self.manual_recipient.to_dict()
|
|
94
|
+
# set to None if transaction_id_to_amount (nullable) is None
|
|
95
|
+
# and model_fields_set contains the field
|
|
96
|
+
if self.transaction_id_to_amount is None and "transaction_id_to_amount" in self.model_fields_set:
|
|
97
|
+
_dict['transactionIdToAmount'] = None
|
|
98
|
+
|
|
93
99
|
# set to None if sequence_id (nullable) is None
|
|
94
100
|
# and model_fields_set contains the field
|
|
95
101
|
if self.sequence_id is None and "sequence_id" in self.model_fields_set:
|
|
@@ -112,6 +118,7 @@ class GetInvoicePreviewRequest(BaseModel):
|
|
|
112
118
|
return cls.model_validate(obj)
|
|
113
119
|
|
|
114
120
|
_obj = cls.model_validate({
|
|
121
|
+
"transactionIdToAmount": obj.get("transactionIdToAmount"),
|
|
115
122
|
"transactionIds": obj.get("transactionIds"),
|
|
116
123
|
"sourceId": obj.get("sourceId"),
|
|
117
124
|
"sequenceId": obj.get("sequenceId"),
|
|
@@ -21,6 +21,7 @@ from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictBytes, Stri
|
|
|
21
21
|
from typing import Any, ClassVar, Dict, List, Optional, Union
|
|
22
22
|
from cloudbeds_fiscal_document.models.fiscal_document_status import FiscalDocumentStatus
|
|
23
23
|
from cloudbeds_fiscal_document.models.government_integration_qr import GovernmentIntegrationQr
|
|
24
|
+
from cloudbeds_fiscal_document.models.integration_signature import IntegrationSignature
|
|
24
25
|
from typing import Optional, Set
|
|
25
26
|
from typing_extensions import Self
|
|
26
27
|
|
|
@@ -39,7 +40,8 @@ class GovernmentIntegration(BaseModel):
|
|
|
39
40
|
cancellation_failed_fallback_status: Optional[FiscalDocumentStatus] = Field(default=None, alias="cancellationFailedFallbackStatus")
|
|
40
41
|
pdf_file_base64: Optional[Union[StrictBytes, StrictStr]] = Field(default=None, description="Base64-encoded PDF file content. Only allowed when status is COMPLETED_INTEGRATION.", alias="pdfFileBase64")
|
|
41
42
|
handwritten: Optional[StrictBool] = Field(default=None, description="Indicates this is a handwritten receipt created during POS unavailability.")
|
|
42
|
-
|
|
43
|
+
signatures: Optional[List[IntegrationSignature]] = Field(default=None, description="Array of semantic signatures/response data from the government integration.")
|
|
44
|
+
__properties: ClassVar[List[str]] = ["number", "series", "status", "qr", "url", "officialId", "externalId", "rectifyingInvoiceType", "cancellationFailedFallbackStatus", "pdfFileBase64", "handwritten", "signatures"]
|
|
43
45
|
|
|
44
46
|
model_config = ConfigDict(
|
|
45
47
|
populate_by_name=True,
|
|
@@ -83,6 +85,13 @@ class GovernmentIntegration(BaseModel):
|
|
|
83
85
|
# override the default output from pydantic by calling `to_dict()` of qr
|
|
84
86
|
if self.qr:
|
|
85
87
|
_dict['qr'] = self.qr.to_dict()
|
|
88
|
+
# override the default output from pydantic by calling `to_dict()` of each item in signatures (list)
|
|
89
|
+
_items = []
|
|
90
|
+
if self.signatures:
|
|
91
|
+
for _item_signatures in self.signatures:
|
|
92
|
+
if _item_signatures:
|
|
93
|
+
_items.append(_item_signatures.to_dict())
|
|
94
|
+
_dict['signatures'] = _items
|
|
86
95
|
return _dict
|
|
87
96
|
|
|
88
97
|
@classmethod
|
|
@@ -105,7 +114,8 @@ class GovernmentIntegration(BaseModel):
|
|
|
105
114
|
"rectifyingInvoiceType": obj.get("rectifyingInvoiceType"),
|
|
106
115
|
"cancellationFailedFallbackStatus": obj.get("cancellationFailedFallbackStatus"),
|
|
107
116
|
"pdfFileBase64": obj.get("pdfFileBase64"),
|
|
108
|
-
"handwritten": obj.get("handwritten")
|
|
117
|
+
"handwritten": obj.get("handwritten"),
|
|
118
|
+
"signatures": [IntegrationSignature.from_dict(_item) for _item in obj["signatures"]] if obj.get("signatures") is not None else None
|
|
109
119
|
})
|
|
110
120
|
return _obj
|
|
111
121
|
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Fiscal document service API
|
|
5
|
+
|
|
6
|
+
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: v1
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
|
+
|
|
11
|
+
Do not edit the class manually.
|
|
12
|
+
""" # noqa: E501
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
from __future__ import annotations
|
|
16
|
+
import pprint
|
|
17
|
+
import re # noqa: F401
|
|
18
|
+
import json
|
|
19
|
+
|
|
20
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator
|
|
21
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
22
|
+
from typing import Optional, Set
|
|
23
|
+
from typing_extensions import Self
|
|
24
|
+
|
|
25
|
+
class IntegrationSignature(BaseModel):
|
|
26
|
+
"""
|
|
27
|
+
A semantic signature/response item from a government integration.
|
|
28
|
+
""" # noqa: E501
|
|
29
|
+
type: Optional[StrictStr] = Field(default=None, description="Semantic type (JWT_TOKEN, QR_CODE_DATA, TRANSACTION_ID, COMPLIANCE_CHECK, etc.)")
|
|
30
|
+
label: Optional[StrictStr] = Field(default=None, description="Human-readable display label.")
|
|
31
|
+
value: Optional[StrictStr] = Field(default=None, description="The actual signature data/value.")
|
|
32
|
+
format: Optional[StrictStr] = Field(default=None, description="Format of the value.")
|
|
33
|
+
source: Optional[StrictStr] = Field(default=None, description="Source integration (FISKALTRUST_FR, FISKALTRUST_IT, etc.)")
|
|
34
|
+
raw_metadata: Optional[Dict[str, StrictStr]] = Field(default=None, description="Original integration-specific codes for debugging/auditing.", alias="rawMetadata")
|
|
35
|
+
__properties: ClassVar[List[str]] = ["type", "label", "value", "format", "source", "rawMetadata"]
|
|
36
|
+
|
|
37
|
+
@field_validator('format')
|
|
38
|
+
def format_validate_enum(cls, value):
|
|
39
|
+
"""Validates the enum"""
|
|
40
|
+
if value is None:
|
|
41
|
+
return value
|
|
42
|
+
|
|
43
|
+
if value not in set(['TEXT', 'BASE64', 'HEX', 'URL', 'UNKNOWN']):
|
|
44
|
+
raise ValueError("must be one of enum values ('TEXT', 'BASE64', 'HEX', 'URL', 'UNKNOWN')")
|
|
45
|
+
return value
|
|
46
|
+
|
|
47
|
+
model_config = ConfigDict(
|
|
48
|
+
populate_by_name=True,
|
|
49
|
+
validate_assignment=True,
|
|
50
|
+
protected_namespaces=(),
|
|
51
|
+
)
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
def to_str(self) -> str:
|
|
55
|
+
"""Returns the string representation of the model using alias"""
|
|
56
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
57
|
+
|
|
58
|
+
def to_json(self) -> str:
|
|
59
|
+
"""Returns the JSON representation of the model using alias"""
|
|
60
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
61
|
+
return json.dumps(self.to_dict())
|
|
62
|
+
|
|
63
|
+
@classmethod
|
|
64
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
65
|
+
"""Create an instance of IntegrationSignature from a JSON string"""
|
|
66
|
+
return cls.from_dict(json.loads(json_str))
|
|
67
|
+
|
|
68
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
69
|
+
"""Return the dictionary representation of the model using alias.
|
|
70
|
+
|
|
71
|
+
This has the following differences from calling pydantic's
|
|
72
|
+
`self.model_dump(by_alias=True)`:
|
|
73
|
+
|
|
74
|
+
* `None` is only added to the output dict for nullable fields that
|
|
75
|
+
were set at model initialization. Other fields with value `None`
|
|
76
|
+
are ignored.
|
|
77
|
+
"""
|
|
78
|
+
excluded_fields: Set[str] = set([
|
|
79
|
+
])
|
|
80
|
+
|
|
81
|
+
_dict = self.model_dump(
|
|
82
|
+
by_alias=True,
|
|
83
|
+
exclude=excluded_fields,
|
|
84
|
+
exclude_none=True,
|
|
85
|
+
)
|
|
86
|
+
return _dict
|
|
87
|
+
|
|
88
|
+
@classmethod
|
|
89
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
90
|
+
"""Create an instance of IntegrationSignature from a dict"""
|
|
91
|
+
if obj is None:
|
|
92
|
+
return None
|
|
93
|
+
|
|
94
|
+
if not isinstance(obj, dict):
|
|
95
|
+
return cls.model_validate(obj)
|
|
96
|
+
|
|
97
|
+
_obj = cls.model_validate({
|
|
98
|
+
"type": obj.get("type"),
|
|
99
|
+
"label": obj.get("label"),
|
|
100
|
+
"value": obj.get("value"),
|
|
101
|
+
"format": obj.get("format"),
|
|
102
|
+
"source": obj.get("source"),
|
|
103
|
+
"rawMetadata": obj.get("rawMetadata")
|
|
104
|
+
})
|
|
105
|
+
return _obj
|
|
106
|
+
|
|
107
|
+
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Fiscal document service API
|
|
5
|
+
|
|
6
|
+
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: v1
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
|
+
|
|
11
|
+
Do not edit the class manually.
|
|
12
|
+
""" # noqa: E501
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
from __future__ import annotations
|
|
16
|
+
import pprint
|
|
17
|
+
import re # noqa: F401
|
|
18
|
+
import json
|
|
19
|
+
|
|
20
|
+
from pydantic import BaseModel, ConfigDict
|
|
21
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
22
|
+
from cloudbeds_fiscal_document.models.invoice_transaction_allocation import InvoiceTransactionAllocation
|
|
23
|
+
from typing import Optional, Set
|
|
24
|
+
from typing_extensions import Self
|
|
25
|
+
|
|
26
|
+
class InvoiceAllocationsResponse(BaseModel):
|
|
27
|
+
"""
|
|
28
|
+
InvoiceAllocationsResponse
|
|
29
|
+
""" # noqa: E501
|
|
30
|
+
allocations: Optional[List[InvoiceTransactionAllocation]] = None
|
|
31
|
+
__properties: ClassVar[List[str]] = ["allocations"]
|
|
32
|
+
|
|
33
|
+
model_config = ConfigDict(
|
|
34
|
+
populate_by_name=True,
|
|
35
|
+
validate_assignment=True,
|
|
36
|
+
protected_namespaces=(),
|
|
37
|
+
)
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
def to_str(self) -> str:
|
|
41
|
+
"""Returns the string representation of the model using alias"""
|
|
42
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
43
|
+
|
|
44
|
+
def to_json(self) -> str:
|
|
45
|
+
"""Returns the JSON representation of the model using alias"""
|
|
46
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
47
|
+
return json.dumps(self.to_dict())
|
|
48
|
+
|
|
49
|
+
@classmethod
|
|
50
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
51
|
+
"""Create an instance of InvoiceAllocationsResponse from a JSON string"""
|
|
52
|
+
return cls.from_dict(json.loads(json_str))
|
|
53
|
+
|
|
54
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
55
|
+
"""Return the dictionary representation of the model using alias.
|
|
56
|
+
|
|
57
|
+
This has the following differences from calling pydantic's
|
|
58
|
+
`self.model_dump(by_alias=True)`:
|
|
59
|
+
|
|
60
|
+
* `None` is only added to the output dict for nullable fields that
|
|
61
|
+
were set at model initialization. Other fields with value `None`
|
|
62
|
+
are ignored.
|
|
63
|
+
"""
|
|
64
|
+
excluded_fields: Set[str] = set([
|
|
65
|
+
])
|
|
66
|
+
|
|
67
|
+
_dict = self.model_dump(
|
|
68
|
+
by_alias=True,
|
|
69
|
+
exclude=excluded_fields,
|
|
70
|
+
exclude_none=True,
|
|
71
|
+
)
|
|
72
|
+
# override the default output from pydantic by calling `to_dict()` of each item in allocations (list)
|
|
73
|
+
_items = []
|
|
74
|
+
if self.allocations:
|
|
75
|
+
for _item_allocations in self.allocations:
|
|
76
|
+
if _item_allocations:
|
|
77
|
+
_items.append(_item_allocations.to_dict())
|
|
78
|
+
_dict['allocations'] = _items
|
|
79
|
+
return _dict
|
|
80
|
+
|
|
81
|
+
@classmethod
|
|
82
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
83
|
+
"""Create an instance of InvoiceAllocationsResponse from a dict"""
|
|
84
|
+
if obj is None:
|
|
85
|
+
return None
|
|
86
|
+
|
|
87
|
+
if not isinstance(obj, dict):
|
|
88
|
+
return cls.model_validate(obj)
|
|
89
|
+
|
|
90
|
+
_obj = cls.model_validate({
|
|
91
|
+
"allocations": [InvoiceTransactionAllocation.from_dict(_item) for _item in obj["allocations"]] if obj.get("allocations") is not None else None
|
|
92
|
+
})
|
|
93
|
+
return _obj
|
|
94
|
+
|
|
95
|
+
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Fiscal document service API
|
|
5
|
+
|
|
6
|
+
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: v1
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
|
+
|
|
11
|
+
Do not edit the class manually.
|
|
12
|
+
""" # noqa: E501
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
from __future__ import annotations
|
|
16
|
+
import pprint
|
|
17
|
+
import re # noqa: F401
|
|
18
|
+
import json
|
|
19
|
+
|
|
20
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt
|
|
21
|
+
from typing import Any, ClassVar, Dict, List, Optional, Union
|
|
22
|
+
from typing import Optional, Set
|
|
23
|
+
from typing_extensions import Self
|
|
24
|
+
|
|
25
|
+
class InvoiceTransactionAllocation(BaseModel):
|
|
26
|
+
"""
|
|
27
|
+
InvoiceTransactionAllocation
|
|
28
|
+
""" # noqa: E501
|
|
29
|
+
transaction_id: Optional[StrictInt] = Field(default=None, description="Invoice transaction ID that received the allocation")
|
|
30
|
+
allocated_amount: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Total amount allocated to this transaction from all receipts")
|
|
31
|
+
__properties: ClassVar[List[str]] = ["transaction_id", "allocated_amount"]
|
|
32
|
+
|
|
33
|
+
model_config = ConfigDict(
|
|
34
|
+
populate_by_name=True,
|
|
35
|
+
validate_assignment=True,
|
|
36
|
+
protected_namespaces=(),
|
|
37
|
+
)
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
def to_str(self) -> str:
|
|
41
|
+
"""Returns the string representation of the model using alias"""
|
|
42
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
43
|
+
|
|
44
|
+
def to_json(self) -> str:
|
|
45
|
+
"""Returns the JSON representation of the model using alias"""
|
|
46
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
47
|
+
return json.dumps(self.to_dict())
|
|
48
|
+
|
|
49
|
+
@classmethod
|
|
50
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
51
|
+
"""Create an instance of InvoiceTransactionAllocation from a JSON string"""
|
|
52
|
+
return cls.from_dict(json.loads(json_str))
|
|
53
|
+
|
|
54
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
55
|
+
"""Return the dictionary representation of the model using alias.
|
|
56
|
+
|
|
57
|
+
This has the following differences from calling pydantic's
|
|
58
|
+
`self.model_dump(by_alias=True)`:
|
|
59
|
+
|
|
60
|
+
* `None` is only added to the output dict for nullable fields that
|
|
61
|
+
were set at model initialization. Other fields with value `None`
|
|
62
|
+
are ignored.
|
|
63
|
+
"""
|
|
64
|
+
excluded_fields: Set[str] = set([
|
|
65
|
+
])
|
|
66
|
+
|
|
67
|
+
_dict = self.model_dump(
|
|
68
|
+
by_alias=True,
|
|
69
|
+
exclude=excluded_fields,
|
|
70
|
+
exclude_none=True,
|
|
71
|
+
)
|
|
72
|
+
return _dict
|
|
73
|
+
|
|
74
|
+
@classmethod
|
|
75
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
76
|
+
"""Create an instance of InvoiceTransactionAllocation from a dict"""
|
|
77
|
+
if obj is None:
|
|
78
|
+
return None
|
|
79
|
+
|
|
80
|
+
if not isinstance(obj, dict):
|
|
81
|
+
return cls.model_validate(obj)
|
|
82
|
+
|
|
83
|
+
_obj = cls.model_validate({
|
|
84
|
+
"transaction_id": obj.get("transaction_id"),
|
|
85
|
+
"allocated_amount": obj.get("allocated_amount")
|
|
86
|
+
})
|
|
87
|
+
return _obj
|
|
88
|
+
|
|
89
|
+
|
|
@@ -18,7 +18,7 @@ import re # noqa: F401
|
|
|
18
18
|
import json
|
|
19
19
|
|
|
20
20
|
from datetime import date
|
|
21
|
-
from pydantic import BaseModel, ConfigDict, Field
|
|
21
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictInt
|
|
22
22
|
from typing import Any, ClassVar, Dict, List, Optional
|
|
23
23
|
from typing_extensions import Annotated
|
|
24
24
|
from cloudbeds_fiscal_document.models.recipient_request import RecipientRequest
|
|
@@ -31,6 +31,7 @@ class ProFormaInvoicePreviewRequest(BaseModel):
|
|
|
31
31
|
ProFormaInvoicePreviewRequest
|
|
32
32
|
""" # noqa: E501
|
|
33
33
|
transaction_ids: List[Annotated[int, Field(strict=True, ge=1)]] = Field(description="List of pending transaction IDs to include in the pro forma invoice (deprecated, use `includeTransactionIds` instead)", alias="transactionIds")
|
|
34
|
+
transaction_id_to_amount: Optional[Dict[str, StrictInt]] = Field(default=None, description="Map of transaction ID to amount for partial transaction inclusion", alias="transactionIdToAmount")
|
|
34
35
|
payment_ids: Optional[List[Annotated[int, Field(strict=True, ge=1)]]] = Field(default=None, description="List of payment IDs associated with the pending transactions", alias="paymentIds")
|
|
35
36
|
source_id: Annotated[int, Field(strict=True, ge=1)] = Field(alias="sourceId")
|
|
36
37
|
sequence_id: Optional[Annotated[int, Field(strict=True, ge=1)]] = Field(default=None, alias="sequenceId")
|
|
@@ -41,7 +42,7 @@ class ProFormaInvoicePreviewRequest(BaseModel):
|
|
|
41
42
|
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")
|
|
42
43
|
exclude_transaction_ids: Optional[List[Annotated[int, Field(strict=True, ge=1)]]] = Field(default=None, description="Exclude transactions with the specified IDs", alias="excludeTransactionIds")
|
|
43
44
|
include_transaction_ids: Optional[List[Annotated[int, Field(strict=True, ge=1)]]] = Field(default=None, description="Include transactions with the specified IDs", alias="includeTransactionIds")
|
|
44
|
-
__properties: ClassVar[List[str]] = ["transactionIds", "paymentIds", "sourceId", "sequenceId", "sourceKind", "userId", "recipient", "invoiceDate", "folioIds", "excludeTransactionIds", "includeTransactionIds"]
|
|
45
|
+
__properties: ClassVar[List[str]] = ["transactionIds", "transactionIdToAmount", "paymentIds", "sourceId", "sequenceId", "sourceKind", "userId", "recipient", "invoiceDate", "folioIds", "excludeTransactionIds", "includeTransactionIds"]
|
|
45
46
|
|
|
46
47
|
model_config = ConfigDict(
|
|
47
48
|
populate_by_name=True,
|
|
@@ -85,6 +86,11 @@ class ProFormaInvoicePreviewRequest(BaseModel):
|
|
|
85
86
|
# override the default output from pydantic by calling `to_dict()` of recipient
|
|
86
87
|
if self.recipient:
|
|
87
88
|
_dict['recipient'] = self.recipient.to_dict()
|
|
89
|
+
# set to None if transaction_id_to_amount (nullable) is None
|
|
90
|
+
# and model_fields_set contains the field
|
|
91
|
+
if self.transaction_id_to_amount is None and "transaction_id_to_amount" in self.model_fields_set:
|
|
92
|
+
_dict['transactionIdToAmount'] = None
|
|
93
|
+
|
|
88
94
|
# set to None if sequence_id (nullable) is None
|
|
89
95
|
# and model_fields_set contains the field
|
|
90
96
|
if self.sequence_id is None and "sequence_id" in self.model_fields_set:
|
|
@@ -108,6 +114,7 @@ class ProFormaInvoicePreviewRequest(BaseModel):
|
|
|
108
114
|
|
|
109
115
|
_obj = cls.model_validate({
|
|
110
116
|
"transactionIds": obj.get("transactionIds"),
|
|
117
|
+
"transactionIdToAmount": obj.get("transactionIdToAmount"),
|
|
111
118
|
"paymentIds": obj.get("paymentIds"),
|
|
112
119
|
"sourceId": obj.get("sourceId"),
|
|
113
120
|
"sequenceId": obj.get("sequenceId"),
|
|
@@ -18,7 +18,7 @@ import re # noqa: F401
|
|
|
18
18
|
import json
|
|
19
19
|
|
|
20
20
|
from datetime import date
|
|
21
|
-
from pydantic import BaseModel, ConfigDict, Field
|
|
21
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictInt
|
|
22
22
|
from typing import Any, ClassVar, Dict, List, Optional
|
|
23
23
|
from typing_extensions import Annotated
|
|
24
24
|
from cloudbeds_fiscal_document.models.recipient_request import RecipientRequest
|
|
@@ -31,6 +31,7 @@ class ProFormaInvoiceRequest(BaseModel):
|
|
|
31
31
|
ProFormaInvoiceRequest
|
|
32
32
|
""" # noqa: E501
|
|
33
33
|
transaction_ids: List[Annotated[int, Field(strict=True, ge=1)]] = Field(description="List of pending transaction IDs to include in the pro forma invoice (deprecated, use `includeTransactionIds` instead)", alias="transactionIds")
|
|
34
|
+
transaction_id_to_amount: Optional[Dict[str, StrictInt]] = Field(default=None, description="Map of transaction ID to amount for partial transaction inclusion", alias="transactionIdToAmount")
|
|
34
35
|
payment_ids: Optional[List[Annotated[int, Field(strict=True, ge=1)]]] = Field(default=None, description="List of payment IDs associated with the pending transactions", alias="paymentIds")
|
|
35
36
|
source_id: Annotated[int, Field(strict=True, ge=1)] = Field(alias="sourceId")
|
|
36
37
|
sequence_id: Optional[Annotated[int, Field(strict=True, ge=1)]] = Field(default=None, alias="sequenceId")
|
|
@@ -41,7 +42,7 @@ class ProFormaInvoiceRequest(BaseModel):
|
|
|
41
42
|
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")
|
|
42
43
|
exclude_transaction_ids: Optional[List[Annotated[int, Field(strict=True, ge=1)]]] = Field(default=None, description="Exclude transactions with the specified IDs", alias="excludeTransactionIds")
|
|
43
44
|
include_transaction_ids: Optional[List[Annotated[int, Field(strict=True, ge=1)]]] = Field(default=None, description="Include transactions with the specified IDs", alias="includeTransactionIds")
|
|
44
|
-
__properties: ClassVar[List[str]] = ["transactionIds", "paymentIds", "sourceId", "sequenceId", "sourceKind", "userId", "recipient", "invoiceDate", "folioIds", "excludeTransactionIds", "includeTransactionIds"]
|
|
45
|
+
__properties: ClassVar[List[str]] = ["transactionIds", "transactionIdToAmount", "paymentIds", "sourceId", "sequenceId", "sourceKind", "userId", "recipient", "invoiceDate", "folioIds", "excludeTransactionIds", "includeTransactionIds"]
|
|
45
46
|
|
|
46
47
|
model_config = ConfigDict(
|
|
47
48
|
populate_by_name=True,
|
|
@@ -85,6 +86,11 @@ class ProFormaInvoiceRequest(BaseModel):
|
|
|
85
86
|
# override the default output from pydantic by calling `to_dict()` of recipient
|
|
86
87
|
if self.recipient:
|
|
87
88
|
_dict['recipient'] = self.recipient.to_dict()
|
|
89
|
+
# set to None if transaction_id_to_amount (nullable) is None
|
|
90
|
+
# and model_fields_set contains the field
|
|
91
|
+
if self.transaction_id_to_amount is None and "transaction_id_to_amount" in self.model_fields_set:
|
|
92
|
+
_dict['transactionIdToAmount'] = None
|
|
93
|
+
|
|
88
94
|
# set to None if sequence_id (nullable) is None
|
|
89
95
|
# and model_fields_set contains the field
|
|
90
96
|
if self.sequence_id is None and "sequence_id" in self.model_fields_set:
|
|
@@ -108,6 +114,7 @@ class ProFormaInvoiceRequest(BaseModel):
|
|
|
108
114
|
|
|
109
115
|
_obj = cls.model_validate({
|
|
110
116
|
"transactionIds": obj.get("transactionIds"),
|
|
117
|
+
"transactionIdToAmount": obj.get("transactionIdToAmount"),
|
|
111
118
|
"paymentIds": obj.get("paymentIds"),
|
|
112
119
|
"sourceId": obj.get("sourceId"),
|
|
113
120
|
"sequenceId": obj.get("sequenceId"),
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Fiscal document service API
|
|
5
|
+
|
|
6
|
+
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: v1
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
|
+
|
|
11
|
+
Do not edit the class manually.
|
|
12
|
+
""" # noqa: E501
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
import unittest
|
|
16
|
+
|
|
17
|
+
from cloudbeds_fiscal_document.models.integration_signature import IntegrationSignature
|
|
18
|
+
|
|
19
|
+
class TestIntegrationSignature(unittest.TestCase):
|
|
20
|
+
"""IntegrationSignature unit test stubs"""
|
|
21
|
+
|
|
22
|
+
def setUp(self):
|
|
23
|
+
pass
|
|
24
|
+
|
|
25
|
+
def tearDown(self):
|
|
26
|
+
pass
|
|
27
|
+
|
|
28
|
+
def make_instance(self, include_optional) -> IntegrationSignature:
|
|
29
|
+
"""Test IntegrationSignature
|
|
30
|
+
include_optional is a boolean, when False only required
|
|
31
|
+
params are included, when True both required and
|
|
32
|
+
optional params are included """
|
|
33
|
+
# uncomment below to create an instance of `IntegrationSignature`
|
|
34
|
+
"""
|
|
35
|
+
model = IntegrationSignature()
|
|
36
|
+
if include_optional:
|
|
37
|
+
return IntegrationSignature(
|
|
38
|
+
type = '',
|
|
39
|
+
label = '',
|
|
40
|
+
value = '',
|
|
41
|
+
format = 'TEXT',
|
|
42
|
+
source = '',
|
|
43
|
+
raw_metadata = {
|
|
44
|
+
'key' : ''
|
|
45
|
+
}
|
|
46
|
+
)
|
|
47
|
+
else:
|
|
48
|
+
return IntegrationSignature(
|
|
49
|
+
)
|
|
50
|
+
"""
|
|
51
|
+
|
|
52
|
+
def testIntegrationSignature(self):
|
|
53
|
+
"""Test IntegrationSignature"""
|
|
54
|
+
# inst_req_only = self.make_instance(include_optional=False)
|
|
55
|
+
# inst_req_and_optional = self.make_instance(include_optional=True)
|
|
56
|
+
|
|
57
|
+
if __name__ == '__main__':
|
|
58
|
+
unittest.main()
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Fiscal document service API
|
|
5
|
+
|
|
6
|
+
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: v1
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
|
+
|
|
11
|
+
Do not edit the class manually.
|
|
12
|
+
""" # noqa: E501
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
import unittest
|
|
16
|
+
|
|
17
|
+
from cloudbeds_fiscal_document.models.invoice_allocations_response import InvoiceAllocationsResponse
|
|
18
|
+
|
|
19
|
+
class TestInvoiceAllocationsResponse(unittest.TestCase):
|
|
20
|
+
"""InvoiceAllocationsResponse unit test stubs"""
|
|
21
|
+
|
|
22
|
+
def setUp(self):
|
|
23
|
+
pass
|
|
24
|
+
|
|
25
|
+
def tearDown(self):
|
|
26
|
+
pass
|
|
27
|
+
|
|
28
|
+
def make_instance(self, include_optional) -> InvoiceAllocationsResponse:
|
|
29
|
+
"""Test InvoiceAllocationsResponse
|
|
30
|
+
include_optional is a boolean, when False only required
|
|
31
|
+
params are included, when True both required and
|
|
32
|
+
optional params are included """
|
|
33
|
+
# uncomment below to create an instance of `InvoiceAllocationsResponse`
|
|
34
|
+
"""
|
|
35
|
+
model = InvoiceAllocationsResponse()
|
|
36
|
+
if include_optional:
|
|
37
|
+
return InvoiceAllocationsResponse(
|
|
38
|
+
allocations = [
|
|
39
|
+
cloudbeds_fiscal_document.models.invoice_transaction_allocation.InvoiceTransactionAllocation(
|
|
40
|
+
transaction_id = 56,
|
|
41
|
+
allocated_amount = 1.337, )
|
|
42
|
+
]
|
|
43
|
+
)
|
|
44
|
+
else:
|
|
45
|
+
return InvoiceAllocationsResponse(
|
|
46
|
+
)
|
|
47
|
+
"""
|
|
48
|
+
|
|
49
|
+
def testInvoiceAllocationsResponse(self):
|
|
50
|
+
"""Test InvoiceAllocationsResponse"""
|
|
51
|
+
# inst_req_only = self.make_instance(include_optional=False)
|
|
52
|
+
# inst_req_and_optional = self.make_instance(include_optional=True)
|
|
53
|
+
|
|
54
|
+
if __name__ == '__main__':
|
|
55
|
+
unittest.main()
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Fiscal document service API
|
|
5
|
+
|
|
6
|
+
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: v1
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
|
+
|
|
11
|
+
Do not edit the class manually.
|
|
12
|
+
""" # noqa: E501
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
import unittest
|
|
16
|
+
|
|
17
|
+
from cloudbeds_fiscal_document.models.invoice_transaction_allocation import InvoiceTransactionAllocation
|
|
18
|
+
|
|
19
|
+
class TestInvoiceTransactionAllocation(unittest.TestCase):
|
|
20
|
+
"""InvoiceTransactionAllocation unit test stubs"""
|
|
21
|
+
|
|
22
|
+
def setUp(self):
|
|
23
|
+
pass
|
|
24
|
+
|
|
25
|
+
def tearDown(self):
|
|
26
|
+
pass
|
|
27
|
+
|
|
28
|
+
def make_instance(self, include_optional) -> InvoiceTransactionAllocation:
|
|
29
|
+
"""Test InvoiceTransactionAllocation
|
|
30
|
+
include_optional is a boolean, when False only required
|
|
31
|
+
params are included, when True both required and
|
|
32
|
+
optional params are included """
|
|
33
|
+
# uncomment below to create an instance of `InvoiceTransactionAllocation`
|
|
34
|
+
"""
|
|
35
|
+
model = InvoiceTransactionAllocation()
|
|
36
|
+
if include_optional:
|
|
37
|
+
return InvoiceTransactionAllocation(
|
|
38
|
+
transaction_id = 56,
|
|
39
|
+
allocated_amount = 1.337
|
|
40
|
+
)
|
|
41
|
+
else:
|
|
42
|
+
return InvoiceTransactionAllocation(
|
|
43
|
+
)
|
|
44
|
+
"""
|
|
45
|
+
|
|
46
|
+
def testInvoiceTransactionAllocation(self):
|
|
47
|
+
"""Test InvoiceTransactionAllocation"""
|
|
48
|
+
# inst_req_only = self.make_instance(include_optional=False)
|
|
49
|
+
# inst_req_and_optional = self.make_instance(include_optional=True)
|
|
50
|
+
|
|
51
|
+
if __name__ == '__main__':
|
|
52
|
+
unittest.main()
|
{cloudbeds_fiscal_document-1.14.0.dist-info → cloudbeds_fiscal_document-1.16.0.dist-info}/METADATA
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: cloudbeds_fiscal_document
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.16.0
|
|
4
4
|
Summary: OpenAPI client for Cloudbeds Fiscal Document API.
|
|
5
5
|
Author: Cloudbeds
|
|
6
6
|
License: The MIT License
|
|
@@ -57,7 +57,7 @@ No description provided (generated by Openapi Generator https://github.com/opena
|
|
|
57
57
|
The `cloudbeds_fiscal_document` package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
|
|
58
58
|
|
|
59
59
|
- API version: v1
|
|
60
|
-
- Package version: 1.
|
|
60
|
+
- Package version: 1.16.0
|
|
61
61
|
- Generator version: 7.11.0
|
|
62
62
|
- Build package: org.openapitools.codegen.languages.PythonClientCodegen
|
|
63
63
|
|
|
@@ -150,6 +150,7 @@ Class | Method | HTTP request | Description
|
|
|
150
150
|
*FiscalDocumentsApi* | [**get_fiscal_document_transactions_by_id**](cloudbeds_fiscal_document/docs/FiscalDocumentsApi.md#get_fiscal_document_transactions_by_id) | **GET** /fiscal-document/v1/fiscal-documents/{id}/transactions | Get list of transactions for a given fiscal document id
|
|
151
151
|
*FiscalDocumentsApi* | [**get_fiscal_document_transactions_for_allocation**](cloudbeds_fiscal_document/docs/FiscalDocumentsApi.md#get_fiscal_document_transactions_for_allocation) | **GET** /fiscal-document/v1/fiscal-documents/allocations/transactions | Get available transactions for allocations
|
|
152
152
|
*FiscalDocumentsApi* | [**get_fiscal_documents**](cloudbeds_fiscal_document/docs/FiscalDocumentsApi.md#get_fiscal_documents) | **GET** /fiscal-document/v1/fiscal-documents | Get list of fiscal documents
|
|
153
|
+
*FiscalDocumentsApi* | [**get_invoice_allocations**](cloudbeds_fiscal_document/docs/FiscalDocumentsApi.md#get_invoice_allocations) | **GET** /fiscal-document/v1/invoices/{id}/receipts/allocations | Get allocations for an invoice
|
|
153
154
|
*FiscalDocumentsApi* | [**get_pro_forma_preview**](cloudbeds_fiscal_document/docs/FiscalDocumentsApi.md#get_pro_forma_preview) | **POST** /fiscal-document/v1/fiscal-documents/pro-forma-invoice/preview | Create a fiscal document of the type pro forma invoice
|
|
154
155
|
*FiscalDocumentsApi* | [**get_rectify_invoice_preview**](cloudbeds_fiscal_document/docs/FiscalDocumentsApi.md#get_rectify_invoice_preview) | **POST** /fiscal-document/v1/fiscal-documents/rectify-invoice/preview | Get fiscal document preview of the type rectify invoice
|
|
155
156
|
*FiscalDocumentsApi* | [**get_selected_transactions_summary**](cloudbeds_fiscal_document/docs/FiscalDocumentsApi.md#get_selected_transactions_summary) | **GET** /fiscal-document/v1/fiscal-documents/transactions/summary | Get totals of selected available transactions for fiscal documents
|
|
@@ -199,6 +200,9 @@ Class | Method | HTTP request | Description
|
|
|
199
200
|
- [GovernmentIntegrationQr](cloudbeds_fiscal_document/docs/GovernmentIntegrationQr.md)
|
|
200
201
|
- [GuestDocumentType](cloudbeds_fiscal_document/docs/GuestDocumentType.md)
|
|
201
202
|
- [GuestGender](cloudbeds_fiscal_document/docs/GuestGender.md)
|
|
203
|
+
- [IntegrationSignature](cloudbeds_fiscal_document/docs/IntegrationSignature.md)
|
|
204
|
+
- [InvoiceAllocationsResponse](cloudbeds_fiscal_document/docs/InvoiceAllocationsResponse.md)
|
|
205
|
+
- [InvoiceTransactionAllocation](cloudbeds_fiscal_document/docs/InvoiceTransactionAllocation.md)
|
|
202
206
|
- [LatestLinkedDocument](cloudbeds_fiscal_document/docs/LatestLinkedDocument.md)
|
|
203
207
|
- [LinkedDocument](cloudbeds_fiscal_document/docs/LinkedDocument.md)
|
|
204
208
|
- [ManualRecipientRequest](cloudbeds_fiscal_document/docs/ManualRecipientRequest.md)
|
{cloudbeds_fiscal_document-1.14.0.dist-info → cloudbeds_fiscal_document-1.16.0.dist-info}/RECORD
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
cloudbeds_fiscal_document/__init__.py,sha256=
|
|
2
|
-
cloudbeds_fiscal_document/api_client.py,sha256=
|
|
1
|
+
cloudbeds_fiscal_document/__init__.py,sha256=UYhA__Jz0X-rw___JZUutJ0kBqPtLKfMCsqFcMBr_fc,7402
|
|
2
|
+
cloudbeds_fiscal_document/api_client.py,sha256=tF20DuvobrPj5OZuBuDaG1fkShNk8uioa5Hcaueavhk,27558
|
|
3
3
|
cloudbeds_fiscal_document/api_response.py,sha256=eMxw1mpmJcoGZ3gs9z6jM4oYoZ10Gjk333s9sKxGv7s,652
|
|
4
|
-
cloudbeds_fiscal_document/configuration.py,sha256=
|
|
4
|
+
cloudbeds_fiscal_document/configuration.py,sha256=Fi9EilHtk0MZHoE45Ih1PqoRkCa9fRaoLrlrHEnCeyc,19339
|
|
5
5
|
cloudbeds_fiscal_document/exceptions.py,sha256=oEYMmCX9U9BE8E32jNQfoh1N1TKYTWLtLRDTaWXkr-Q,6488
|
|
6
6
|
cloudbeds_fiscal_document/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
7
7
|
cloudbeds_fiscal_document/rest.py,sha256=2KoCf_WOxpyTU8HalDgwquQdIqjXmhFqU3_NpWsmdn8,9440
|
|
@@ -9,8 +9,8 @@ cloudbeds_fiscal_document/api/__init__.py,sha256=cHvaNnh6IrJcL5lgNmdQwZgBAD5YSSV
|
|
|
9
9
|
cloudbeds_fiscal_document/api/configs_api.py,sha256=gcPSv27YnTDhlblF6k5r_D9PpOG4ZIgtUrbskIGLdDQ,67338
|
|
10
10
|
cloudbeds_fiscal_document/api/export_api.py,sha256=RWqrml6GQcHQxsZoaZrxwkc51IvUnE4adt3HPGh7D-Q,13701
|
|
11
11
|
cloudbeds_fiscal_document/api/features_api.py,sha256=u_OO8wEoAcNxd18dN-PaLxrNEhB94Wv4M6DnLgGGWaM,11623
|
|
12
|
-
cloudbeds_fiscal_document/api/fiscal_documents_api.py,sha256
|
|
13
|
-
cloudbeds_fiscal_document/models/__init__.py,sha256=
|
|
12
|
+
cloudbeds_fiscal_document/api/fiscal_documents_api.py,sha256=--C-JQ2ZB6MeStxXqjhRczQdbdY6YLLm6wrPH-SQvCE,354231
|
|
13
|
+
cloudbeds_fiscal_document/models/__init__.py,sha256=b-OjRbj1pWoGb0iUMtoyaK2kb31AjG6S6byJfpRAs9I,6481
|
|
14
14
|
cloudbeds_fiscal_document/models/action.py,sha256=_56GB3RiA9LOB2v3g433XOYfzq8Va3SoS4PqN1Hi0GU,2554
|
|
15
15
|
cloudbeds_fiscal_document/models/allocate_receipt_payment_request.py,sha256=49955YQ2-Y7dckSNYEMx2KdXLduJNdi3H_NYDBnL5so,3396
|
|
16
16
|
cloudbeds_fiscal_document/models/allocations_data.py,sha256=SrXu1LA3xeCpEhz83mw1dmxd7b6EZ7Oplw-tFZTk1yA,3623
|
|
@@ -19,9 +19,9 @@ cloudbeds_fiscal_document/models/api_error.py,sha256=pU4rS-VJvFb-iyYEiCT1UxyjY5_
|
|
|
19
19
|
cloudbeds_fiscal_document/models/configs_response.py,sha256=n7BgXVh4pMWifED-GiWh5tT9PfnBDZM2SY1X7ZuHF_c,6877
|
|
20
20
|
cloudbeds_fiscal_document/models/configs_update_request.py,sha256=asQ2p8lyjBJdnM7rEkNB0FtQlTClsKUcde2Q_pTt0Q0,9936
|
|
21
21
|
cloudbeds_fiscal_document/models/create_credit_note_request.py,sha256=MUi-gNI7w-elxviSz9uFVUJxb1xuLQlfl-99MUfBeIE,4895
|
|
22
|
-
cloudbeds_fiscal_document/models/create_invoice_request.py,sha256=
|
|
22
|
+
cloudbeds_fiscal_document/models/create_invoice_request.py,sha256=Bi7TYgxDItSG3nGW5SANMOSI34xW2SEVTPmg0K9UNvU,6655
|
|
23
23
|
cloudbeds_fiscal_document/models/create_receipt_request.py,sha256=_lkQZ3VJ_L7IXqa1wXNIWSEFEqAhjQhWdqrKzpMCdnc,6929
|
|
24
|
-
cloudbeds_fiscal_document/models/create_simple_receipt_request.py,sha256=
|
|
24
|
+
cloudbeds_fiscal_document/models/create_simple_receipt_request.py,sha256=DQldwvU4TwYdPIu7FwxUXGV1d1rZsNANt71tMEoaLKI,4866
|
|
25
25
|
cloudbeds_fiscal_document/models/creation_method.py,sha256=vZD9e9cnodeE8MXhudSC_GxRUSnLVle4QjoYw_aHPyE,776
|
|
26
26
|
cloudbeds_fiscal_document/models/document_action.py,sha256=ZLmuXvQAvEzYBi_zihT28LsEMv30yupWr7riRI4mt5E,999
|
|
27
27
|
cloudbeds_fiscal_document/models/document_trigger_event.py,sha256=zvfuyvcLzGRVPoBoz8Go8yLF6aSu8NdelqM6-Sn3-ZM,958
|
|
@@ -35,28 +35,31 @@ cloudbeds_fiscal_document/models/fiscal_document_recipient.py,sha256=beNutHuZnKJ
|
|
|
35
35
|
cloudbeds_fiscal_document/models/fiscal_document_status.py,sha256=tIRy-16mlMSGRR1_nIedU_xtu_bkaseXjUJF8ywNhqA,1373
|
|
36
36
|
cloudbeds_fiscal_document/models/fiscal_document_summary_response.py,sha256=hI-UMNN_tSAMAhqXHzDjkMb1xAF-dy3a3jtSOFM7NIs,3683
|
|
37
37
|
cloudbeds_fiscal_document/models/fiscal_document_transaction_allocation.py,sha256=PJgrP5Pp0LL9hfvKbbSXFeTMQwkA3lk4PVewy3HC1es,2682
|
|
38
|
-
cloudbeds_fiscal_document/models/fiscal_document_transaction_response.py,sha256=
|
|
38
|
+
cloudbeds_fiscal_document/models/fiscal_document_transaction_response.py,sha256=ewgCSjCKuI-mEDdOq3R60i8j3BDm83Nwox14flvlvG4,5559
|
|
39
39
|
cloudbeds_fiscal_document/models/fiscal_document_transactions_for_allocation_paginated.py,sha256=E_UWdxrwpHorIx1eINyE4v1RcYhNI8ABs_3u9eqBXbI,3525
|
|
40
40
|
cloudbeds_fiscal_document/models/fiscal_document_transactions_paginated.py,sha256=tyumvukW0nI7tgKBYxXu_1wP4NMFTwd-AuRZkIGRgq0,3477
|
|
41
41
|
cloudbeds_fiscal_document/models/fiscal_document_transactions_summary.py,sha256=kzncs_ojUBQ_cEQKM0ul7As7-giYUHC5ET4tiJsBOJM,3674
|
|
42
42
|
cloudbeds_fiscal_document/models/fiscal_document_transactions_summary_taxes_inner.py,sha256=UjIh1wktBhH9TCRvGRR4ekBTA4C2Xo9YkUU-166q5bM,2722
|
|
43
43
|
cloudbeds_fiscal_document/models/get_credit_note_preview_request.py,sha256=nAZxAzgB8VDCc_U05ZL2NMdHzMIPh_jRZ8QD8Rsqr9A,4911
|
|
44
44
|
cloudbeds_fiscal_document/models/get_folio_export_request.py,sha256=8uF45MO97rx4vDPQBvA60niKiSuElmdMTYVw43C8vZw,4311
|
|
45
|
-
cloudbeds_fiscal_document/models/get_invoice_preview_request.py,sha256=
|
|
45
|
+
cloudbeds_fiscal_document/models/get_invoice_preview_request.py,sha256=x7LWS99KU4kIKNz4-SDmEQupgrcKL7d7OA8pk1qDUxQ,6671
|
|
46
46
|
cloudbeds_fiscal_document/models/get_logo_response.py,sha256=N0ACeqAlmxXYP3fm0m2-5XUS7LEWaXstg07XVAfzfoo,2625
|
|
47
47
|
cloudbeds_fiscal_document/models/get_rectify_invoice_note_preview_request.py,sha256=NGq70CB3fsaW_hNiRas3r62crcfGA-l4WR4gip15PlA,5704
|
|
48
|
-
cloudbeds_fiscal_document/models/government_integration.py,sha256=
|
|
48
|
+
cloudbeds_fiscal_document/models/government_integration.py,sha256=pz9baLjwlWe9aOUOynJtq92oZH7LKargMLFu_1zk-S4,5339
|
|
49
49
|
cloudbeds_fiscal_document/models/government_integration_qr.py,sha256=GBgifWUH3KjcF--7d-WcOWjOedAauLJbbuGDdlnSPGk,2638
|
|
50
50
|
cloudbeds_fiscal_document/models/guest_document_type.py,sha256=SG6np-2o6pzK1xbyqf0-ZPxr3tbiRGm2sOXBNHnMKoI,897
|
|
51
51
|
cloudbeds_fiscal_document/models/guest_gender.py,sha256=Tonz3np104WkfAtsQMH0gbFQI9fsavwzHi_hhJLdzH0,773
|
|
52
|
+
cloudbeds_fiscal_document/models/integration_signature.py,sha256=Opst-ERxKvXGysRStmrpshkUom-_X-BPSXXF4gFBM0E,3923
|
|
53
|
+
cloudbeds_fiscal_document/models/invoice_allocations_response.py,sha256=B7StG6vhmEOwVIwJaIqHqwhOSURvsowvmVFOzdHXGYE,3173
|
|
54
|
+
cloudbeds_fiscal_document/models/invoice_transaction_allocation.py,sha256=dKpu6xNXyWnFE8zImaNG97NU5TH1pgu94E3EXVy6jTs,2962
|
|
52
55
|
cloudbeds_fiscal_document/models/latest_linked_document.py,sha256=alMqlYHkrAVOSapwUtGZ7_ypuoxvYKaIA5nBNd-xUSw,3392
|
|
53
56
|
cloudbeds_fiscal_document/models/linked_document.py,sha256=XnJA3aUm7TT6g-lXv_lmKes1ZOh_fWRR07vH1zGKXYo,4269
|
|
54
57
|
cloudbeds_fiscal_document/models/manual_recipient_request.py,sha256=MFtaIDqaOQkcJUrJpa-CerLGaVmlBt4CpdSPakG-T6M,6537
|
|
55
58
|
cloudbeds_fiscal_document/models/manual_recipient_request_address.py,sha256=Cpo1Y9NSTjyGv_VGuLdYhthFvD_WRtFxQ6e3WgzgbVA,4555
|
|
56
59
|
cloudbeds_fiscal_document/models/manual_recipient_request_document.py,sha256=3h_Zz74zb6C3S9ArHVuDThkBtLQoi2JsW16HsKNBdtA,4327
|
|
57
60
|
cloudbeds_fiscal_document/models/preview_request.py,sha256=4OuP4Kprgs2cKKG2SD636OeoOVFc5mMHnEdbsI0o8sw,4248
|
|
58
|
-
cloudbeds_fiscal_document/models/pro_forma_invoice_preview_request.py,sha256=
|
|
59
|
-
cloudbeds_fiscal_document/models/pro_forma_invoice_request.py,sha256=
|
|
61
|
+
cloudbeds_fiscal_document/models/pro_forma_invoice_preview_request.py,sha256=sb9SKMHLXqJmKNzIDsh-6ocM4aij0Oqp2EMnb0KghwY,6257
|
|
62
|
+
cloudbeds_fiscal_document/models/pro_forma_invoice_request.py,sha256=4piMKlHtuCVGup0yMPLnbKSLaU1pFFXhD-N57czl3M0,6229
|
|
60
63
|
cloudbeds_fiscal_document/models/pro_forma_status_update_request.py,sha256=POhhENdYGJiFy8-yFXmEgag4zRn6BQ1KJHDwZFzYXEM,2924
|
|
61
64
|
cloudbeds_fiscal_document/models/property_configs_response.py,sha256=9HO3Uui3ZGixDMbDhz3YO0iVP5JQMrdqlIlPUhLYJOw,3291
|
|
62
65
|
cloudbeds_fiscal_document/models/receipt_transaction_allocation.py,sha256=6-0sVsKjGigFBRwKQvTCICxszOMZ4iiUC5xmukassk8,2733
|
|
@@ -116,6 +119,9 @@ cloudbeds_fiscal_document/test/test_government_integration.py,sha256=ilDBQwbQro1
|
|
|
116
119
|
cloudbeds_fiscal_document/test/test_government_integration_qr.py,sha256=UmMtFUyw_MRK61ehch5SOh1IfQWsCyo25sBAdzHQaCc,1546
|
|
117
120
|
cloudbeds_fiscal_document/test/test_guest_document_type.py,sha256=8GE091ByoF9kR8NU-BvOA28TwJ6y9hMOLIeypxB91RQ,761
|
|
118
121
|
cloudbeds_fiscal_document/test/test_guest_gender.py,sha256=al-YqFMnWSEQjuaX4bYEo3Rm23AhcZQSpPA7eQYq_nU,718
|
|
122
|
+
cloudbeds_fiscal_document/test/test_integration_signature.py,sha256=8i5GORxMLGOzRjZGWdVGF7xMjqsQlpG1VGX_U2J95c4,1686
|
|
123
|
+
cloudbeds_fiscal_document/test/test_invoice_allocations_response.py,sha256=riTBtadx8JmxfQRCosKiv8R1f0XLjVsohiDg7m9veQw,1794
|
|
124
|
+
cloudbeds_fiscal_document/test/test_invoice_transaction_allocation.py,sha256=muh6ge1KrQETqHk5JJslZmf-GaUnucmm7A5X8mFENqM,1630
|
|
119
125
|
cloudbeds_fiscal_document/test/test_latest_linked_document.py,sha256=lLZMJlzSJWYEkyoYE3l1znOwG68DL5H2WKypY51hMBk,1688
|
|
120
126
|
cloudbeds_fiscal_document/test/test_linked_document.py,sha256=sQACh20uixUFq5kKAHX3Xs-oi05W_URsrQkanr1q0K8,1695
|
|
121
127
|
cloudbeds_fiscal_document/test/test_manual_recipient_request.py,sha256=2jCV25-MQQsGQvehxOwB1qzPP3Q1HLuK-bXYr_pTqUo,2628
|
|
@@ -140,8 +146,8 @@ cloudbeds_fiscal_document/test/test_single_allocation.py,sha256=Rt_83Z9sOzX021xE
|
|
|
140
146
|
cloudbeds_fiscal_document/test/test_source_kind.py,sha256=Om-4SlTOpzbQNLcHIU6B0OwZ9vmVbRoRRd0KJUKUccY,711
|
|
141
147
|
cloudbeds_fiscal_document/test/test_transaction_for_allocation_response.py,sha256=ziAZ8Qi_50EBl9PtgZPasRuSUL9GPMTkun6YTcfJBE0,2723
|
|
142
148
|
cloudbeds_fiscal_document/test/test_transaction_status.py,sha256=XTzZUsjAoojQ1elLGJoe5CbUU-rxoTdiM8Q5uxv2vW8,760
|
|
143
|
-
cloudbeds_fiscal_document-1.
|
|
144
|
-
cloudbeds_fiscal_document-1.
|
|
145
|
-
cloudbeds_fiscal_document-1.
|
|
146
|
-
cloudbeds_fiscal_document-1.
|
|
147
|
-
cloudbeds_fiscal_document-1.
|
|
149
|
+
cloudbeds_fiscal_document-1.16.0.dist-info/licenses/LICENSE,sha256=noTWyG8XyfILgKHVxo6Z6mWjsXnUZ6AsqRY4pNTdBmg,1093
|
|
150
|
+
cloudbeds_fiscal_document-1.16.0.dist-info/METADATA,sha256=1-egQUCSWkdwpiHNZPZ184iJDTke4XvaFBVpj5atzQk,18631
|
|
151
|
+
cloudbeds_fiscal_document-1.16.0.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
|
|
152
|
+
cloudbeds_fiscal_document-1.16.0.dist-info/top_level.txt,sha256=xDhbzDUymHSRPf7_v5yTWqDdIimGk-7zkWu1zHiL7kc,26
|
|
153
|
+
cloudbeds_fiscal_document-1.16.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|