cloudbeds-fiscal-document 1.6.0__py3-none-any.whl → 1.7.1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (58) hide show
  1. cloudbeds_fiscal_document/__init__.py +20 -1
  2. cloudbeds_fiscal_document/api/__init__.py +1 -0
  3. cloudbeds_fiscal_document/api/configs_api.py +263 -2
  4. cloudbeds_fiscal_document/api/features_api.py +299 -0
  5. cloudbeds_fiscal_document/api/fiscal_documents_api.py +4602 -561
  6. cloudbeds_fiscal_document/api_client.py +1 -1
  7. cloudbeds_fiscal_document/configuration.py +1 -1
  8. cloudbeds_fiscal_document/models/__init__.py +18 -0
  9. cloudbeds_fiscal_document/models/allocate_receipt_payment_request.py +98 -0
  10. cloudbeds_fiscal_document/models/allocations_summary.py +89 -0
  11. cloudbeds_fiscal_document/models/create_credit_note_request.py +9 -3
  12. cloudbeds_fiscal_document/models/create_invoice_request.py +9 -3
  13. cloudbeds_fiscal_document/models/create_receipt_request.py +135 -0
  14. cloudbeds_fiscal_document/models/create_simple_receipt_request.py +108 -0
  15. cloudbeds_fiscal_document/models/fiscal_document_detailed_response.py +26 -2
  16. cloudbeds_fiscal_document/models/fiscal_document_filters.py +133 -0
  17. cloudbeds_fiscal_document/models/fiscal_document_kind.py +1 -0
  18. cloudbeds_fiscal_document/models/fiscal_document_status.py +4 -0
  19. cloudbeds_fiscal_document/models/fiscal_document_transaction_response.py +15 -3
  20. cloudbeds_fiscal_document/models/fiscal_document_transactions_for_allocation_paginated.py +97 -0
  21. cloudbeds_fiscal_document/models/fiscal_document_transactions_summary.py +103 -0
  22. cloudbeds_fiscal_document/models/fiscal_document_transactions_summary_taxes_inner.py +89 -0
  23. cloudbeds_fiscal_document/models/get_credit_note_preview_request.py +120 -0
  24. cloudbeds_fiscal_document/models/get_invoice_preview_request.py +119 -0
  25. cloudbeds_fiscal_document/models/get_rectify_invoice_note_preview_request.py +123 -0
  26. cloudbeds_fiscal_document/models/government_integration.py +5 -2
  27. cloudbeds_fiscal_document/models/latest_linked_document.py +98 -0
  28. cloudbeds_fiscal_document/models/linked_document.py +112 -0
  29. cloudbeds_fiscal_document/models/pro_forma_invoice_preview_request.py +124 -0
  30. cloudbeds_fiscal_document/models/pro_forma_invoice_request.py +124 -0
  31. cloudbeds_fiscal_document/models/pro_forma_status_update_request.py +94 -0
  32. cloudbeds_fiscal_document/models/receipt_transaction_allocation.py +89 -0
  33. cloudbeds_fiscal_document/models/rectify_invoice_note_request.py +28 -7
  34. cloudbeds_fiscal_document/models/transaction_for_allocation_response.py +116 -0
  35. cloudbeds_fiscal_document/test/test_allocate_receipt_payment_request.py +62 -0
  36. cloudbeds_fiscal_document/test/test_allocations_summary.py +52 -0
  37. cloudbeds_fiscal_document/test/test_create_receipt_request.py +70 -0
  38. cloudbeds_fiscal_document/test/test_create_simple_receipt_request.py +69 -0
  39. cloudbeds_fiscal_document/test/test_features_api.py +38 -0
  40. cloudbeds_fiscal_document/test/test_fiscal_document_filters.py +74 -0
  41. cloudbeds_fiscal_document/test/test_fiscal_document_transactions_for_allocation_paginated.py +74 -0
  42. cloudbeds_fiscal_document/test/test_fiscal_document_transactions_summary.py +59 -0
  43. cloudbeds_fiscal_document/test/test_fiscal_document_transactions_summary_taxes_inner.py +52 -0
  44. cloudbeds_fiscal_document/test/test_get_credit_note_preview_request.py +69 -0
  45. cloudbeds_fiscal_document/test/test_get_invoice_preview_request.py +77 -0
  46. cloudbeds_fiscal_document/test/test_get_rectify_invoice_note_preview_request.py +68 -0
  47. cloudbeds_fiscal_document/test/test_latest_linked_document.py +55 -0
  48. cloudbeds_fiscal_document/test/test_linked_document.py +57 -0
  49. cloudbeds_fiscal_document/test/test_pro_forma_invoice_preview_request.py +81 -0
  50. cloudbeds_fiscal_document/test/test_pro_forma_invoice_request.py +81 -0
  51. cloudbeds_fiscal_document/test/test_pro_forma_status_update_request.py +52 -0
  52. cloudbeds_fiscal_document/test/test_receipt_transaction_allocation.py +54 -0
  53. cloudbeds_fiscal_document/test/test_transaction_for_allocation_response.py +71 -0
  54. {cloudbeds_fiscal_document-1.6.0.dist-info → cloudbeds_fiscal_document-1.7.1.dist-info}/METADATA +36 -3
  55. {cloudbeds_fiscal_document-1.6.0.dist-info → cloudbeds_fiscal_document-1.7.1.dist-info}/RECORD +58 -20
  56. {cloudbeds_fiscal_document-1.6.0.dist-info → cloudbeds_fiscal_document-1.7.1.dist-info}/WHEEL +0 -0
  57. {cloudbeds_fiscal_document-1.6.0.dist-info → cloudbeds_fiscal_document-1.7.1.dist-info}/licenses/LICENSE +0 -0
  58. {cloudbeds_fiscal_document-1.6.0.dist-info → cloudbeds_fiscal_document-1.7.1.dist-info}/top_level.txt +0 -0
