cloudbeds-fiscal-document 1.9.2__py3-none-any.whl → 1.11.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.
Files changed (49) hide show
  1. cloudbeds_fiscal_document/__init__.py +5 -1
  2. cloudbeds_fiscal_document/api/configs_api.py +941 -92
  3. cloudbeds_fiscal_document/api/fiscal_documents_api.py +304 -3
  4. cloudbeds_fiscal_document/api_client.py +1 -1
  5. cloudbeds_fiscal_document/configuration.py +1 -1
  6. cloudbeds_fiscal_document/models/__init__.py +4 -0
  7. cloudbeds_fiscal_document/models/configs_response.py +13 -2
  8. cloudbeds_fiscal_document/models/configs_update_request.py +8 -2
  9. cloudbeds_fiscal_document/models/create_invoice_request.py +5 -3
  10. cloudbeds_fiscal_document/models/create_receipt_request.py +3 -5
  11. cloudbeds_fiscal_document/models/document_action.py +1 -0
  12. cloudbeds_fiscal_document/models/fiscal_document_detailed_response.py +5 -3
  13. cloudbeds_fiscal_document/models/fiscal_document_kind.py +1 -1
  14. cloudbeds_fiscal_document/models/get_invoice_preview_request.py +5 -3
  15. cloudbeds_fiscal_document/models/get_logo_response.py +87 -0
  16. cloudbeds_fiscal_document/models/government_integration.py +3 -5
  17. cloudbeds_fiscal_document/models/preview_request.py +102 -0
  18. cloudbeds_fiscal_document/models/property_configs_response.py +100 -0
  19. cloudbeds_fiscal_document/models/transaction_for_allocation_response.py +4 -1
  20. cloudbeds_fiscal_document/models/transaction_status.py +37 -0
  21. cloudbeds_fiscal_document/test/test_configs_api.py +28 -0
  22. cloudbeds_fiscal_document/test/test_configs_response.py +9 -1
  23. cloudbeds_fiscal_document/test/test_configs_update_request.py +12 -4
  24. cloudbeds_fiscal_document/test/test_create_credit_note_request.py +13 -6
  25. cloudbeds_fiscal_document/test/test_create_invoice_request.py +22 -8
  26. cloudbeds_fiscal_document/test/test_fiscal_document_detailed_response.py +32 -5
  27. cloudbeds_fiscal_document/test/test_fiscal_document_paginated.py +29 -7
  28. cloudbeds_fiscal_document/test/test_fiscal_document_patch_request.py +3 -1
  29. cloudbeds_fiscal_document/test/test_fiscal_document_recipient.py +25 -3
  30. cloudbeds_fiscal_document/test/test_fiscal_document_summary_response.py +2 -1
  31. cloudbeds_fiscal_document/test/test_fiscal_document_transaction_response.py +7 -1
  32. cloudbeds_fiscal_document/test/test_fiscal_document_transactions_for_allocation_paginated.py +1 -0
  33. cloudbeds_fiscal_document/test/test_fiscal_document_transactions_paginated.py +7 -1
  34. cloudbeds_fiscal_document/test/test_fiscal_documents_api.py +113 -1
  35. cloudbeds_fiscal_document/test/test_get_invoice_preview_request.py +2 -1
  36. cloudbeds_fiscal_document/test/test_get_logo_response.py +51 -0
  37. cloudbeds_fiscal_document/test/test_government_integration.py +2 -1
  38. cloudbeds_fiscal_document/test/test_preview_request.py +57 -0
  39. cloudbeds_fiscal_document/test/test_property_configs_response.py +84 -0
  40. cloudbeds_fiscal_document/test/test_recipient_details.py +4 -2
  41. cloudbeds_fiscal_document/test/test_recipient_tax_info.py +2 -1
  42. cloudbeds_fiscal_document/test/test_rectify_invoice_note_request.py +9 -0
  43. cloudbeds_fiscal_document/test/test_transaction_for_allocation_response.py +3 -1
  44. cloudbeds_fiscal_document/test/test_transaction_status.py +33 -0
  45. {cloudbeds_fiscal_document-1.9.2.dist-info → cloudbeds_fiscal_document-1.11.0.dist-info}/METADATA +13 -7
  46. {cloudbeds_fiscal_document-1.9.2.dist-info → cloudbeds_fiscal_document-1.11.0.dist-info}/RECORD +49 -41
  47. {cloudbeds_fiscal_document-1.9.2.dist-info → cloudbeds_fiscal_document-1.11.0.dist-info}/WHEEL +0 -0
  48. {cloudbeds_fiscal_document-1.9.2.dist-info → cloudbeds_fiscal_document-1.11.0.dist-info}/licenses/LICENSE +0 -0
  49. {cloudbeds_fiscal_document-1.9.2.dist-info → cloudbeds_fiscal_document-1.11.0.dist-info}/top_level.txt +0 -0
