cloudbeds-fiscal-document 1.9.1__py3-none-any.whl → 1.10.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- cloudbeds_fiscal_document/__init__.py +7 -1
- cloudbeds_fiscal_document/api/configs_api.py +941 -92
- cloudbeds_fiscal_document/api/fiscal_documents_api.py +1160 -160
- 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/allocations_data.py +104 -0
- cloudbeds_fiscal_document/models/configs_response.py +13 -2
- cloudbeds_fiscal_document/models/configs_update_request.py +3 -1
- cloudbeds_fiscal_document/models/create_invoice_request.py +5 -3
- cloudbeds_fiscal_document/models/document_action.py +2 -0
- cloudbeds_fiscal_document/models/fiscal_document_detailed_response.py +5 -3
- cloudbeds_fiscal_document/models/fiscal_document_kind.py +1 -0
- cloudbeds_fiscal_document/models/fiscal_document_transaction_allocation.py +87 -0
- cloudbeds_fiscal_document/models/fiscal_document_transaction_response.py +13 -12
- cloudbeds_fiscal_document/models/get_invoice_preview_request.py +5 -3
- cloudbeds_fiscal_document/models/get_logo_response.py +87 -0
- cloudbeds_fiscal_document/models/preview_request.py +102 -0
- cloudbeds_fiscal_document/models/property_configs_response.py +100 -0
- cloudbeds_fiscal_document/models/single_allocation.py +89 -0
- cloudbeds_fiscal_document/test/test_allocations_data.py +59 -0
- cloudbeds_fiscal_document/test/test_fiscal_document_transaction_allocation.py +51 -0
- cloudbeds_fiscal_document/test/test_get_logo_response.py +51 -0
- cloudbeds_fiscal_document/test/test_preview_request.py +57 -0
- cloudbeds_fiscal_document/test/test_property_configs_response.py +84 -0
- cloudbeds_fiscal_document/test/test_single_allocation.py +52 -0
- {cloudbeds_fiscal_document-1.9.1.dist-info → cloudbeds_fiscal_document-1.10.0.dist-info}/METADATA +17 -7
- {cloudbeds_fiscal_document-1.9.1.dist-info → cloudbeds_fiscal_document-1.10.0.dist-info}/RECORD +31 -19
- {cloudbeds_fiscal_document-1.9.1.dist-info → cloudbeds_fiscal_document-1.10.0.dist-info}/WHEEL +0 -0
- {cloudbeds_fiscal_document-1.9.1.dist-info → cloudbeds_fiscal_document-1.10.0.dist-info}/licenses/LICENSE +0 -0
- {cloudbeds_fiscal_document-1.9.1.dist-info → cloudbeds_fiscal_document-1.10.0.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,102 @@
|
|
|
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, StrictBool
|
|
21
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
22
|
+
from cloudbeds_fiscal_document.models.fiscal_document_kind import FiscalDocumentKind
|
|
23
|
+
from cloudbeds_fiscal_document.models.recipient_type import RecipientType
|
|
24
|
+
from cloudbeds_fiscal_document.models.source_kind import SourceKind
|
|
25
|
+
from typing import Optional, Set
|
|
26
|
+
from typing_extensions import Self
|
|
27
|
+
|
|
28
|
+
class PreviewRequest(BaseModel):
|
|
29
|
+
"""
|
|
30
|
+
PreviewRequest
|
|
31
|
+
""" # noqa: E501
|
|
32
|
+
document_kind: Optional[FiscalDocumentKind] = Field(default=None, alias="documentKind")
|
|
33
|
+
source_kind: Optional[SourceKind] = Field(default=None, alias="sourceKind")
|
|
34
|
+
recipient_type: Optional[RecipientType] = Field(default=None, alias="recipientType")
|
|
35
|
+
include_vat: Optional[StrictBool] = Field(default=False, description="Include VAT tax breakdown section in preview", alias="includeVat")
|
|
36
|
+
include_payments: Optional[StrictBool] = Field(default=True, description="Include payment transactions section in preview", alias="includePayments")
|
|
37
|
+
include_room_number: Optional[StrictBool] = Field(default=True, description="Include room number column in reservation previews", alias="includeRoomNumber")
|
|
38
|
+
preview_watermark: Optional[StrictBool] = Field(default=True, description="Show preview watermark on the document", alias="previewWatermark")
|
|
39
|
+
__properties: ClassVar[List[str]] = ["documentKind", "sourceKind", "recipientType", "includeVat", "includePayments", "includeRoomNumber", "previewWatermark"]
|
|
40
|
+
|
|
41
|
+
model_config = ConfigDict(
|
|
42
|
+
populate_by_name=True,
|
|
43
|
+
validate_assignment=True,
|
|
44
|
+
protected_namespaces=(),
|
|
45
|
+
)
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
def to_str(self) -> str:
|
|
49
|
+
"""Returns the string representation of the model using alias"""
|
|
50
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
51
|
+
|
|
52
|
+
def to_json(self) -> str:
|
|
53
|
+
"""Returns the JSON representation of the model using alias"""
|
|
54
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
55
|
+
return json.dumps(self.to_dict())
|
|
56
|
+
|
|
57
|
+
@classmethod
|
|
58
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
59
|
+
"""Create an instance of PreviewRequest from a JSON string"""
|
|
60
|
+
return cls.from_dict(json.loads(json_str))
|
|
61
|
+
|
|
62
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
63
|
+
"""Return the dictionary representation of the model using alias.
|
|
64
|
+
|
|
65
|
+
This has the following differences from calling pydantic's
|
|
66
|
+
`self.model_dump(by_alias=True)`:
|
|
67
|
+
|
|
68
|
+
* `None` is only added to the output dict for nullable fields that
|
|
69
|
+
were set at model initialization. Other fields with value `None`
|
|
70
|
+
are ignored.
|
|
71
|
+
"""
|
|
72
|
+
excluded_fields: Set[str] = set([
|
|
73
|
+
])
|
|
74
|
+
|
|
75
|
+
_dict = self.model_dump(
|
|
76
|
+
by_alias=True,
|
|
77
|
+
exclude=excluded_fields,
|
|
78
|
+
exclude_none=True,
|
|
79
|
+
)
|
|
80
|
+
return _dict
|
|
81
|
+
|
|
82
|
+
@classmethod
|
|
83
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
84
|
+
"""Create an instance of PreviewRequest from a dict"""
|
|
85
|
+
if obj is None:
|
|
86
|
+
return None
|
|
87
|
+
|
|
88
|
+
if not isinstance(obj, dict):
|
|
89
|
+
return cls.model_validate(obj)
|
|
90
|
+
|
|
91
|
+
_obj = cls.model_validate({
|
|
92
|
+
"documentKind": obj.get("documentKind"),
|
|
93
|
+
"sourceKind": obj.get("sourceKind"),
|
|
94
|
+
"recipientType": obj.get("recipientType"),
|
|
95
|
+
"includeVat": obj.get("includeVat") if obj.get("includeVat") is not None else False,
|
|
96
|
+
"includePayments": obj.get("includePayments") if obj.get("includePayments") is not None else True,
|
|
97
|
+
"includeRoomNumber": obj.get("includeRoomNumber") if obj.get("includeRoomNumber") is not None else True,
|
|
98
|
+
"previewWatermark": obj.get("previewWatermark") if obj.get("previewWatermark") is not None else True
|
|
99
|
+
})
|
|
100
|
+
return _obj
|
|
101
|
+
|
|
102
|
+
|
|
@@ -0,0 +1,100 @@
|
|
|
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
|
|
21
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
22
|
+
from cloudbeds_fiscal_document.models.configs_response import ConfigsResponse
|
|
23
|
+
from typing import Optional, Set
|
|
24
|
+
from typing_extensions import Self
|
|
25
|
+
|
|
26
|
+
class PropertyConfigsResponse(BaseModel):
|
|
27
|
+
"""
|
|
28
|
+
PropertyConfigsResponse
|
|
29
|
+
""" # noqa: E501
|
|
30
|
+
configs: Optional[Dict[str, ConfigsResponse]] = Field(default=None, description="Map of document kind to fiscal document configuration")
|
|
31
|
+
__properties: ClassVar[List[str]] = ["configs"]
|
|
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 PropertyConfigsResponse 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 value in configs (dict)
|
|
73
|
+
_field_dict = {}
|
|
74
|
+
if self.configs:
|
|
75
|
+
for _key_configs in self.configs:
|
|
76
|
+
if self.configs[_key_configs]:
|
|
77
|
+
_field_dict[_key_configs] = self.configs[_key_configs].to_dict()
|
|
78
|
+
_dict['configs'] = _field_dict
|
|
79
|
+
return _dict
|
|
80
|
+
|
|
81
|
+
@classmethod
|
|
82
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
83
|
+
"""Create an instance of PropertyConfigsResponse 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
|
+
"configs": dict(
|
|
92
|
+
(_k, ConfigsResponse.from_dict(_v))
|
|
93
|
+
for _k, _v in obj["configs"].items()
|
|
94
|
+
)
|
|
95
|
+
if obj.get("configs") is not None
|
|
96
|
+
else None
|
|
97
|
+
})
|
|
98
|
+
return _obj
|
|
99
|
+
|
|
100
|
+
|
|
@@ -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, 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 SingleAllocation(BaseModel):
|
|
26
|
+
"""
|
|
27
|
+
SingleAllocation
|
|
28
|
+
""" # noqa: E501
|
|
29
|
+
transaction_id: Optional[StrictInt] = None
|
|
30
|
+
allocated_amount: Optional[Union[StrictFloat, StrictInt]] = None
|
|
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 SingleAllocation 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 SingleAllocation 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
|
+
|
|
@@ -0,0 +1,59 @@
|
|
|
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.allocations_data import AllocationsData
|
|
18
|
+
|
|
19
|
+
class TestAllocationsData(unittest.TestCase):
|
|
20
|
+
"""AllocationsData 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) -> AllocationsData:
|
|
29
|
+
"""Test AllocationsData
|
|
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 `AllocationsData`
|
|
34
|
+
"""
|
|
35
|
+
model = AllocationsData()
|
|
36
|
+
if include_optional:
|
|
37
|
+
return AllocationsData(
|
|
38
|
+
receipt_id = 8878321883381,
|
|
39
|
+
source_id = 8878321883383,
|
|
40
|
+
source_identifier = 'HGJXJF',
|
|
41
|
+
source_kind = 'GROUP_PROFILE',
|
|
42
|
+
allocations = [
|
|
43
|
+
cloudbeds_fiscal_document.models.single_allocation.SingleAllocation(
|
|
44
|
+
transaction_id = 8878321883388,
|
|
45
|
+
allocated_amount = 3.68, )
|
|
46
|
+
]
|
|
47
|
+
)
|
|
48
|
+
else:
|
|
49
|
+
return AllocationsData(
|
|
50
|
+
)
|
|
51
|
+
"""
|
|
52
|
+
|
|
53
|
+
def testAllocationsData(self):
|
|
54
|
+
"""Test AllocationsData"""
|
|
55
|
+
# inst_req_only = self.make_instance(include_optional=False)
|
|
56
|
+
# inst_req_and_optional = self.make_instance(include_optional=True)
|
|
57
|
+
|
|
58
|
+
if __name__ == '__main__':
|
|
59
|
+
unittest.main()
|
|
@@ -0,0 +1,51 @@
|
|
|
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.fiscal_document_transaction_allocation import FiscalDocumentTransactionAllocation
|
|
18
|
+
|
|
19
|
+
class TestFiscalDocumentTransactionAllocation(unittest.TestCase):
|
|
20
|
+
"""FiscalDocumentTransactionAllocation 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) -> FiscalDocumentTransactionAllocation:
|
|
29
|
+
"""Test FiscalDocumentTransactionAllocation
|
|
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 `FiscalDocumentTransactionAllocation`
|
|
34
|
+
"""
|
|
35
|
+
model = FiscalDocumentTransactionAllocation()
|
|
36
|
+
if include_optional:
|
|
37
|
+
return FiscalDocumentTransactionAllocation(
|
|
38
|
+
receipt_number = ''
|
|
39
|
+
)
|
|
40
|
+
else:
|
|
41
|
+
return FiscalDocumentTransactionAllocation(
|
|
42
|
+
)
|
|
43
|
+
"""
|
|
44
|
+
|
|
45
|
+
def testFiscalDocumentTransactionAllocation(self):
|
|
46
|
+
"""Test FiscalDocumentTransactionAllocation"""
|
|
47
|
+
# inst_req_only = self.make_instance(include_optional=False)
|
|
48
|
+
# inst_req_and_optional = self.make_instance(include_optional=True)
|
|
49
|
+
|
|
50
|
+
if __name__ == '__main__':
|
|
51
|
+
unittest.main()
|
|
@@ -0,0 +1,51 @@
|
|
|
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.get_logo_response import GetLogoResponse
|
|
18
|
+
|
|
19
|
+
class TestGetLogoResponse(unittest.TestCase):
|
|
20
|
+
"""GetLogoResponse 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) -> GetLogoResponse:
|
|
29
|
+
"""Test GetLogoResponse
|
|
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 `GetLogoResponse`
|
|
34
|
+
"""
|
|
35
|
+
model = GetLogoResponse()
|
|
36
|
+
if include_optional:
|
|
37
|
+
return GetLogoResponse(
|
|
38
|
+
logo_url = ''
|
|
39
|
+
)
|
|
40
|
+
else:
|
|
41
|
+
return GetLogoResponse(
|
|
42
|
+
)
|
|
43
|
+
"""
|
|
44
|
+
|
|
45
|
+
def testGetLogoResponse(self):
|
|
46
|
+
"""Test GetLogoResponse"""
|
|
47
|
+
# inst_req_only = self.make_instance(include_optional=False)
|
|
48
|
+
# inst_req_and_optional = self.make_instance(include_optional=True)
|
|
49
|
+
|
|
50
|
+
if __name__ == '__main__':
|
|
51
|
+
unittest.main()
|
|
@@ -0,0 +1,57 @@
|
|
|
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.preview_request import PreviewRequest
|
|
18
|
+
|
|
19
|
+
class TestPreviewRequest(unittest.TestCase):
|
|
20
|
+
"""PreviewRequest 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) -> PreviewRequest:
|
|
29
|
+
"""Test PreviewRequest
|
|
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 `PreviewRequest`
|
|
34
|
+
"""
|
|
35
|
+
model = PreviewRequest()
|
|
36
|
+
if include_optional:
|
|
37
|
+
return PreviewRequest(
|
|
38
|
+
document_kind = 'INVOICE',
|
|
39
|
+
source_kind = 'GROUP_PROFILE',
|
|
40
|
+
recipient_type = 'COMPANY',
|
|
41
|
+
include_vat = True,
|
|
42
|
+
include_payments = True,
|
|
43
|
+
include_room_number = True,
|
|
44
|
+
preview_watermark = True
|
|
45
|
+
)
|
|
46
|
+
else:
|
|
47
|
+
return PreviewRequest(
|
|
48
|
+
)
|
|
49
|
+
"""
|
|
50
|
+
|
|
51
|
+
def testPreviewRequest(self):
|
|
52
|
+
"""Test PreviewRequest"""
|
|
53
|
+
# inst_req_only = self.make_instance(include_optional=False)
|
|
54
|
+
# inst_req_and_optional = self.make_instance(include_optional=True)
|
|
55
|
+
|
|
56
|
+
if __name__ == '__main__':
|
|
57
|
+
unittest.main()
|
|
@@ -0,0 +1,84 @@
|
|
|
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.property_configs_response import PropertyConfigsResponse
|
|
18
|
+
|
|
19
|
+
class TestPropertyConfigsResponse(unittest.TestCase):
|
|
20
|
+
"""PropertyConfigsResponse 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) -> PropertyConfigsResponse:
|
|
29
|
+
"""Test PropertyConfigsResponse
|
|
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 `PropertyConfigsResponse`
|
|
34
|
+
"""
|
|
35
|
+
model = PropertyConfigsResponse()
|
|
36
|
+
if include_optional:
|
|
37
|
+
return PropertyConfigsResponse(
|
|
38
|
+
configs = {
|
|
39
|
+
'key' : cloudbeds_fiscal_document.models.configs_response.ConfigsResponse(
|
|
40
|
+
property_id = '',
|
|
41
|
+
document_kind = 'INVOICE',
|
|
42
|
+
show_detailed_tax_fee = True,
|
|
43
|
+
show_credit_notes_and_receipts = True,
|
|
44
|
+
charge_breakdown = True,
|
|
45
|
+
use_guest_lang = True,
|
|
46
|
+
due_days = 56,
|
|
47
|
+
lang = '',
|
|
48
|
+
prefix = '',
|
|
49
|
+
suffix = '',
|
|
50
|
+
legal_company_name = '',
|
|
51
|
+
title = {
|
|
52
|
+
'key' : ''
|
|
53
|
+
},
|
|
54
|
+
show_legal_company_name = True,
|
|
55
|
+
include_room_number = True,
|
|
56
|
+
use_document_number = True,
|
|
57
|
+
is_compact = True,
|
|
58
|
+
tax_id1 = '',
|
|
59
|
+
tax_id2 = '',
|
|
60
|
+
cpf = '',
|
|
61
|
+
custom_text = {
|
|
62
|
+
'key' : ''
|
|
63
|
+
},
|
|
64
|
+
create_invoice_on_allocation = True,
|
|
65
|
+
trigger_events = [
|
|
66
|
+
'manual'
|
|
67
|
+
],
|
|
68
|
+
update_invoice_on_link_document = True,
|
|
69
|
+
use_invoice_document_settings = True,
|
|
70
|
+
use_invoice_title_and_numbering = True, )
|
|
71
|
+
}
|
|
72
|
+
)
|
|
73
|
+
else:
|
|
74
|
+
return PropertyConfigsResponse(
|
|
75
|
+
)
|
|
76
|
+
"""
|
|
77
|
+
|
|
78
|
+
def testPropertyConfigsResponse(self):
|
|
79
|
+
"""Test PropertyConfigsResponse"""
|
|
80
|
+
# inst_req_only = self.make_instance(include_optional=False)
|
|
81
|
+
# inst_req_and_optional = self.make_instance(include_optional=True)
|
|
82
|
+
|
|
83
|
+
if __name__ == '__main__':
|
|
84
|
+
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.single_allocation import SingleAllocation
|
|
18
|
+
|
|
19
|
+
class TestSingleAllocation(unittest.TestCase):
|
|
20
|
+
"""SingleAllocation 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) -> SingleAllocation:
|
|
29
|
+
"""Test SingleAllocation
|
|
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 `SingleAllocation`
|
|
34
|
+
"""
|
|
35
|
+
model = SingleAllocation()
|
|
36
|
+
if include_optional:
|
|
37
|
+
return SingleAllocation(
|
|
38
|
+
transaction_id = 8878321883388,
|
|
39
|
+
allocated_amount = 3.68
|
|
40
|
+
)
|
|
41
|
+
else:
|
|
42
|
+
return SingleAllocation(
|
|
43
|
+
)
|
|
44
|
+
"""
|
|
45
|
+
|
|
46
|
+
def testSingleAllocation(self):
|
|
47
|
+
"""Test SingleAllocation"""
|
|
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()
|