@@ -14,10 +14,11 @@
14
14
  """ # noqa: E501
15
15
 
16
16
 
17
- __version__ = "1.6.0"
17
+ __version__ = "1.7.1"
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.features_api import FeaturesApi
21
22
  from cloudbeds_fiscal_document.api.fiscal_documents_api import FiscalDocumentsApi
22
23
 
23
24
  # import ApiClient
@@ -33,15 +34,20 @@ from cloudbeds_fiscal_document.exceptions import ApiException
33
34
 
34
35
  # import models into sdk package
35
36
  from cloudbeds_fiscal_document.models.action import Action
37
+ from cloudbeds_fiscal_document.models.allocate_receipt_payment_request import AllocateReceiptPaymentRequest
38
+ from cloudbeds_fiscal_document.models.allocations_summary import AllocationsSummary
36
39
  from cloudbeds_fiscal_document.models.api_error import ApiError
37
40
  from cloudbeds_fiscal_document.models.configs_response import ConfigsResponse
38
41
  from cloudbeds_fiscal_document.models.configs_update_request import ConfigsUpdateRequest
39
42
  from cloudbeds_fiscal_document.models.create_credit_note_request import CreateCreditNoteRequest
40
43
  from cloudbeds_fiscal_document.models.create_invoice_request import CreateInvoiceRequest
44
+ from cloudbeds_fiscal_document.models.create_receipt_request import CreateReceiptRequest
45
+ from cloudbeds_fiscal_document.models.create_simple_receipt_request import CreateSimpleReceiptRequest
41
46
  from cloudbeds_fiscal_document.models.creation_method import CreationMethod
42
47
  from cloudbeds_fiscal_document.models.document_action import DocumentAction
43
48
  from cloudbeds_fiscal_document.models.fiscal_document_detailed_response import FiscalDocumentDetailedResponse
44
49
  from cloudbeds_fiscal_document.models.fiscal_document_email_request import FiscalDocumentEmailRequest
50
+ from cloudbeds_fiscal_document.models.fiscal_document_filters import FiscalDocumentFilters
45
51
  from cloudbeds_fiscal_document.models.fiscal_document_kind import FiscalDocumentKind
46
52
  from cloudbeds_fiscal_document.models.fiscal_document_paginated import FiscalDocumentPaginated
47
53
  from cloudbeds_fiscal_document.models.fiscal_document_patch_request import FiscalDocumentPatchRequest
@@ -49,9 +55,21 @@ from cloudbeds_fiscal_document.models.fiscal_document_recipient import FiscalDoc
49
55
  from cloudbeds_fiscal_document.models.fiscal_document_status import FiscalDocumentStatus
50
56
  from cloudbeds_fiscal_document.models.fiscal_document_summary_response import FiscalDocumentSummaryResponse
51
57
  from cloudbeds_fiscal_document.models.fiscal_document_transaction_response import FiscalDocumentTransactionResponse
58
+ from cloudbeds_fiscal_document.models.fiscal_document_transactions_for_allocation_paginated import FiscalDocumentTransactionsForAllocationPaginated
52
59
  from cloudbeds_fiscal_document.models.fiscal_document_transactions_paginated import FiscalDocumentTransactionsPaginated
60
+ from cloudbeds_fiscal_document.models.fiscal_document_transactions_summary import FiscalDocumentTransactionsSummary
61
+ from cloudbeds_fiscal_document.models.fiscal_document_transactions_summary_taxes_inner import FiscalDocumentTransactionsSummaryTaxesInner
62
+ from cloudbeds_fiscal_document.models.get_credit_note_preview_request import GetCreditNotePreviewRequest
63
+ from cloudbeds_fiscal_document.models.get_invoice_preview_request import GetInvoicePreviewRequest
64
+ from cloudbeds_fiscal_document.models.get_rectify_invoice_note_preview_request import GetRectifyInvoiceNotePreviewRequest
53
65
  from cloudbeds_fiscal_document.models.government_integration import GovernmentIntegration
54
66
  from cloudbeds_fiscal_document.models.government_integration_qr import GovernmentIntegrationQr
67
+ from cloudbeds_fiscal_document.models.latest_linked_document import LatestLinkedDocument
68
+ from cloudbeds_fiscal_document.models.linked_document import LinkedDocument
69
+ from cloudbeds_fiscal_document.models.pro_forma_invoice_preview_request import ProFormaInvoicePreviewRequest
70
+ from cloudbeds_fiscal_document.models.pro_forma_invoice_request import ProFormaInvoiceRequest
71
+ from cloudbeds_fiscal_document.models.pro_forma_status_update_request import ProFormaStatusUpdateRequest
72
+ from cloudbeds_fiscal_document.models.receipt_transaction_allocation import ReceiptTransactionAllocation
55
73
  from cloudbeds_fiscal_document.models.recipient_address import RecipientAddress
56
74
  from cloudbeds_fiscal_document.models.recipient_contact_details import RecipientContactDetails
57
75
  from cloudbeds_fiscal_document.models.recipient_details import RecipientDetails
@@ -61,3 +79,4 @@ from cloudbeds_fiscal_document.models.recipient_tax_info import RecipientTaxInfo
61
79
  from cloudbeds_fiscal_document.models.recipient_type import RecipientType
62
80
  from cloudbeds_fiscal_document.models.rectify_invoice_note_request import RectifyInvoiceNoteRequest
63
81
  from cloudbeds_fiscal_document.models.source_kind import SourceKind
82
+ from cloudbeds_fiscal_document.models.transaction_for_allocation_response import TransactionForAllocationResponse
@@ -2,5 +2,6 @@
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.features_api import FeaturesApi
5
6
  from cloudbeds_fiscal_document.api.fiscal_documents_api import FiscalDocumentsApi
6
7
 
@@ -16,8 +16,8 @@ from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
16
16
  from typing import Any, Dict, List, Optional, Tuple, Union
17
17
  from typing_extensions import Annotated
18
18
 
19
- from pydantic import Field
20
- from typing import List
19
+ from pydantic import Field, StrictBytes, StrictStr
20
+ from typing import List, Tuple, Union
21
21
  from typing_extensions import Annotated
22
22
  from cloudbeds_fiscal_document.models.configs_response import ConfigsResponse
23
23
  from cloudbeds_fiscal_document.models.configs_update_request import ConfigsUpdateRequest
@@ -302,6 +302,267 @@ class ConfigsApi:
302
302
 
303
303
 
304
304
 
305
+ @validate_call
306
+ def get_pdf_preview(
307
+ self,
308
+ x_property_id: Annotated[int, Field(strict=True, ge=1, description="Property id")],
309
+ _request_timeout: Union[
310
+ None,
311
+ Annotated[StrictFloat, Field(gt=0)],
312
+ Tuple[
313
+ Annotated[StrictFloat, Field(gt=0)],
314
+ Annotated[StrictFloat, Field(gt=0)]
315
+ ]
316
+ ] = None,
317
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
318
+ _content_type: Optional[StrictStr] = None,
319
+ _headers: Optional[Dict[StrictStr, Any]] = None,
320
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
321
+ ) -> bytearray:
322
+ """Get PDF document preview
323
+
324
+ Build and return PDF document
325
+
326
+ :param x_property_id: Property id (required)
327
+ :type x_property_id: int
328
+ :param _request_timeout: timeout setting for this request. If one
329
+ number provided, it will be total request
330
+ timeout. It can also be a pair (tuple) of
331
+ (connection, read) timeouts.
332
+ :type _request_timeout: int, tuple(int, int), optional
333
+ :param _request_auth: set to override the auth_settings for an a single
334
+ request; this effectively ignores the
335
+ authentication in the spec for a single request.
336
+ :type _request_auth: dict, optional
337
+ :param _content_type: force content-type for the request.
338
+ :type _content_type: str, Optional
339
+ :param _headers: set to override the headers for a single
340
+ request; this effectively ignores the headers
341
+ in the spec for a single request.
342
+ :type _headers: dict, optional
343
+ :param _host_index: set to override the host_index for a single
344
+ request; this effectively ignores the host_index
345
+ in the spec for a single request.
346
+ :type _host_index: int, optional
347
+ :return: Returns the result object.
348
+ """ # noqa: E501
349
+
350
+ _param = self._get_pdf_preview_serialize(
351
+ x_property_id=x_property_id,
352
+ _request_auth=_request_auth,
353
+ _content_type=_content_type,
354
+ _headers=_headers,
355
+ _host_index=_host_index
356
+ )
357
+
358
+ _response_types_map: Dict[str, Optional[str]] = {
359
+ '200': "bytearray",
360
+ }
361
+ response_data = self.api_client.call_api(
362
+ *_param,
363
+ _request_timeout=_request_timeout
364
+ )
365
+ response_data.read()
366
+ return self.api_client.response_deserialize(
367
+ response_data=response_data,
368
+ response_types_map=_response_types_map,
369
+ ).data
370
+
371
+
372
+ @validate_call
373
+ def get_pdf_preview_with_http_info(
374
+ self,
375
+ x_property_id: Annotated[int, Field(strict=True, ge=1, description="Property id")],
376
+ _request_timeout: Union[
377
+ None,
378
+ Annotated[StrictFloat, Field(gt=0)],
379
+ Tuple[
380
+ Annotated[StrictFloat, Field(gt=0)],
381
+ Annotated[StrictFloat, Field(gt=0)]
382
+ ]
383
+ ] = None,
384
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
385
+ _content_type: Optional[StrictStr] = None,
386
+ _headers: Optional[Dict[StrictStr, Any]] = None,
387
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
388
+ ) -> ApiResponse[bytearray]:
389
+ """Get PDF document preview
390
+
391
+ Build and return PDF document
392
+
393
+ :param x_property_id: Property id (required)
394
+ :type x_property_id: int
395
+ :param _request_timeout: timeout setting for this request. If one
396
+ number provided, it will be total request
397
+ timeout. It can also be a pair (tuple) of
398
+ (connection, read) timeouts.
399
+ :type _request_timeout: int, tuple(int, int), optional
400
+ :param _request_auth: set to override the auth_settings for an a single
401
+ request; this effectively ignores the
402
+ authentication in the spec for a single request.
403
+ :type _request_auth: dict, optional
404
+ :param _content_type: force content-type for the request.
405
+ :type _content_type: str, Optional
406
+ :param _headers: set to override the headers for a single
407
+ request; this effectively ignores the headers
408
+ in the spec for a single request.
409
+ :type _headers: dict, optional
410
+ :param _host_index: set to override the host_index for a single
411
+ request; this effectively ignores the host_index
412
+ in the spec for a single request.
413
+ :type _host_index: int, optional
414
+ :return: Returns the result object.
415
+ """ # noqa: E501
416
+
417
+ _param = self._get_pdf_preview_serialize(
418
+ x_property_id=x_property_id,
419
+ _request_auth=_request_auth,
420
+ _content_type=_content_type,
421
+ _headers=_headers,
422
+ _host_index=_host_index
423
+ )
424
+
425
+ _response_types_map: Dict[str, Optional[str]] = {
426
+ '200': "bytearray",
427
+ }
428
+ response_data = self.api_client.call_api(
429
+ *_param,
430
+ _request_timeout=_request_timeout
431
+ )
432
+ response_data.read()
433
+ return self.api_client.response_deserialize(
434
+ response_data=response_data,
435
+ response_types_map=_response_types_map,
436
+ )
437
+
438
+
439
+ @validate_call
440
+ def get_pdf_preview_without_preload_content(
441
+ self,
442
+ x_property_id: Annotated[int, Field(strict=True, ge=1, description="Property id")],
443
+ _request_timeout: Union[
444
+ None,
445
+ Annotated[StrictFloat, Field(gt=0)],
446
+ Tuple[
447
+ Annotated[StrictFloat, Field(gt=0)],
448
+ Annotated[StrictFloat, Field(gt=0)]
449
+ ]
450
+ ] = None,
451
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
452
+ _content_type: Optional[StrictStr] = None,
453
+ _headers: Optional[Dict[StrictStr, Any]] = None,
454
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
455
+ ) -> RESTResponseType:
456
+ """Get PDF document preview
457
+
458
+ Build and return PDF document
459
+
460
+ :param x_property_id: Property id (required)
461
+ :type x_property_id: int
462
+ :param _request_timeout: timeout setting for this request. If one
463
+ number provided, it will be total request
464
+ timeout. It can also be a pair (tuple) of
465
+ (connection, read) timeouts.
466
+ :type _request_timeout: int, tuple(int, int), optional
467
+ :param _request_auth: set to override the auth_settings for an a single
468
+ request; this effectively ignores the
469
+ authentication in the spec for a single request.
470
+ :type _request_auth: dict, optional
471
+ :param _content_type: force content-type for the request.
472
+ :type _content_type: str, Optional
473
+ :param _headers: set to override the headers for a single
474
+ request; this effectively ignores the headers
475
+ in the spec for a single request.
476
+ :type _headers: dict, optional
477
+ :param _host_index: set to override the host_index for a single
478
+ request; this effectively ignores the host_index
479
+ in the spec for a single request.
480
+ :type _host_index: int, optional
481
+ :return: Returns the result object.
482
+ """ # noqa: E501
483
+
484
+ _param = self._get_pdf_preview_serialize(
485
+ x_property_id=x_property_id,
486
+ _request_auth=_request_auth,
487
+ _content_type=_content_type,
488
+ _headers=_headers,
489
+ _host_index=_host_index
490
+ )
491
+
492
+ _response_types_map: Dict[str, Optional[str]] = {
493
+ '200': "bytearray",
494
+ }
495
+ response_data = self.api_client.call_api(
496
+ *_param,
497
+ _request_timeout=_request_timeout
498
+ )
499
+ return response_data.response
500
+
501
+
502
+ def _get_pdf_preview_serialize(
503
+ self,
504
+ x_property_id,
505
+ _request_auth,
506
+ _content_type,
507
+ _headers,
508
+ _host_index,
509
+ ) -> RequestSerialized:
510
+
511
+ _host = None
512
+
513
+ _collection_formats: Dict[str, str] = {
514
+ }
515
+
516
+ _path_params: Dict[str, str] = {}
517
+ _query_params: List[Tuple[str, str]] = []
518
+ _header_params: Dict[str, Optional[str]] = _headers or {}
519
+ _form_params: List[Tuple[str, str]] = []
520
+ _files: Dict[
521
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
522
+ ] = {}
523
+ _body_params: Optional[bytes] = None
524
+
525
+ # process the path parameters
526
+ # process the query parameters
527
+ # process the header parameters
528
+ if x_property_id is not None:
529
+ _header_params['X-Property-ID'] = x_property_id
530
+ # process the form parameters
531
+ # process the body parameter
532
+
533
+
534
+ # set the HTTP header `Accept`
535
+ if 'Accept' not in _header_params:
536
+ _header_params['Accept'] = self.api_client.select_header_accept(
537
+ [
538
+ 'application/octet-stream'
539
+ ]
540
+ )
541
+
542
+
543
+ # authentication setting
544
+ _auth_settings: List[str] = [
545
+ 'bearerAuth'
546
+ ]
547
+
548
+ return self.api_client.param_serialize(
549
+ method='GET',
550
+ resource_path='/fiscal-document/v1/configs/preview',
551
+ path_params=_path_params,
552
+ query_params=_query_params,
553
+ header_params=_header_params,
554
+ body=_body_params,
555
+ post_params=_form_params,
556
+ files=_files,
557
+ auth_settings=_auth_settings,
558
+ collection_formats=_collection_formats,
559
+ _host=_host,
560
+ _request_auth=_request_auth
561
+ )
562
+
563
+
564
+
565
+
305
566
  @validate_call
306
567
  def update_configs(
307
568
  self,
@@ -0,0 +1,299 @@
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, StrictBool
20
+ from typing import Dict
21
+ from typing_extensions import Annotated
22
+
23
+ from cloudbeds_fiscal_document.api_client import ApiClient, RequestSerialized
24
+ from cloudbeds_fiscal_document.api_response import ApiResponse
25
+ from cloudbeds_fiscal_document.rest import RESTResponseType
26
+
27
+
28
+ class FeaturesApi:
29
+ """NOTE: This class is auto generated by OpenAPI Generator
30
+ Ref: https://openapi-generator.tech
31
+
32
+ Do not edit the class manually.
33
+ """
34
+
35
+ def __init__(self, api_client=None) -> None:
36
+ if api_client is None:
37
+ api_client = ApiClient.get_default()
38
+ self.api_client = api_client
39
+
40
+
41
+ @validate_call
42
+ def get_property_features(
43
+ self,
44
+ x_property_id: Annotated[int, Field(strict=True, ge=1, description="Property id")],
45
+ _request_timeout: Union[
46
+ None,
47
+ Annotated[StrictFloat, Field(gt=0)],
48
+ Tuple[
49
+ Annotated[StrictFloat, Field(gt=0)],
50
+ Annotated[StrictFloat, Field(gt=0)]
51
+ ]
52
+ ] = None,
53
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
54
+ _content_type: Optional[StrictStr] = None,
55
+ _headers: Optional[Dict[StrictStr, Any]] = None,
56
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
57
+ ) -> Dict[str, bool]:
58
+ """Get enabled features for the current user and property
59
+
60
+ Returns a map of feature flags enabled for the authenticated user in the context of the current property.
61
+
62
+ :param x_property_id: Property id (required)
63
+ :type x_property_id: int
64
+ :param _request_timeout: timeout setting for this request. If one
65
+ number provided, it will be total request
66
+ timeout. It can also be a pair (tuple) of
67
+ (connection, read) timeouts.
68
+ :type _request_timeout: int, tuple(int, int), optional
69
+ :param _request_auth: set to override the auth_settings for an a single
70
+ request; this effectively ignores the
71
+ authentication in the spec for a single request.
72
+ :type _request_auth: dict, optional
73
+ :param _content_type: force content-type for the request.
74
+ :type _content_type: str, Optional
75
+ :param _headers: set to override the headers for a single
76
+ request; this effectively ignores the headers
77
+ in the spec for a single request.
78
+ :type _headers: dict, optional
79
+ :param _host_index: set to override the host_index for a single
80
+ request; this effectively ignores the host_index
81
+ in the spec for a single request.
82
+ :type _host_index: int, optional
83
+ :return: Returns the result object.
84
+ """ # noqa: E501
85
+
86
+ _param = self._get_property_features_serialize(
87
+ x_property_id=x_property_id,
88
+ _request_auth=_request_auth,
89
+ _content_type=_content_type,
90
+ _headers=_headers,
91
+ _host_index=_host_index
92
+ )
93
+
94
+ _response_types_map: Dict[str, Optional[str]] = {
95
+ '200': "Dict[str, bool]",
96
+ }
97
+ response_data = self.api_client.call_api(
98
+ *_param,
99
+ _request_timeout=_request_timeout
100
+ )
101
+ response_data.read()
102
+ return self.api_client.response_deserialize(
103
+ response_data=response_data,
104
+ response_types_map=_response_types_map,
105
+ ).data
106
+
107
+
108
+ @validate_call
109
+ def get_property_features_with_http_info(
110
+ self,
111
+ x_property_id: Annotated[int, Field(strict=True, ge=1, description="Property id")],
112
+ _request_timeout: Union[
113
+ None,
114
+ Annotated[StrictFloat, Field(gt=0)],
115
+ Tuple[
116
+ Annotated[StrictFloat, Field(gt=0)],
117
+ Annotated[StrictFloat, Field(gt=0)]
118
+ ]
119
+ ] = None,
120
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
121
+ _content_type: Optional[StrictStr] = None,
122
+ _headers: Optional[Dict[StrictStr, Any]] = None,
123
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
124
+ ) -> ApiResponse[Dict[str, bool]]:
125
+ """Get enabled features for the current user and property
126
+
127
+ Returns a map of feature flags enabled for the authenticated user in the context of the current property.
128
+
129
+ :param x_property_id: Property id (required)
130
+ :type x_property_id: int
131
+ :param _request_timeout: timeout setting for this request. If one
132
+ number provided, it will be total request
133
+ timeout. It can also be a pair (tuple) of
134
+ (connection, read) timeouts.
135
+ :type _request_timeout: int, tuple(int, int), optional
136
+ :param _request_auth: set to override the auth_settings for an a single
137
+ request; this effectively ignores the
138
+ authentication in the spec for a single request.
139
+ :type _request_auth: dict, optional
140
+ :param _content_type: force content-type for the request.
141
+ :type _content_type: str, Optional
142
+ :param _headers: set to override the headers for a single
143
+ request; this effectively ignores the headers
144
+ in the spec for a single request.
145
+ :type _headers: dict, optional
146
+ :param _host_index: set to override the host_index for a single
147
+ request; this effectively ignores the host_index
148
+ in the spec for a single request.
149
+ :type _host_index: int, optional
150
+ :return: Returns the result object.
151
+ """ # noqa: E501
152
+
153
+ _param = self._get_property_features_serialize(
154
+ x_property_id=x_property_id,
155
+ _request_auth=_request_auth,
156
+ _content_type=_content_type,
157
+ _headers=_headers,
158
+ _host_index=_host_index
159
+ )
160
+
161
+ _response_types_map: Dict[str, Optional[str]] = {
162
+ '200': "Dict[str, bool]",
163
+ }
164
+ response_data = self.api_client.call_api(
165
+ *_param,
166
+ _request_timeout=_request_timeout
167
+ )
168
+ response_data.read()
169
+ return self.api_client.response_deserialize(
170
+ response_data=response_data,
171
+ response_types_map=_response_types_map,
172
+ )
173
+
174
+
175
+ @validate_call
176
+ def get_property_features_without_preload_content(
177
+ self,
178
+ x_property_id: Annotated[int, Field(strict=True, ge=1, description="Property id")],
179
+ _request_timeout: Union[
180
+ None,
181
+ Annotated[StrictFloat, Field(gt=0)],
182
+ Tuple[
183
+ Annotated[StrictFloat, Field(gt=0)],
184
+ Annotated[StrictFloat, Field(gt=0)]
185
+ ]
186
+ ] = None,
187
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
188
+ _content_type: Optional[StrictStr] = None,
189
+ _headers: Optional[Dict[StrictStr, Any]] = None,
190
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
191
+ ) -> RESTResponseType:
192
+ """Get enabled features for the current user and property
193
+
194
+ Returns a map of feature flags enabled for the authenticated user in the context of the current property.
195
+
196
+ :param x_property_id: Property id (required)
197
+ :type x_property_id: int
198
+ :param _request_timeout: timeout setting for this request. If one
199
+ number provided, it will be total request
200
+ timeout. It can also be a pair (tuple) of
201
+ (connection, read) timeouts.
202
+ :type _request_timeout: int, tuple(int, int), optional
203
+ :param _request_auth: set to override the auth_settings for an a single
204
+ request; this effectively ignores the
205
+ authentication in the spec for a single request.
206
+ :type _request_auth: dict, optional
207
+ :param _content_type: force content-type for the request.
208
+ :type _content_type: str, Optional
209
+ :param _headers: set to override the headers for a single
210
+ request; this effectively ignores the headers
211
+ in the spec for a single request.
212
+ :type _headers: dict, optional
213
+ :param _host_index: set to override the host_index for a single
214
+ request; this effectively ignores the host_index
215
+ in the spec for a single request.
216
+ :type _host_index: int, optional
217
+ :return: Returns the result object.
218
+ """ # noqa: E501
219
+
220
+ _param = self._get_property_features_serialize(
221
+ x_property_id=x_property_id,
222
+ _request_auth=_request_auth,
223
+ _content_type=_content_type,
224
+ _headers=_headers,
225
+ _host_index=_host_index
226
+ )
227
+
228
+ _response_types_map: Dict[str, Optional[str]] = {
229
+ '200': "Dict[str, bool]",
230
+ }
231
+ response_data = self.api_client.call_api(
232
+ *_param,
233
+ _request_timeout=_request_timeout
234
+ )
235
+ return response_data.response
236
+
237
+
238
+ def _get_property_features_serialize(
239
+ self,
240
+ x_property_id,
241
+ _request_auth,
242
+ _content_type,
243
+ _headers,
244
+ _host_index,
245
+ ) -> RequestSerialized:
246
+
247
+ _host = None
248
+
249
+ _collection_formats: Dict[str, str] = {
250
+ }
251
+
252
+ _path_params: Dict[str, str] = {}
253
+ _query_params: List[Tuple[str, str]] = []
254
+ _header_params: Dict[str, Optional[str]] = _headers or {}
255
+ _form_params: List[Tuple[str, str]] = []
256
+ _files: Dict[
257
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
258
+ ] = {}
259
+ _body_params: Optional[bytes] = None
260
+
261
+ # process the path parameters
262
+ # process the query parameters
263
+ # process the header parameters
264
+ if x_property_id is not None:
265
+ _header_params['X-Property-ID'] = x_property_id
266
+ # process the form parameters
267
+ # process the body parameter
268
+
269
+
270
+ # set the HTTP header `Accept`
271
+ if 'Accept' not in _header_params:
272
+ _header_params['Accept'] = self.api_client.select_header_accept(
273
+ [
274
+ 'application/json'
275
+ ]
276
+ )
277
+
278
+
279
+ # authentication setting
280
+ _auth_settings: List[str] = [
281
+ 'bearerAuth'
282
+ ]
283
+
284
+ return self.api_client.param_serialize(
285
+ method='GET',
286
+ resource_path='/fiscal-document/v1/property/features',
287
+ path_params=_path_params,
288
+ query_params=_query_params,
289
+ header_params=_header_params,
290
+ body=_body_params,
291
+ post_params=_form_params,
292
+ files=_files,
293
+ auth_settings=_auth_settings,
294
+ collection_formats=_collection_formats,
295
+ _host=_host,
296
+ _request_auth=_request_auth
297
+ )
298
+
299
+