@@ -17,7 +17,7 @@ import pprint
17
17
  import re # noqa: F401
18
18
  import json
19
19
 
20
- from pydantic import BaseModel, ConfigDict, Field
20
+ from pydantic import BaseModel, ConfigDict, Field, StrictBool
21
21
  from typing import Any, ClassVar, Dict, List, Optional
22
22
  from typing_extensions import Annotated
23
23
  from cloudbeds_fiscal_document.models.recipient_request import RecipientRequest
@@ -38,7 +38,8 @@ class GetInvoicePreviewRequest(BaseModel):
38
38
  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
39
  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
40
  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
- __properties: ClassVar[List[str]] = ["transactionIds", "sourceId", "sequenceId", "sourceKind", "userId", "recipient", "folioIds", "excludeTransactionIds", "includeTransactionIds"]
41
+ simplified: Optional[StrictBool] = False
42
+ __properties: ClassVar[List[str]] = ["transactionIds", "sourceId", "sequenceId", "sourceKind", "userId", "recipient", "folioIds", "excludeTransactionIds", "includeTransactionIds", "simplified"]
42
43
 
43
44
  model_config = ConfigDict(
44
45
  populate_by_name=True,
@@ -112,7 +113,8 @@ class GetInvoicePreviewRequest(BaseModel):
112
113
  "recipient": RecipientRequest.from_dict(obj["recipient"]) if obj.get("recipient") is not None else None,
113
114
  "folioIds": obj.get("folioIds"),
114
115
  "excludeTransactionIds": obj.get("excludeTransactionIds"),
115
- "includeTransactionIds": obj.get("includeTransactionIds")
116
+ "includeTransactionIds": obj.get("includeTransactionIds"),
117
+ "simplified": obj.get("simplified") if obj.get("simplified") is not None else False
116
118
  })
117
119
  return _obj
118
120
 
@@ -0,0 +1,87 @@
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
21
+ from typing import Any, ClassVar, Dict, List, Optional
22
+ from typing import Optional, Set
23
+ from typing_extensions import Self
24
+
25
+ class GetLogoResponse(BaseModel):
26
+ """
27
+ GetLogoResponse
28
+ """ # noqa: E501
29
+ logo_url: Optional[StrictStr] = Field(default=None, description="Presigned URL to access the logo file", alias="logoUrl")
30
+ __properties: ClassVar[List[str]] = ["logoUrl"]
31
+
32
+ model_config = ConfigDict(
33
+ populate_by_name=True,
34
+ validate_assignment=True,
35
+ protected_namespaces=(),
36
+ )
37
+
38
+
39
+ def to_str(self) -> str:
40
+ """Returns the string representation of the model using alias"""
41
+ return pprint.pformat(self.model_dump(by_alias=True))
42
+
43
+ def to_json(self) -> str:
44
+ """Returns the JSON representation of the model using alias"""
45
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
46
+ return json.dumps(self.to_dict())
47
+
48
+ @classmethod
49
+ def from_json(cls, json_str: str) -> Optional[Self]:
50
+ """Create an instance of GetLogoResponse from a JSON string"""
51
+ return cls.from_dict(json.loads(json_str))
52
+
53
+ def to_dict(self) -> Dict[str, Any]:
54
+ """Return the dictionary representation of the model using alias.
55
+
56
+ This has the following differences from calling pydantic's
57
+ `self.model_dump(by_alias=True)`:
58
+
59
+ * `None` is only added to the output dict for nullable fields that
60
+ were set at model initialization. Other fields with value `None`
61
+ are ignored.
62
+ """
63
+ excluded_fields: Set[str] = set([
64
+ ])
65
+
66
+ _dict = self.model_dump(
67
+ by_alias=True,
68
+ exclude=excluded_fields,
69
+ exclude_none=True,
70
+ )
71
+ return _dict
72
+
73
+ @classmethod
74
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
75
+ """Create an instance of GetLogoResponse from a dict"""
76
+ if obj is None:
77
+ return None
78
+
79
+ if not isinstance(obj, dict):
80
+ return cls.model_validate(obj)
81
+
82
+ _obj = cls.model_validate({
83
+ "logoUrl": obj.get("logoUrl")
84
+ })
85
+ return _obj
86
+
87
+
@@ -17,7 +17,7 @@ import pprint
17
17
  import re # noqa: F401
