cloudbeds-fiscal-document 1.14.0__py3-none-any.whl → 1.15.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.
@@ -14,7 +14,7 @@
14
14
  """ # noqa: E501
15
15
 
16
16
 
17
- __version__ = "1.14.0"
17
+ __version__ = "1.15.0"
18
18
 
19
19
  # import apis into sdk package
20
20
  from cloudbeds_fiscal_document.api.configs_api import ConfigsApi
@@ -72,6 +72,7 @@ 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
75
76
  from cloudbeds_fiscal_document.models.latest_linked_document import LatestLinkedDocument
76
77
  from cloudbeds_fiscal_document.models.linked_document import LinkedDocument
77
78
  from cloudbeds_fiscal_document.models.manual_recipient_request import ManualRecipientRequest
@@ -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.14.0/python'
93
+ self.user_agent = 'OpenAPI-Generator/1.15.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.14.0".\
507
+ "SDK Package Version: 1.15.0".\
508
508
  format(env=sys.platform, pyversion=sys.version)
509
509
 
510
510
  def get_host_settings(self) -> List[HostSetting]:
@@ -52,6 +52,7 @@ 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
55
56
  from cloudbeds_fiscal_document.models.latest_linked_document import LatestLinkedDocument
56
57
  from cloudbeds_fiscal_document.models.linked_document import LinkedDocument
57
58
  from cloudbeds_fiscal_document.models.manual_recipient_request import ManualRecipientRequest
@@ -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
- __properties: ClassVar[List[str]] = ["number", "series", "status", "qr", "url", "officialId", "externalId", "rectifyingInvoiceType", "cancellationFailedFallbackStatus", "pdfFileBase64", "handwritten"]
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,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()
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cloudbeds_fiscal_document
3
- Version: 1.14.0
3
+ Version: 1.15.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.14.0
60
+ - Package version: 1.15.0
61
61
  - Generator version: 7.11.0
62
62
  - Build package: org.openapitools.codegen.languages.PythonClientCodegen
63
63
 
@@ -199,6 +199,7 @@ Class | Method | HTTP request | Description
199
199
  - [GovernmentIntegrationQr](cloudbeds_fiscal_document/docs/GovernmentIntegrationQr.md)
200
200
  - [GuestDocumentType](cloudbeds_fiscal_document/docs/GuestDocumentType.md)
201
201
  - [GuestGender](cloudbeds_fiscal_document/docs/GuestGender.md)
202
+ - [IntegrationSignature](cloudbeds_fiscal_document/docs/IntegrationSignature.md)
202
203
  - [LatestLinkedDocument](cloudbeds_fiscal_document/docs/LatestLinkedDocument.md)
203
204
  - [LinkedDocument](cloudbeds_fiscal_document/docs/LinkedDocument.md)
204
205
  - [ManualRecipientRequest](cloudbeds_fiscal_document/docs/ManualRecipientRequest.md)
@@ -1,7 +1,7 @@
1
- cloudbeds_fiscal_document/__init__.py,sha256=rY6zeWHYkVKuef0_L4MMhOhLjhnPZZSLkM_4sKiKyzk,7108
2
- cloudbeds_fiscal_document/api_client.py,sha256=Su2rI1qAxw8txstXMI1QnrDisp29z6ywexzzAGsm2Dk,27558
1
+ cloudbeds_fiscal_document/__init__.py,sha256=SnzwVk9F8YKNZuYS_M2bibw5oIo_OlyVR_BYcGPt_e4,7196
2
+ cloudbeds_fiscal_document/api_client.py,sha256=8Ot7qIbTTTvFiqbez0xN4XZ3iMGZ1OlLSkO9ihnCOTw,27558
3
3
  cloudbeds_fiscal_document/api_response.py,sha256=eMxw1mpmJcoGZ3gs9z6jM4oYoZ10Gjk333s9sKxGv7s,652
4
- cloudbeds_fiscal_document/configuration.py,sha256=pw38V4cuVn46V_JOMiCa6rL03FqOXc_RQGDzw4VFTzI,19339
4
+ cloudbeds_fiscal_document/configuration.py,sha256=YY6i63Ml2jG_YKXddbQ9aCSsIicSqxFmdfEqYas9ZMA,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
@@ -10,7 +10,7 @@ cloudbeds_fiscal_document/api/configs_api.py,sha256=gcPSv27YnTDhlblF6k5r_D9PpOG4
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
12
  cloudbeds_fiscal_document/api/fiscal_documents_api.py,sha256=L8rqQt98ktuU6npu7zLR_Nq05epJnJttiCApIStxj4Y,342824
13
- cloudbeds_fiscal_document/models/__init__.py,sha256=Y5slAEAMevf-Xun8FkeWAYh5gmHypDcQVv5n_oD94vI,6187
13
+ cloudbeds_fiscal_document/models/__init__.py,sha256=Wy17ZlRTm41NUB4XqJcAou8pJl82qZ0XmbDKRM7vwV8,6275
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
@@ -45,10 +45,11 @@ cloudbeds_fiscal_document/models/get_folio_export_request.py,sha256=8uF45MO97rx4
45
45
  cloudbeds_fiscal_document/models/get_invoice_preview_request.py,sha256=dPzxbW0eYVkzNK6wS3OE94PsV8IDZcw2tDv-Wxx-jrw,6093
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=0QgMrw4X4mI5ABRDRilTxA1eE3TFzajfriBRLWZIQyw,4576
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
52
53
  cloudbeds_fiscal_document/models/latest_linked_document.py,sha256=alMqlYHkrAVOSapwUtGZ7_ypuoxvYKaIA5nBNd-xUSw,3392
53
54
  cloudbeds_fiscal_document/models/linked_document.py,sha256=XnJA3aUm7TT6g-lXv_lmKes1ZOh_fWRR07vH1zGKXYo,4269
54
55
  cloudbeds_fiscal_document/models/manual_recipient_request.py,sha256=MFtaIDqaOQkcJUrJpa-CerLGaVmlBt4CpdSPakG-T6M,6537
@@ -116,6 +117,7 @@ cloudbeds_fiscal_document/test/test_government_integration.py,sha256=ilDBQwbQro1
116
117
  cloudbeds_fiscal_document/test/test_government_integration_qr.py,sha256=UmMtFUyw_MRK61ehch5SOh1IfQWsCyo25sBAdzHQaCc,1546
117
118
  cloudbeds_fiscal_document/test/test_guest_document_type.py,sha256=8GE091ByoF9kR8NU-BvOA28TwJ6y9hMOLIeypxB91RQ,761
118
119
  cloudbeds_fiscal_document/test/test_guest_gender.py,sha256=al-YqFMnWSEQjuaX4bYEo3Rm23AhcZQSpPA7eQYq_nU,718
120
+ cloudbeds_fiscal_document/test/test_integration_signature.py,sha256=8i5GORxMLGOzRjZGWdVGF7xMjqsQlpG1VGX_U2J95c4,1686
119
121
  cloudbeds_fiscal_document/test/test_latest_linked_document.py,sha256=lLZMJlzSJWYEkyoYE3l1znOwG68DL5H2WKypY51hMBk,1688
120
122
  cloudbeds_fiscal_document/test/test_linked_document.py,sha256=sQACh20uixUFq5kKAHX3Xs-oi05W_URsrQkanr1q0K8,1695
121
123
  cloudbeds_fiscal_document/test/test_manual_recipient_request.py,sha256=2jCV25-MQQsGQvehxOwB1qzPP3Q1HLuK-bXYr_pTqUo,2628
@@ -140,8 +142,8 @@ cloudbeds_fiscal_document/test/test_single_allocation.py,sha256=Rt_83Z9sOzX021xE
140
142
  cloudbeds_fiscal_document/test/test_source_kind.py,sha256=Om-4SlTOpzbQNLcHIU6B0OwZ9vmVbRoRRd0KJUKUccY,711
141
143
  cloudbeds_fiscal_document/test/test_transaction_for_allocation_response.py,sha256=ziAZ8Qi_50EBl9PtgZPasRuSUL9GPMTkun6YTcfJBE0,2723
142
144
  cloudbeds_fiscal_document/test/test_transaction_status.py,sha256=XTzZUsjAoojQ1elLGJoe5CbUU-rxoTdiM8Q5uxv2vW8,760
143
- cloudbeds_fiscal_document-1.14.0.dist-info/licenses/LICENSE,sha256=noTWyG8XyfILgKHVxo6Z6mWjsXnUZ6AsqRY4pNTdBmg,1093
144
- cloudbeds_fiscal_document-1.14.0.dist-info/METADATA,sha256=AANkfm0AL7-e7iisvxRZ7pjUUw4zh8hFhePHSFOquyQ,18128
145
- cloudbeds_fiscal_document-1.14.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
146
- cloudbeds_fiscal_document-1.14.0.dist-info/top_level.txt,sha256=xDhbzDUymHSRPf7_v5yTWqDdIimGk-7zkWu1zHiL7kc,26
147
- cloudbeds_fiscal_document-1.14.0.dist-info/RECORD,,
145
+ cloudbeds_fiscal_document-1.15.0.dist-info/licenses/LICENSE,sha256=noTWyG8XyfILgKHVxo6Z6mWjsXnUZ6AsqRY4pNTdBmg,1093
146
+ cloudbeds_fiscal_document-1.15.0.dist-info/METADATA,sha256=RfeWjhfS7Mh_gGMwmfx6FFOXwKD9j3yqMK3cuM7rGb8,18210
147
+ cloudbeds_fiscal_document-1.15.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
148
+ cloudbeds_fiscal_document-1.15.0.dist-info/top_level.txt,sha256=xDhbzDUymHSRPf7_v5yTWqDdIimGk-7zkWu1zHiL7kc,26
149
+ cloudbeds_fiscal_document-1.15.0.dist-info/RECORD,,