cloudbeds-fiscal-document 1.12.0__py3-none-any.whl → 1.14.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 +8 -1
- cloudbeds_fiscal_document/api/__init__.py +1 -0
- cloudbeds_fiscal_document/api/export_api.py +343 -0
- cloudbeds_fiscal_document/api_client.py +1 -1
- cloudbeds_fiscal_document/configuration.py +1 -1
- cloudbeds_fiscal_document/models/__init__.py +6 -0
- cloudbeds_fiscal_document/models/configs_response.py +5 -1
- cloudbeds_fiscal_document/models/configs_update_request.py +10 -1
- cloudbeds_fiscal_document/models/create_invoice_request.py +12 -3
- cloudbeds_fiscal_document/models/create_receipt_request.py +14 -4
- cloudbeds_fiscal_document/models/create_simple_receipt_request.py +8 -2
- cloudbeds_fiscal_document/models/get_folio_export_request.py +111 -0
- cloudbeds_fiscal_document/models/get_invoice_preview_request.py +12 -3
- cloudbeds_fiscal_document/models/government_integration.py +8 -4
- cloudbeds_fiscal_document/models/guest_document_type.py +41 -0
- cloudbeds_fiscal_document/models/guest_gender.py +38 -0
- cloudbeds_fiscal_document/models/manual_recipient_request.py +162 -0
- cloudbeds_fiscal_document/models/manual_recipient_request_address.py +127 -0
- cloudbeds_fiscal_document/models/manual_recipient_request_document.py +117 -0
- cloudbeds_fiscal_document/models/recipient_request.py +17 -5
- cloudbeds_fiscal_document/models/recipient_type.py +1 -0
- cloudbeds_fiscal_document/test/test_configs_response.py +2 -1
- cloudbeds_fiscal_document/test/test_configs_update_request.py +2 -1
- cloudbeds_fiscal_document/test/test_create_invoice_request.py +26 -5
- cloudbeds_fiscal_document/test/test_create_receipt_request.py +25 -4
- cloudbeds_fiscal_document/test/test_create_simple_receipt_request.py +26 -2
- cloudbeds_fiscal_document/test/test_export_api.py +38 -0
- cloudbeds_fiscal_document/test/test_fiscal_document_detailed_response.py +2 -1
- cloudbeds_fiscal_document/test/test_fiscal_document_paginated.py +2 -1
- cloudbeds_fiscal_document/test/test_fiscal_document_patch_request.py +2 -1
- cloudbeds_fiscal_document/test/test_fiscal_document_summary_response.py +2 -1
- cloudbeds_fiscal_document/test/test_get_folio_export_request.py +60 -0
- cloudbeds_fiscal_document/test/test_get_invoice_preview_request.py +26 -5
- cloudbeds_fiscal_document/test/test_government_integration.py +2 -1
- cloudbeds_fiscal_document/test/test_guest_document_type.py +33 -0
- cloudbeds_fiscal_document/test/test_guest_gender.py +33 -0
- cloudbeds_fiscal_document/test/test_manual_recipient_request.py +74 -0
- cloudbeds_fiscal_document/test/test_manual_recipient_request_address.py +56 -0
- cloudbeds_fiscal_document/test/test_manual_recipient_request_document.py +55 -0
- cloudbeds_fiscal_document/test/test_pro_forma_invoice_preview_request.py +4 -2
- cloudbeds_fiscal_document/test/test_pro_forma_invoice_request.py +4 -2
- cloudbeds_fiscal_document/test/test_property_configs_response.py +2 -1
- cloudbeds_fiscal_document/test/test_recipient_request.py +2 -1
- {cloudbeds_fiscal_document-1.12.0.dist-info → cloudbeds_fiscal_document-1.14.0.dist-info}/METADATA +9 -2
- {cloudbeds_fiscal_document-1.12.0.dist-info → cloudbeds_fiscal_document-1.14.0.dist-info}/RECORD +48 -34
- {cloudbeds_fiscal_document-1.12.0.dist-info → cloudbeds_fiscal_document-1.14.0.dist-info}/WHEEL +0 -0
- {cloudbeds_fiscal_document-1.12.0.dist-info → cloudbeds_fiscal_document-1.14.0.dist-info}/licenses/LICENSE +0 -0
- {cloudbeds_fiscal_document-1.12.0.dist-info → cloudbeds_fiscal_document-1.14.0.dist-info}/top_level.txt +0 -0
|
@@ -14,10 +14,11 @@
|
|
|
14
14
|
""" # noqa: E501
|
|
15
15
|
|
|
16
16
|
|
|
17
|
-
__version__ = "1.
|
|
17
|
+
__version__ = "1.14.0"
|
|
18
18
|
|
|
19
19
|
# import apis into sdk package
|
|
20
20
|
from cloudbeds_fiscal_document.api.configs_api import ConfigsApi
|
|
21
|
+
from cloudbeds_fiscal_document.api.export_api import ExportApi
|
|
21
22
|
from cloudbeds_fiscal_document.api.features_api import FeaturesApi
|
|
22
23
|
from cloudbeds_fiscal_document.api.fiscal_documents_api import FiscalDocumentsApi
|
|
23
24
|
|
|
@@ -63,13 +64,19 @@ from cloudbeds_fiscal_document.models.fiscal_document_transactions_paginated imp
|
|
|
63
64
|
from cloudbeds_fiscal_document.models.fiscal_document_transactions_summary import FiscalDocumentTransactionsSummary
|
|
64
65
|
from cloudbeds_fiscal_document.models.fiscal_document_transactions_summary_taxes_inner import FiscalDocumentTransactionsSummaryTaxesInner
|
|
65
66
|
from cloudbeds_fiscal_document.models.get_credit_note_preview_request import GetCreditNotePreviewRequest
|
|
67
|
+
from cloudbeds_fiscal_document.models.get_folio_export_request import GetFolioExportRequest
|
|
66
68
|
from cloudbeds_fiscal_document.models.get_invoice_preview_request import GetInvoicePreviewRequest
|
|
67
69
|
from cloudbeds_fiscal_document.models.get_logo_response import GetLogoResponse
|
|
68
70
|
from cloudbeds_fiscal_document.models.get_rectify_invoice_note_preview_request import GetRectifyInvoiceNotePreviewRequest
|
|
69
71
|
from cloudbeds_fiscal_document.models.government_integration import GovernmentIntegration
|
|
70
72
|
from cloudbeds_fiscal_document.models.government_integration_qr import GovernmentIntegrationQr
|
|
73
|
+
from cloudbeds_fiscal_document.models.guest_document_type import GuestDocumentType
|
|
74
|
+
from cloudbeds_fiscal_document.models.guest_gender import GuestGender
|
|
71
75
|
from cloudbeds_fiscal_document.models.latest_linked_document import LatestLinkedDocument
|
|
72
76
|
from cloudbeds_fiscal_document.models.linked_document import LinkedDocument
|
|
77
|
+
from cloudbeds_fiscal_document.models.manual_recipient_request import ManualRecipientRequest
|
|
78
|
+
from cloudbeds_fiscal_document.models.manual_recipient_request_address import ManualRecipientRequestAddress
|
|
79
|
+
from cloudbeds_fiscal_document.models.manual_recipient_request_document import ManualRecipientRequestDocument
|
|
73
80
|
from cloudbeds_fiscal_document.models.preview_request import PreviewRequest
|
|
74
81
|
from cloudbeds_fiscal_document.models.pro_forma_invoice_preview_request import ProFormaInvoicePreviewRequest
|
|
75
82
|
from cloudbeds_fiscal_document.models.pro_forma_invoice_request import ProFormaInvoiceRequest
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# import apis into api package
|
|
4
4
|
from cloudbeds_fiscal_document.api.configs_api import ConfigsApi
|
|
5
|
+
from cloudbeds_fiscal_document.api.export_api import ExportApi
|
|
5
6
|
from cloudbeds_fiscal_document.api.features_api import FeaturesApi
|
|
6
7
|
from cloudbeds_fiscal_document.api.fiscal_documents_api import FiscalDocumentsApi
|
|
7
8
|
|
|
@@ -0,0 +1,343 @@
|
|
|
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
|
+
import warnings
|
|
15
|
+
from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
|
|
16
|
+
from typing import Any, Dict, List, Optional, Tuple, Union
|
|
17
|
+
from typing_extensions import Annotated
|
|
18
|
+
|
|
19
|
+
from pydantic import Field, StrictBytes, StrictStr
|
|
20
|
+
from typing import Optional, Tuple, Union
|
|
21
|
+
from typing_extensions import Annotated
|
|
22
|
+
from cloudbeds_fiscal_document.models.get_folio_export_request import GetFolioExportRequest
|
|
23
|
+
|
|
24
|
+
from cloudbeds_fiscal_document.api_client import ApiClient, RequestSerialized
|
|
25
|
+
from cloudbeds_fiscal_document.api_response import ApiResponse
|
|
26
|
+
from cloudbeds_fiscal_document.rest import RESTResponseType
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
class ExportApi:
|
|
30
|
+
"""NOTE: This class is auto generated by OpenAPI Generator
|
|
31
|
+
Ref: https://openapi-generator.tech
|
|
32
|
+
|
|
33
|
+
Do not edit the class manually.
|
|
34
|
+
"""
|
|
35
|
+
|
|
36
|
+
def __init__(self, api_client=None) -> None:
|
|
37
|
+
if api_client is None:
|
|
38
|
+
api_client = ApiClient.get_default()
|
|
39
|
+
self.api_client = api_client
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
@validate_call
|
|
43
|
+
def get_folio_pdf(
|
|
44
|
+
self,
|
|
45
|
+
x_property_id: Annotated[int, Field(strict=True, ge=1, description="Property id")],
|
|
46
|
+
get_folio_export_request: GetFolioExportRequest,
|
|
47
|
+
accept_language: Annotated[Optional[StrictStr], Field(description="Desired language of exported PDF")] = None,
|
|
48
|
+
_request_timeout: Union[
|
|
49
|
+
None,
|
|
50
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
51
|
+
Tuple[
|
|
52
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
53
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
54
|
+
]
|
|
55
|
+
] = None,
|
|
56
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
57
|
+
_content_type: Optional[StrictStr] = None,
|
|
58
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
59
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
60
|
+
) -> bytearray:
|
|
61
|
+
"""Get folio list of transactions exported as PDF
|
|
62
|
+
|
|
63
|
+
Get folio list of transactions exported as PDF
|
|
64
|
+
|
|
65
|
+
:param x_property_id: Property id (required)
|
|
66
|
+
:type x_property_id: int
|
|
67
|
+
:param get_folio_export_request: (required)
|
|
68
|
+
:type get_folio_export_request: GetFolioExportRequest
|
|
69
|
+
:param accept_language: Desired language of exported PDF
|
|
70
|
+
:type accept_language: str
|
|
71
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
72
|
+
number provided, it will be total request
|
|
73
|
+
timeout. It can also be a pair (tuple) of
|
|
74
|
+
(connection, read) timeouts.
|
|
75
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
76
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
77
|
+
request; this effectively ignores the
|
|
78
|
+
authentication in the spec for a single request.
|
|
79
|
+
:type _request_auth: dict, optional
|
|
80
|
+
:param _content_type: force content-type for the request.
|
|
81
|
+
:type _content_type: str, Optional
|
|
82
|
+
:param _headers: set to override the headers for a single
|
|
83
|
+
request; this effectively ignores the headers
|
|
84
|
+
in the spec for a single request.
|
|
85
|
+
:type _headers: dict, optional
|
|
86
|
+
:param _host_index: set to override the host_index for a single
|
|
87
|
+
request; this effectively ignores the host_index
|
|
88
|
+
in the spec for a single request.
|
|
89
|
+
:type _host_index: int, optional
|
|
90
|
+
:return: Returns the result object.
|
|
91
|
+
""" # noqa: E501
|
|
92
|
+
|
|
93
|
+
_param = self._get_folio_pdf_serialize(
|
|
94
|
+
x_property_id=x_property_id,
|
|
95
|
+
get_folio_export_request=get_folio_export_request,
|
|
96
|
+
accept_language=accept_language,
|
|
97
|
+
_request_auth=_request_auth,
|
|
98
|
+
_content_type=_content_type,
|
|
99
|
+
_headers=_headers,
|
|
100
|
+
_host_index=_host_index
|
|
101
|
+
)
|
|
102
|
+
|
|
103
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
104
|
+
'200': "bytearray",
|
|
105
|
+
}
|
|
106
|
+
response_data = self.api_client.call_api(
|
|
107
|
+
*_param,
|
|
108
|
+
_request_timeout=_request_timeout
|
|
109
|
+
)
|
|
110
|
+
response_data.read()
|
|
111
|
+
return self.api_client.response_deserialize(
|
|
112
|
+
response_data=response_data,
|
|
113
|
+
response_types_map=_response_types_map,
|
|
114
|
+
).data
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
@validate_call
|
|
118
|
+
def get_folio_pdf_with_http_info(
|
|
119
|
+
self,
|
|
120
|
+
x_property_id: Annotated[int, Field(strict=True, ge=1, description="Property id")],
|
|
121
|
+
get_folio_export_request: GetFolioExportRequest,
|
|
122
|
+
accept_language: Annotated[Optional[StrictStr], Field(description="Desired language of exported PDF")] = None,
|
|
123
|
+
_request_timeout: Union[
|
|
124
|
+
None,
|
|
125
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
126
|
+
Tuple[
|
|
127
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
128
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
129
|
+
]
|
|
130
|
+
] = None,
|
|
131
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
132
|
+
_content_type: Optional[StrictStr] = None,
|
|
133
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
134
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
135
|
+
) -> ApiResponse[bytearray]:
|
|
136
|
+
"""Get folio list of transactions exported as PDF
|
|
137
|
+
|
|
138
|
+
Get folio list of transactions exported as PDF
|
|
139
|
+
|
|
140
|
+
:param x_property_id: Property id (required)
|
|
141
|
+
:type x_property_id: int
|
|
142
|
+
:param get_folio_export_request: (required)
|
|
143
|
+
:type get_folio_export_request: GetFolioExportRequest
|
|
144
|
+
:param accept_language: Desired language of exported PDF
|
|
145
|
+
:type accept_language: str
|
|
146
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
147
|
+
number provided, it will be total request
|
|
148
|
+
timeout. It can also be a pair (tuple) of
|
|
149
|
+
(connection, read) timeouts.
|
|
150
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
151
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
152
|
+
request; this effectively ignores the
|
|
153
|
+
authentication in the spec for a single request.
|
|
154
|
+
:type _request_auth: dict, optional
|
|
155
|
+
:param _content_type: force content-type for the request.
|
|
156
|
+
:type _content_type: str, Optional
|
|
157
|
+
:param _headers: set to override the headers for a single
|
|
158
|
+
request; this effectively ignores the headers
|
|
159
|
+
in the spec for a single request.
|
|
160
|
+
:type _headers: dict, optional
|
|
161
|
+
:param _host_index: set to override the host_index for a single
|
|
162
|
+
request; this effectively ignores the host_index
|
|
163
|
+
in the spec for a single request.
|
|
164
|
+
:type _host_index: int, optional
|
|
165
|
+
:return: Returns the result object.
|
|
166
|
+
""" # noqa: E501
|
|
167
|
+
|
|
168
|
+
_param = self._get_folio_pdf_serialize(
|
|
169
|
+
x_property_id=x_property_id,
|
|
170
|
+
get_folio_export_request=get_folio_export_request,
|
|
171
|
+
accept_language=accept_language,
|
|
172
|
+
_request_auth=_request_auth,
|
|
173
|
+
_content_type=_content_type,
|
|
174
|
+
_headers=_headers,
|
|
175
|
+
_host_index=_host_index
|
|
176
|
+
)
|
|
177
|
+
|
|
178
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
179
|
+
'200': "bytearray",
|
|
180
|
+
}
|
|
181
|
+
response_data = self.api_client.call_api(
|
|
182
|
+
*_param,
|
|
183
|
+
_request_timeout=_request_timeout
|
|
184
|
+
)
|
|
185
|
+
response_data.read()
|
|
186
|
+
return self.api_client.response_deserialize(
|
|
187
|
+
response_data=response_data,
|
|
188
|
+
response_types_map=_response_types_map,
|
|
189
|
+
)
|
|
190
|
+
|
|
191
|
+
|
|
192
|
+
@validate_call
|
|
193
|
+
def get_folio_pdf_without_preload_content(
|
|
194
|
+
self,
|
|
195
|
+
x_property_id: Annotated[int, Field(strict=True, ge=1, description="Property id")],
|
|
196
|
+
get_folio_export_request: GetFolioExportRequest,
|
|
197
|
+
accept_language: Annotated[Optional[StrictStr], Field(description="Desired language of exported PDF")] = None,
|
|
198
|
+
_request_timeout: Union[
|
|
199
|
+
None,
|
|
200
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
201
|
+
Tuple[
|
|
202
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
203
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
204
|
+
]
|
|
205
|
+
] = None,
|
|
206
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
207
|
+
_content_type: Optional[StrictStr] = None,
|
|
208
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
209
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
210
|
+
) -> RESTResponseType:
|
|
211
|
+
"""Get folio list of transactions exported as PDF
|
|
212
|
+
|
|
213
|
+
Get folio list of transactions exported as PDF
|
|
214
|
+
|
|
215
|
+
:param x_property_id: Property id (required)
|
|
216
|
+
:type x_property_id: int
|
|
217
|
+
:param get_folio_export_request: (required)
|
|
218
|
+
:type get_folio_export_request: GetFolioExportRequest
|
|
219
|
+
:param accept_language: Desired language of exported PDF
|
|
220
|
+
:type accept_language: str
|
|
221
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
222
|
+
number provided, it will be total request
|
|
223
|
+
timeout. It can also be a pair (tuple) of
|
|
224
|
+
(connection, read) timeouts.
|
|
225
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
226
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
227
|
+
request; this effectively ignores the
|
|
228
|
+
authentication in the spec for a single request.
|
|
229
|
+
:type _request_auth: dict, optional
|
|
230
|
+
:param _content_type: force content-type for the request.
|
|
231
|
+
:type _content_type: str, Optional
|
|
232
|
+
:param _headers: set to override the headers for a single
|
|
233
|
+
request; this effectively ignores the headers
|
|
234
|
+
in the spec for a single request.
|
|
235
|
+
:type _headers: dict, optional
|
|
236
|
+
:param _host_index: set to override the host_index for a single
|
|
237
|
+
request; this effectively ignores the host_index
|
|
238
|
+
in the spec for a single request.
|
|
239
|
+
:type _host_index: int, optional
|
|
240
|
+
:return: Returns the result object.
|
|
241
|
+
""" # noqa: E501
|
|
242
|
+
|
|
243
|
+
_param = self._get_folio_pdf_serialize(
|
|
244
|
+
x_property_id=x_property_id,
|
|
245
|
+
get_folio_export_request=get_folio_export_request,
|
|
246
|
+
accept_language=accept_language,
|
|
247
|
+
_request_auth=_request_auth,
|
|
248
|
+
_content_type=_content_type,
|
|
249
|
+
_headers=_headers,
|
|
250
|
+
_host_index=_host_index
|
|
251
|
+
)
|
|
252
|
+
|
|
253
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
254
|
+
'200': "bytearray",
|
|
255
|
+
}
|
|
256
|
+
response_data = self.api_client.call_api(
|
|
257
|
+
*_param,
|
|
258
|
+
_request_timeout=_request_timeout
|
|
259
|
+
)
|
|
260
|
+
return response_data.response
|
|
261
|
+
|
|
262
|
+
|
|
263
|
+
def _get_folio_pdf_serialize(
|
|
264
|
+
self,
|
|
265
|
+
x_property_id,
|
|
266
|
+
get_folio_export_request,
|
|
267
|
+
accept_language,
|
|
268
|
+
_request_auth,
|
|
269
|
+
_content_type,
|
|
270
|
+
_headers,
|
|
271
|
+
_host_index,
|
|
272
|
+
) -> RequestSerialized:
|
|
273
|
+
|
|
274
|
+
_host = None
|
|
275
|
+
|
|
276
|
+
_collection_formats: Dict[str, str] = {
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
_path_params: Dict[str, str] = {}
|
|
280
|
+
_query_params: List[Tuple[str, str]] = []
|
|
281
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
282
|
+
_form_params: List[Tuple[str, str]] = []
|
|
283
|
+
_files: Dict[
|
|
284
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
285
|
+
] = {}
|
|
286
|
+
_body_params: Optional[bytes] = None
|
|
287
|
+
|
|
288
|
+
# process the path parameters
|
|
289
|
+
# process the query parameters
|
|
290
|
+
# process the header parameters
|
|
291
|
+
if x_property_id is not None:
|
|
292
|
+
_header_params['X-Property-ID'] = x_property_id
|
|
293
|
+
if accept_language is not None:
|
|
294
|
+
_header_params['Accept-Language'] = accept_language
|
|
295
|
+
# process the form parameters
|
|
296
|
+
# process the body parameter
|
|
297
|
+
if get_folio_export_request is not None:
|
|
298
|
+
_body_params = get_folio_export_request
|
|
299
|
+
|
|
300
|
+
|
|
301
|
+
# set the HTTP header `Accept`
|
|
302
|
+
if 'Accept' not in _header_params:
|
|
303
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
304
|
+
[
|
|
305
|
+
'application/octet-stream'
|
|
306
|
+
]
|
|
307
|
+
)
|
|
308
|
+
|
|
309
|
+
# set the HTTP header `Content-Type`
|
|
310
|
+
if _content_type:
|
|
311
|
+
_header_params['Content-Type'] = _content_type
|
|
312
|
+
else:
|
|
313
|
+
_default_content_type = (
|
|
314
|
+
self.api_client.select_header_content_type(
|
|
315
|
+
[
|
|
316
|
+
'application/json'
|
|
317
|
+
]
|
|
318
|
+
)
|
|
319
|
+
)
|
|
320
|
+
if _default_content_type is not None:
|
|
321
|
+
_header_params['Content-Type'] = _default_content_type
|
|
322
|
+
|
|
323
|
+
# authentication setting
|
|
324
|
+
_auth_settings: List[str] = [
|
|
325
|
+
'bearerAuth'
|
|
326
|
+
]
|
|
327
|
+
|
|
328
|
+
return self.api_client.param_serialize(
|
|
329
|
+
method='POST',
|
|
330
|
+
resource_path='/fiscal-document/v1/folio-export/pdf',
|
|
331
|
+
path_params=_path_params,
|
|
332
|
+
query_params=_query_params,
|
|
333
|
+
header_params=_header_params,
|
|
334
|
+
body=_body_params,
|
|
335
|
+
post_params=_form_params,
|
|
336
|
+
files=_files,
|
|
337
|
+
auth_settings=_auth_settings,
|
|
338
|
+
collection_formats=_collection_formats,
|
|
339
|
+
_host=_host,
|
|
340
|
+
_request_auth=_request_auth
|
|
341
|
+
)
|
|
342
|
+
|
|
343
|
+
|
|
@@ -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.14.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.14.0".\
|
|
508
508
|
format(env=sys.platform, pyversion=sys.version)
|
|
509
509
|
|
|
510
510
|
def get_host_settings(self) -> List[HostSetting]:
|
|
@@ -44,13 +44,19 @@ from cloudbeds_fiscal_document.models.fiscal_document_transactions_paginated imp
|
|
|
44
44
|
from cloudbeds_fiscal_document.models.fiscal_document_transactions_summary import FiscalDocumentTransactionsSummary
|
|
45
45
|
from cloudbeds_fiscal_document.models.fiscal_document_transactions_summary_taxes_inner import FiscalDocumentTransactionsSummaryTaxesInner
|
|
46
46
|
from cloudbeds_fiscal_document.models.get_credit_note_preview_request import GetCreditNotePreviewRequest
|
|
47
|
+
from cloudbeds_fiscal_document.models.get_folio_export_request import GetFolioExportRequest
|
|
47
48
|
from cloudbeds_fiscal_document.models.get_invoice_preview_request import GetInvoicePreviewRequest
|
|
48
49
|
from cloudbeds_fiscal_document.models.get_logo_response import GetLogoResponse
|
|
49
50
|
from cloudbeds_fiscal_document.models.get_rectify_invoice_note_preview_request import GetRectifyInvoiceNotePreviewRequest
|
|
50
51
|
from cloudbeds_fiscal_document.models.government_integration import GovernmentIntegration
|
|
51
52
|
from cloudbeds_fiscal_document.models.government_integration_qr import GovernmentIntegrationQr
|
|
53
|
+
from cloudbeds_fiscal_document.models.guest_document_type import GuestDocumentType
|
|
54
|
+
from cloudbeds_fiscal_document.models.guest_gender import GuestGender
|
|
52
55
|
from cloudbeds_fiscal_document.models.latest_linked_document import LatestLinkedDocument
|
|
53
56
|
from cloudbeds_fiscal_document.models.linked_document import LinkedDocument
|
|
57
|
+
from cloudbeds_fiscal_document.models.manual_recipient_request import ManualRecipientRequest
|
|
58
|
+
from cloudbeds_fiscal_document.models.manual_recipient_request_address import ManualRecipientRequestAddress
|
|
59
|
+
from cloudbeds_fiscal_document.models.manual_recipient_request_document import ManualRecipientRequestDocument
|
|
54
60
|
from cloudbeds_fiscal_document.models.preview_request import PreviewRequest
|
|
55
61
|
from cloudbeds_fiscal_document.models.pro_forma_invoice_preview_request import ProFormaInvoicePreviewRequest
|
|
56
62
|
from cloudbeds_fiscal_document.models.pro_forma_invoice_request import ProFormaInvoiceRequest
|
|
@@ -34,10 +34,12 @@ class ConfigsResponse(BaseModel):
|
|
|
34
34
|
show_credit_notes_and_receipts: Optional[StrictBool] = Field(default=None, alias="showCreditNotesAndReceipts")
|
|
35
35
|
charge_breakdown: Optional[StrictBool] = Field(default=None, alias="chargeBreakdown")
|
|
36
36
|
use_guest_lang: Optional[StrictBool] = Field(default=None, alias="useGuestLang")
|
|
37
|
+
allow_pending_transactions: Optional[StrictBool] = Field(default=None, alias="allowPendingTransactions")
|
|
37
38
|
due_days: Optional[StrictInt] = Field(default=None, alias="dueDays")
|
|
38
39
|
lang: Optional[StrictStr] = None
|
|
39
40
|
prefix: Optional[StrictStr] = None
|
|
40
41
|
suffix: Optional[StrictStr] = None
|
|
42
|
+
separator: Optional[StrictStr] = None
|
|
41
43
|
legal_company_name: Optional[StrictStr] = Field(default=None, alias="legalCompanyName")
|
|
42
44
|
title: Optional[Dict[str, StrictStr]] = None
|
|
43
45
|
show_legal_company_name: Optional[StrictBool] = Field(default=None, alias="showLegalCompanyName")
|
|
@@ -52,7 +54,7 @@ class ConfigsResponse(BaseModel):
|
|
|
52
54
|
update_invoice_on_link_document: Optional[StrictBool] = Field(default=False, alias="updateInvoiceOnLinkDocument")
|
|
53
55
|
use_invoice_document_settings: Optional[StrictBool] = Field(default=False, alias="useInvoiceDocumentSettings")
|
|
54
56
|
use_invoice_title_and_numbering: Optional[StrictBool] = Field(default=False, alias="useInvoiceTitleAndNumbering")
|
|
55
|
-
__properties: ClassVar[List[str]] = ["propertyId", "documentKind", "showDetailedTaxFee", "showCreditNotesAndReceipts", "chargeBreakdown", "useGuestLang", "dueDays", "lang", "prefix", "suffix", "legalCompanyName", "title", "showLegalCompanyName", "includeRoomNumber", "useDocumentNumber", "isCompact", "taxId1", "taxId2", "cpf", "customText", "triggerEvents", "updateInvoiceOnLinkDocument", "useInvoiceDocumentSettings", "useInvoiceTitleAndNumbering"]
|
|
57
|
+
__properties: ClassVar[List[str]] = ["propertyId", "documentKind", "showDetailedTaxFee", "showCreditNotesAndReceipts", "chargeBreakdown", "useGuestLang", "allowPendingTransactions", "dueDays", "lang", "prefix", "suffix", "separator", "legalCompanyName", "title", "showLegalCompanyName", "includeRoomNumber", "useDocumentNumber", "isCompact", "taxId1", "taxId2", "cpf", "customText", "triggerEvents", "updateInvoiceOnLinkDocument", "useInvoiceDocumentSettings", "useInvoiceTitleAndNumbering"]
|
|
56
58
|
|
|
57
59
|
model_config = ConfigDict(
|
|
58
60
|
populate_by_name=True,
|
|
@@ -111,10 +113,12 @@ class ConfigsResponse(BaseModel):
|
|
|
111
113
|
"showCreditNotesAndReceipts": obj.get("showCreditNotesAndReceipts"),
|
|
112
114
|
"chargeBreakdown": obj.get("chargeBreakdown"),
|
|
113
115
|
"useGuestLang": obj.get("useGuestLang"),
|
|
116
|
+
"allowPendingTransactions": obj.get("allowPendingTransactions"),
|
|
114
117
|
"dueDays": obj.get("dueDays"),
|
|
115
118
|
"lang": obj.get("lang"),
|
|
116
119
|
"prefix": obj.get("prefix"),
|
|
117
120
|
"suffix": obj.get("suffix"),
|
|
121
|
+
"separator": obj.get("separator"),
|
|
118
122
|
"legalCompanyName": obj.get("legalCompanyName"),
|
|
119
123
|
"title": obj.get("title"),
|
|
120
124
|
"showLegalCompanyName": obj.get("showLegalCompanyName"),
|
|
@@ -31,11 +31,13 @@ class ConfigsUpdateRequest(BaseModel):
|
|
|
31
31
|
trigger_events: Optional[List[DocumentTriggerEvent]] = Field(default=None, alias="triggerEvents")
|
|
32
32
|
show_detailed_tax_fee: StrictBool = Field(alias="showDetailedTaxFee")
|
|
33
33
|
charge_breakdown: StrictBool = Field(alias="chargeBreakdown")
|
|
34
|
+
allow_pending_transactions: Optional[StrictBool] = Field(default=False, alias="allowPendingTransactions")
|
|
34
35
|
use_guest_lang: StrictBool = Field(alias="useGuestLang")
|
|
35
36
|
due_days: Optional[StrictInt] = Field(default=0, alias="dueDays")
|
|
36
37
|
sequence_start_number: Optional[Annotated[int, Field(strict=True, ge=1)]] = Field(default=None, alias="sequenceStartNumber")
|
|
37
38
|
lang: Optional[StrictStr] = None
|
|
38
39
|
prefix: Optional[StrictStr] = None
|
|
40
|
+
separator: Optional[StrictStr] = None
|
|
39
41
|
suffix: Optional[StrictStr] = None
|
|
40
42
|
legal_company_name: Optional[StrictStr] = Field(default=None, alias="legalCompanyName")
|
|
41
43
|
title: Optional[Dict[str, StrictStr]] = None
|
|
@@ -52,7 +54,7 @@ class ConfigsUpdateRequest(BaseModel):
|
|
|
52
54
|
cpf: Optional[StrictStr] = None
|
|
53
55
|
custom_text: Optional[Dict[str, StrictStr]] = Field(default=None, alias="customText")
|
|
54
56
|
logo_id: Optional[StrictInt] = Field(default=None, alias="logoId")
|
|
55
|
-
__properties: ClassVar[List[str]] = ["triggerEvents", "showDetailedTaxFee", "chargeBreakdown", "useGuestLang", "dueDays", "sequenceStartNumber", "lang", "prefix", "suffix", "legalCompanyName", "title", "showLegalCompanyName", "includeRoomNumber", "useDocumentNumber", "updateInvoiceOnLinkDocument", "isCompact", "useInvoiceTitleAndNumbering", "useInvoiceDocumentSettings", "showCreditNotesAndReceipts", "taxId1", "taxId2", "cpf", "customText", "logoId"]
|
|
57
|
+
__properties: ClassVar[List[str]] = ["triggerEvents", "showDetailedTaxFee", "chargeBreakdown", "allowPendingTransactions", "useGuestLang", "dueDays", "sequenceStartNumber", "lang", "prefix", "separator", "suffix", "legalCompanyName", "title", "showLegalCompanyName", "includeRoomNumber", "useDocumentNumber", "updateInvoiceOnLinkDocument", "isCompact", "useInvoiceTitleAndNumbering", "useInvoiceDocumentSettings", "showCreditNotesAndReceipts", "taxId1", "taxId2", "cpf", "customText", "logoId"]
|
|
56
58
|
|
|
57
59
|
model_config = ConfigDict(
|
|
58
60
|
populate_by_name=True,
|
|
@@ -108,6 +110,11 @@ class ConfigsUpdateRequest(BaseModel):
|
|
|
108
110
|
if self.prefix is None and "prefix" in self.model_fields_set:
|
|
109
111
|
_dict['prefix'] = None
|
|
110
112
|
|
|
113
|
+
# set to None if separator (nullable) is None
|
|
114
|
+
# and model_fields_set contains the field
|
|
115
|
+
if self.separator is None and "separator" in self.model_fields_set:
|
|
116
|
+
_dict['separator'] = None
|
|
117
|
+
|
|
111
118
|
# set to None if suffix (nullable) is None
|
|
112
119
|
# and model_fields_set contains the field
|
|
113
120
|
if self.suffix is None and "suffix" in self.model_fields_set:
|
|
@@ -163,11 +170,13 @@ class ConfigsUpdateRequest(BaseModel):
|
|
|
163
170
|
"triggerEvents": obj.get("triggerEvents"),
|
|
164
171
|
"showDetailedTaxFee": obj.get("showDetailedTaxFee"),
|
|
165
172
|
"chargeBreakdown": obj.get("chargeBreakdown"),
|
|
173
|
+
"allowPendingTransactions": obj.get("allowPendingTransactions") if obj.get("allowPendingTransactions") is not None else False,
|
|
166
174
|
"useGuestLang": obj.get("useGuestLang"),
|
|
167
175
|
"dueDays": obj.get("dueDays") if obj.get("dueDays") is not None else 0,
|
|
168
176
|
"sequenceStartNumber": obj.get("sequenceStartNumber"),
|
|
169
177
|
"lang": obj.get("lang"),
|
|
170
178
|
"prefix": obj.get("prefix"),
|
|
179
|
+
"separator": obj.get("separator"),
|
|
171
180
|
"suffix": obj.get("suffix"),
|
|
172
181
|
"legalCompanyName": obj.get("legalCompanyName"),
|
|
173
182
|
"title": obj.get("title"),
|
|
@@ -17,9 +17,11 @@ import pprint
|
|
|
17
17
|
import re # noqa: F401
|
|
18
18
|
import json
|
|
19
19
|
|
|
20
|
+
from datetime import date
|
|
20
21
|
from pydantic import BaseModel, ConfigDict, Field, StrictBool
|
|
21
22
|
from typing import Any, ClassVar, Dict, List, Optional
|
|
22
23
|
from typing_extensions import Annotated
|
|
24
|
+
from cloudbeds_fiscal_document.models.manual_recipient_request import ManualRecipientRequest
|
|
23
25
|
from cloudbeds_fiscal_document.models.recipient_request import RecipientRequest
|
|
24
26
|
from cloudbeds_fiscal_document.models.source_kind import SourceKind
|
|
25
27
|
from typing import Optional, Set
|
|
@@ -34,12 +36,14 @@ class CreateInvoiceRequest(BaseModel):
|
|
|
34
36
|
sequence_id: Optional[Annotated[int, Field(strict=True, ge=1)]] = Field(default=None, alias="sequenceId")
|
|
35
37
|
source_kind: SourceKind = Field(alias="sourceKind")
|
|
36
38
|
user_id: Optional[Annotated[int, Field(strict=True, ge=0)]] = Field(default=None, alias="userId")
|
|
37
|
-
recipient: RecipientRequest
|
|
39
|
+
recipient: Optional[RecipientRequest] = None
|
|
40
|
+
manual_recipient: Optional[ManualRecipientRequest] = Field(default=None, alias="manualRecipient")
|
|
38
41
|
folio_ids: Optional[List[Annotated[int, Field(strict=True, ge=1)]]] = Field(default=None, description="Include all transactions from the specified folio IDs", alias="folioIds")
|
|
39
42
|
exclude_transaction_ids: Optional[List[Annotated[int, Field(strict=True, ge=1)]]] = Field(default=None, description="Exclude transactions with the specified IDs", alias="excludeTransactionIds")
|
|
40
43
|
include_transaction_ids: Optional[List[Annotated[int, Field(strict=True, ge=1)]]] = Field(default=None, description="Include transactions with the specified IDs", alias="includeTransactionIds")
|
|
41
44
|
simplified: Optional[StrictBool] = False
|
|
42
|
-
|
|
45
|
+
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"]
|
|
43
47
|
|
|
44
48
|
model_config = ConfigDict(
|
|
45
49
|
populate_by_name=True,
|
|
@@ -83,6 +87,9 @@ class CreateInvoiceRequest(BaseModel):
|
|
|
83
87
|
# override the default output from pydantic by calling `to_dict()` of recipient
|
|
84
88
|
if self.recipient:
|
|
85
89
|
_dict['recipient'] = self.recipient.to_dict()
|
|
90
|
+
# override the default output from pydantic by calling `to_dict()` of manual_recipient
|
|
91
|
+
if self.manual_recipient:
|
|
92
|
+
_dict['manualRecipient'] = self.manual_recipient.to_dict()
|
|
86
93
|
# set to None if sequence_id (nullable) is None
|
|
87
94
|
# and model_fields_set contains the field
|
|
88
95
|
if self.sequence_id is None and "sequence_id" in self.model_fields_set:
|
|
@@ -111,10 +118,12 @@ class CreateInvoiceRequest(BaseModel):
|
|
|
111
118
|
"sourceKind": obj.get("sourceKind"),
|
|
112
119
|
"userId": obj.get("userId"),
|
|
113
120
|
"recipient": RecipientRequest.from_dict(obj["recipient"]) if obj.get("recipient") is not None else None,
|
|
121
|
+
"manualRecipient": ManualRecipientRequest.from_dict(obj["manualRecipient"]) if obj.get("manualRecipient") is not None else None,
|
|
114
122
|
"folioIds": obj.get("folioIds"),
|
|
115
123
|
"excludeTransactionIds": obj.get("excludeTransactionIds"),
|
|
116
124
|
"includeTransactionIds": obj.get("includeTransactionIds"),
|
|
117
|
-
"simplified": obj.get("simplified") if obj.get("simplified") is not None else False
|
|
125
|
+
"simplified": obj.get("simplified") if obj.get("simplified") is not None else False,
|
|
126
|
+
"dueDatePropertyTimezone": obj.get("dueDatePropertyTimezone")
|
|
118
127
|
})
|
|
119
128
|
return _obj
|
|
120
129
|
|
|
@@ -17,9 +17,10 @@ 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
|
+
from cloudbeds_fiscal_document.models.manual_recipient_request import ManualRecipientRequest
|
|
23
24
|
from cloudbeds_fiscal_document.models.receipt_transaction_allocation import ReceiptTransactionAllocation
|
|
24
25
|
from cloudbeds_fiscal_document.models.recipient_request import RecipientRequest
|
|
25
26
|
from cloudbeds_fiscal_document.models.source_kind import SourceKind
|
|
@@ -34,11 +35,14 @@ class CreateReceiptRequest(BaseModel):
|
|
|
34
35
|
transaction_id: Optional[StrictInt] = Field(default=None, description="Id of the transaction associated to a payment. This parameter is mutually exclusive with `paymentId`. ", alias="transactionId")
|
|
35
36
|
payment_id: Optional[StrictInt] = Field(default=None, description="Id of the payment. This parameter is mutually exclusive with `transactionId`. ", alias="paymentId")
|
|
36
37
|
sequence_id: Optional[StrictInt] = Field(default=None, alias="sequenceId")
|
|
38
|
+
skip_integration: Optional[StrictBool] = Field(default=False, description="At the moment this can only be set to True on Italy to skip the integration, for italy this case is needed to avoid Printing the Receipt", alias="skipIntegration")
|
|
39
|
+
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.")
|
|
37
40
|
user_id: StrictInt = Field(alias="userId")
|
|
38
41
|
source_id: Annotated[int, Field(strict=True, ge=1)] = Field(alias="sourceId")
|
|
39
42
|
source_kind: SourceKind = Field(alias="sourceKind")
|
|
40
|
-
recipient: RecipientRequest
|
|
41
|
-
|
|
43
|
+
recipient: Optional[RecipientRequest] = None
|
|
44
|
+
manual_recipient: Optional[ManualRecipientRequest] = Field(default=None, alias="manualRecipient")
|
|
45
|
+
__properties: ClassVar[List[str]] = ["allocations", "transactionId", "paymentId", "sequenceId", "skipIntegration", "handwritten", "userId", "sourceId", "sourceKind", "recipient", "manualRecipient"]
|
|
42
46
|
|
|
43
47
|
model_config = ConfigDict(
|
|
44
48
|
populate_by_name=True,
|
|
@@ -89,6 +93,9 @@ class CreateReceiptRequest(BaseModel):
|
|
|
89
93
|
# override the default output from pydantic by calling `to_dict()` of recipient
|
|
90
94
|
if self.recipient:
|
|
91
95
|
_dict['recipient'] = self.recipient.to_dict()
|
|
96
|
+
# override the default output from pydantic by calling `to_dict()` of manual_recipient
|
|
97
|
+
if self.manual_recipient:
|
|
98
|
+
_dict['manualRecipient'] = self.manual_recipient.to_dict()
|
|
92
99
|
# set to None if allocations (nullable) is None
|
|
93
100
|
# and model_fields_set contains the field
|
|
94
101
|
if self.allocations is None and "allocations" in self.model_fields_set:
|
|
@@ -125,10 +132,13 @@ class CreateReceiptRequest(BaseModel):
|
|
|
125
132
|
"transactionId": obj.get("transactionId"),
|
|
126
133
|
"paymentId": obj.get("paymentId"),
|
|
127
134
|
"sequenceId": obj.get("sequenceId"),
|
|
135
|
+
"skipIntegration": obj.get("skipIntegration") if obj.get("skipIntegration") is not None else False,
|
|
136
|
+
"handwritten": obj.get("handwritten") if obj.get("handwritten") is not None else False,
|
|
128
137
|
"userId": obj.get("userId"),
|
|
129
138
|
"sourceId": obj.get("sourceId"),
|
|
130
139
|
"sourceKind": obj.get("sourceKind"),
|
|
131
|
-
"recipient": RecipientRequest.from_dict(obj["recipient"]) if obj.get("recipient") is not None else None
|
|
140
|
+
"recipient": RecipientRequest.from_dict(obj["recipient"]) if obj.get("recipient") is not None else None,
|
|
141
|
+
"manualRecipient": ManualRecipientRequest.from_dict(obj["manualRecipient"]) if obj.get("manualRecipient") is not None else None
|
|
132
142
|
})
|
|
133
143
|
return _obj
|
|
134
144
|
|