18
18
  import json
19
19
 
20
- from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr
20
+ from pydantic import BaseModel, ConfigDict, Field, StrictStr
21
21
  from typing import Any, ClassVar, Dict, List, Optional
22
22
  from cloudbeds_fiscal_document.models.fiscal_document_status import FiscalDocumentStatus
23
23
  from cloudbeds_fiscal_document.models.government_integration_qr import GovernmentIntegrationQr
@@ -37,8 +37,7 @@ class GovernmentIntegration(BaseModel):
37
37
  external_id: Optional[StrictStr] = Field(default=None, alias="externalId")
38
38
  rectifying_invoice_type: Optional[StrictStr] = Field(default=None, alias="rectifyingInvoiceType")
39
39
  cancellation_failed_fallback_status: Optional[FiscalDocumentStatus] = Field(default=None, alias="cancellationFailedFallbackStatus")
40
- generate_receipt: Optional[StrictBool] = Field(default=None, description="Indicates if the receipt was generated/sent to fiscal printer", alias="generateReceipt")
41
- __properties: ClassVar[List[str]] = ["number", "series", "status", "qr", "url", "officialId", "externalId", "rectifyingInvoiceType", "cancellationFailedFallbackStatus", "generateReceipt"]
40
+ __properties: ClassVar[List[str]] = ["number", "series", "status", "qr", "url", "officialId", "externalId", "rectifyingInvoiceType", "cancellationFailedFallbackStatus"]
42
41
 
43
42
  model_config = ConfigDict(
44
43
  populate_by_name=True,
@@ -102,8 +101,7 @@ class GovernmentIntegration(BaseModel):
102
101
  "officialId": obj.get("officialId"),
103
102
  "externalId": obj.get("externalId"),
104
103
  "rectifyingInvoiceType": obj.get("rectifyingInvoiceType"),
105
- "cancellationFailedFallbackStatus": obj.get("cancellationFailedFallbackStatus"),
106
- "generateReceipt": obj.get("generateReceipt")
104
+ "cancellationFailedFallbackStatus": obj.get("cancellationFailedFallbackStatus")
107
105
  })
108
106
  return _obj
109
107
 
@@ -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
+
@@ -21,6 +21,7 @@ from datetime import datetime
21
21
  from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr
22
22
  from typing import Any, ClassVar, Dict, List, Optional, Union
23
23
  from cloudbeds_fiscal_document.models.source_kind import SourceKind
24
+ from cloudbeds_fiscal_document.models.transaction_status import TransactionStatus
24
25
  from typing import Optional, Set
25
26
  from typing_extensions import Self
26
27
 
@@ -37,8 +38,9 @@ class TransactionForAllocationResponse(BaseModel):
37
38
  internal_code: Optional[StrictStr] = Field(default=None, alias="internalCode")
38
39
  amount: Optional[Union[StrictFloat, StrictInt]] = None
39
40
  allocated_amount: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, alias="allocatedAmount")
41
+ status: Optional[TransactionStatus] = None
40
42
  taxes: Optional[List[TransactionForAllocationResponse]] = None
41
- __properties: ClassVar[List[str]] = ["id", "propertyId", "sourceId", "sourceKind", "transactionDate", "description", "internalCode", "amount", "allocatedAmount", "taxes"]
43
+ __properties: ClassVar[List[str]] = ["id", "propertyId", "sourceId", "sourceKind", "transactionDate", "description", "internalCode", "amount", "allocatedAmount", "status", "taxes"]
42
44
 
43
45
  model_config = ConfigDict(
44
46
  populate_by_name=True,
@@ -107,6 +109,7 @@ class TransactionForAllocationResponse(BaseModel):
107
109
  "internalCode": obj.get("internalCode"),
108
110
  "amount": obj.get("amount"),
109
111
  "allocatedAmount": obj.get("allocatedAmount"),
112
+ "status": obj.get("status"),
110
113
  "taxes": [TransactionForAllocationResponse.from_dict(_item) for _item in obj["taxes"]] if obj.get("taxes") is not None else None
111
114
  })
112
115
  return _obj
@@ -0,0 +1,37 @@
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 json
17
+ from enum import Enum
18
+ from typing_extensions import Self
19
+
20
+
21
+ class TransactionStatus(str, Enum):
22
+ """
23
+ Status for transactions
24
+ """
25
+
26
+ """
27
+ allowed enum values
28
+ """
29
+ POSTED = 'POSTED'
30
+ PENDING = 'PENDING'
31
+
32
+ @classmethod
33
+ def from_json(cls, json_str: str) -> Self:
34
+ """Create an instance of TransactionStatus from a JSON string"""
35
+ return cls(json.loads(json_str))
36
+
37
+
@@ -26,6 +26,13 @@ class TestConfigsApi(unittest.TestCase):
26
26
  def tearDown(self) -> None:
27
27
  pass
28
28
 
29
+ def test_delete_logo(self) -> None:
30
+ """Test case for delete_logo
31
+
32
+ Delete logo image for fiscal documents
33
+ """
34
+ pass
35
+
29
36
  def test_get_configs(self) -> None:
30
37
  """Test case for get_configs
31
38
 
@@ -33,6 +40,20 @@ class TestConfigsApi(unittest.TestCase):
33
40
  """
34
41
  pass
35
42
 
43
+ def test_get_logo(self) -> None:
44
+ """Test case for get_logo
45
+
46
+ Get logo image for fiscal documents
47
+ """
48
+ pass
49
+
50
+ def test_get_pdf_preview(self) -> None:
51
+ """Test case for get_pdf_preview
52
+
53
+ Get PDF document preview
54
+ """
55
+ pass
56
+
36
57
  def test_update_configs(self) -> None:
37
58
  """Test case for update_configs
38
59
 
@@ -40,6 +61,13 @@ class TestConfigsApi(unittest.TestCase):
40
61
  """
41
62
  pass
42
63
 
64
+ def test_upload_logo(self) -> None:
65
+ """Test case for upload_logo
66
+
67
+ Upload logo image for fiscal documents
68
+ """
69
+ pass
70
+
43
71
 
44
72
  if __name__ == '__main__':
45
73
  unittest.main()
@@ -38,6 +38,7 @@ class TestConfigsResponse(unittest.TestCase):
38
38
  property_id = '',
39
39
  document_kind = 'INVOICE',
40
40
  show_detailed_tax_fee = True,
41
+ show_credit_notes_and_receipts = True,
41
42
  charge_breakdown = True,
42
43
  use_guest_lang = True,
43
44
  due_days = 56,
@@ -57,7 +58,14 @@ class TestConfigsResponse(unittest.TestCase):
57
58
  cpf = '',
58
59
  custom_text = {
59
60
  'key' : ''
60
- }
61
+ },
62
+ create_invoice_on_allocation = True,
63
+ trigger_events = [
64
+ 'manual'
65
+ ],
66
+ update_invoice_on_link_document = True,
67
+ use_invoice_document_settings = True,
68
+ use_invoice_title_and_numbering = True
61
69
  )
62
70
  else:
63
71
  return ConfigsResponse(
@@ -35,27 +35,35 @@ class TestConfigsUpdateRequest(unittest.TestCase):
35
35
  model = ConfigsUpdateRequest()
36
36
  if include_optional:
37
37
  return ConfigsUpdateRequest(
38
+ trigger_events = [
39
+ 'manual'
40
+ ],
38
41
  show_detailed_tax_fee = True,
39
42
  charge_breakdown = True,
40
43
  use_guest_lang = True,
41
44
  due_days = 56,
45
+ sequence_start_number = 1,
42
46
  lang = '',
43
47
  prefix = '',
44
48
  suffix = '',
45
49
  legal_company_name = '',
46
- title = {
47
- 'key' : ''
48
- },
50
+ title = {"en":"Invoice","es":"Factura"},
49
51
  show_legal_company_name = True,
50
52
  include_room_number = True,
51
53
  use_document_number = True,
54
+ create_invoice_on_allocation = True,
55
+ update_invoice_on_link_document = True,
52
56
  is_compact = True,
57
+ use_invoice_title_and_numbering = True,
58
+ use_invoice_document_settings = True,
59
+ show_credit_notes_and_receipts = True,
53
60
  tax_id1 = '',
54
61
  tax_id2 = '',
55
62
  cpf = '',
56
63
  custom_text = {
57
64
  'key' : ''
58
- }
65
+ },
66
+ logo_id = 56
59
67
  )
60
68
  else:
61
69
  return ConfigsUpdateRequest(
@@ -35,21 +35,28 @@ class TestCreateCreditNoteRequest(unittest.TestCase):
35
35
  model = CreateCreditNoteRequest()
36
36
  if include_optional:
37
37
  return CreateCreditNoteRequest(
38
- sequence_id = 56,
39
- invoice_id = 56,
38
+ sequence_id = 1,
39
+ invoice_id = 1,
40
40
  reason = '',
41
- user_id = 56,
41
+ user_id = 0,
42
42
  method = 'VOID',
43
43
  transaction_ids = [
44
44
  56
45
45
  ],
46
- guest_id = 56
46
+ folio_ids = [
47
+ 56
48
+ ],
49
+ exclude_transaction_ids = [
50
+ 56
51
+ ],
52
+ include_transaction_ids = [
53
+ 56
54
+ ]
47
55
  )
48
56
  else:
49
57
  return CreateCreditNoteRequest(
50
- invoice_id = 56,
58
+ invoice_id = 1,
51
59
  method = 'VOID',
52
- guest_id = 56,
53
60
  )
54
61
  """
55
62
 
@@ -36,22 +36,36 @@ class TestCreateInvoiceRequest(unittest.TestCase):
36
36
  if include_optional:
37
37
  return CreateInvoiceRequest(
38
38
  transaction_ids = [
39
- 56
39
+ 1
40
40
  ],
41
- source_id = 56,
42
- sequence_id = 56,
41
+ source_id = 1,
42
+ sequence_id = 1,
43
43
  source_kind = 'GROUP_PROFILE',
44
- user_id = 56,
45
- guest_id = 56
44
+ user_id = 0,
45
+ recipient = cloudbeds_fiscal_document.models.recipient_request.RecipientRequest(
46
+ type = 'GUEST',
47
+ id = 1, ),
48
+ folio_ids = [
49
+ 1
50
+ ],
51
+ exclude_transaction_ids = [
52
+ 1
53
+ ],
54
+ include_transaction_ids = [
55
+ 1
56
+ ],
57
+ simplified = True
46
58
  )
47
59
  else:
48
60
  return CreateInvoiceRequest(
49
61
  transaction_ids = [
50
- 56
62
+ 1
51
63
  ],
52
- source_id = 56,
64
+ source_id = 1,
53
65
  source_kind = 'GROUP_PROFILE',
54
- guest_id = 56,
66
+ recipient = cloudbeds_fiscal_document.models.recipient_request.RecipientRequest(
67
+ type = 'GUEST',
68
+ id = 1, ),
55
69
  )
56
70
  """
57
71