cloudbeds-fiscal-document 1.12.0__py3-none-any.whl → 1.13.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 (48) hide show
  1. cloudbeds_fiscal_document/__init__.py +8 -1
  2. cloudbeds_fiscal_document/api/__init__.py +1 -0
  3. cloudbeds_fiscal_document/api/export_api.py +343 -0
  4. cloudbeds_fiscal_document/api_client.py +1 -1
  5. cloudbeds_fiscal_document/configuration.py +1 -1
  6. cloudbeds_fiscal_document/models/__init__.py +6 -0
  7. cloudbeds_fiscal_document/models/configs_response.py +5 -1
  8. cloudbeds_fiscal_document/models/configs_update_request.py +10 -1
  9. cloudbeds_fiscal_document/models/create_invoice_request.py +12 -3
  10. cloudbeds_fiscal_document/models/create_receipt_request.py +12 -4
  11. cloudbeds_fiscal_document/models/create_simple_receipt_request.py +8 -2
  12. cloudbeds_fiscal_document/models/get_folio_export_request.py +111 -0
  13. cloudbeds_fiscal_document/models/get_invoice_preview_request.py +12 -3
  14. cloudbeds_fiscal_document/models/government_integration.py +6 -4
  15. cloudbeds_fiscal_document/models/guest_document_type.py +41 -0
  16. cloudbeds_fiscal_document/models/guest_gender.py +38 -0
  17. cloudbeds_fiscal_document/models/manual_recipient_request.py +162 -0
  18. cloudbeds_fiscal_document/models/manual_recipient_request_address.py +127 -0
  19. cloudbeds_fiscal_document/models/manual_recipient_request_document.py +117 -0
  20. cloudbeds_fiscal_document/models/recipient_request.py +17 -5
  21. cloudbeds_fiscal_document/models/recipient_type.py +1 -0
  22. cloudbeds_fiscal_document/test/test_configs_response.py +2 -1
  23. cloudbeds_fiscal_document/test/test_configs_update_request.py +2 -1
  24. cloudbeds_fiscal_document/test/test_create_invoice_request.py +26 -5
  25. cloudbeds_fiscal_document/test/test_create_receipt_request.py +25 -4
  26. cloudbeds_fiscal_document/test/test_create_simple_receipt_request.py +26 -2
  27. cloudbeds_fiscal_document/test/test_export_api.py +38 -0
  28. cloudbeds_fiscal_document/test/test_fiscal_document_detailed_response.py +2 -1
  29. cloudbeds_fiscal_document/test/test_fiscal_document_paginated.py +2 -1
  30. cloudbeds_fiscal_document/test/test_fiscal_document_patch_request.py +2 -1
  31. cloudbeds_fiscal_document/test/test_fiscal_document_summary_response.py +2 -1
  32. cloudbeds_fiscal_document/test/test_get_folio_export_request.py +60 -0
  33. cloudbeds_fiscal_document/test/test_get_invoice_preview_request.py +26 -5
  34. cloudbeds_fiscal_document/test/test_government_integration.py +2 -1
  35. cloudbeds_fiscal_document/test/test_guest_document_type.py +33 -0
  36. cloudbeds_fiscal_document/test/test_guest_gender.py +33 -0
  37. cloudbeds_fiscal_document/test/test_manual_recipient_request.py +74 -0
  38. cloudbeds_fiscal_document/test/test_manual_recipient_request_address.py +56 -0
  39. cloudbeds_fiscal_document/test/test_manual_recipient_request_document.py +55 -0
  40. cloudbeds_fiscal_document/test/test_pro_forma_invoice_preview_request.py +4 -2
  41. cloudbeds_fiscal_document/test/test_pro_forma_invoice_request.py +4 -2
  42. cloudbeds_fiscal_document/test/test_property_configs_response.py +2 -1
  43. cloudbeds_fiscal_document/test/test_recipient_request.py +2 -1
  44. {cloudbeds_fiscal_document-1.12.0.dist-info → cloudbeds_fiscal_document-1.13.0.dist-info}/METADATA +9 -2
  45. {cloudbeds_fiscal_document-1.12.0.dist-info → cloudbeds_fiscal_document-1.13.0.dist-info}/RECORD +48 -34
  46. {cloudbeds_fiscal_document-1.12.0.dist-info → cloudbeds_fiscal_document-1.13.0.dist-info}/WHEEL +0 -0
  47. {cloudbeds_fiscal_document-1.12.0.dist-info → cloudbeds_fiscal_document-1.13.0.dist-info}/licenses/LICENSE +0 -0
  48. {cloudbeds_fiscal_document-1.12.0.dist-info → cloudbeds_fiscal_document-1.13.0.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,117 @@
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 datetime import date
21
+ from pydantic import BaseModel, ConfigDict, Field, StrictStr
22
+ from typing import Any, ClassVar, Dict, List, Optional
23
+ from cloudbeds_fiscal_document.models.guest_document_type import GuestDocumentType
24
+ from typing import Optional, Set
25
+ from typing_extensions import Self
26
+
27
+ class ManualRecipientRequestDocument(BaseModel):
28
+ """
29
+ ManualRecipientRequestDocument
30
+ """ # noqa: E501
31
+ type: Optional[GuestDocumentType] = None
32
+ number: Optional[StrictStr] = Field(default=None, description="Document number")
33
+ issue_date: Optional[date] = Field(default=None, description="Document issue date", alias="issueDate")
34
+ issuing_country: Optional[StrictStr] = Field(default=None, description="Country that issued the document", alias="issuingCountry")
35
+ expiration_date: Optional[date] = Field(default=None, description="Document expiration date", alias="expirationDate")
36
+ __properties: ClassVar[List[str]] = ["type", "number", "issueDate", "issuingCountry", "expirationDate"]
37
+
38
+ model_config = ConfigDict(
39
+ populate_by_name=True,
40
+ validate_assignment=True,
41
+ protected_namespaces=(),
42
+ )
43
+
44
+
45
+ def to_str(self) -> str:
46
+ """Returns the string representation of the model using alias"""
47
+ return pprint.pformat(self.model_dump(by_alias=True))
48
+
49
+ def to_json(self) -> str:
50
+ """Returns the JSON representation of the model using alias"""
51
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
52
+ return json.dumps(self.to_dict())
53
+
54
+ @classmethod
55
+ def from_json(cls, json_str: str) -> Optional[Self]:
56
+ """Create an instance of ManualRecipientRequestDocument from a JSON string"""
57
+ return cls.from_dict(json.loads(json_str))
58
+
59
+ def to_dict(self) -> Dict[str, Any]:
60
+ """Return the dictionary representation of the model using alias.
61
+
62
+ This has the following differences from calling pydantic's
63
+ `self.model_dump(by_alias=True)`:
64
+
65
+ * `None` is only added to the output dict for nullable fields that
66
+ were set at model initialization. Other fields with value `None`
67
+ are ignored.
68
+ """
69
+ excluded_fields: Set[str] = set([
70
+ ])
71
+
72
+ _dict = self.model_dump(
73
+ by_alias=True,
74
+ exclude=excluded_fields,
75
+ exclude_none=True,
76
+ )
77
+ # set to None if number (nullable) is None
78
+ # and model_fields_set contains the field
79
+ if self.number is None and "number" in self.model_fields_set:
80
+ _dict['number'] = None
81
+
82
+ # set to None if issue_date (nullable) is None
83
+ # and model_fields_set contains the field
84
+ if self.issue_date is None and "issue_date" in self.model_fields_set:
85
+ _dict['issueDate'] = None
86
+
87
+ # set to None if issuing_country (nullable) is None
88
+ # and model_fields_set contains the field
89
+ if self.issuing_country is None and "issuing_country" in self.model_fields_set:
90
+ _dict['issuingCountry'] = None
91
+
92
+ # set to None if expiration_date (nullable) is None
93
+ # and model_fields_set contains the field
94
+ if self.expiration_date is None and "expiration_date" in self.model_fields_set:
95
+ _dict['expirationDate'] = None
96
+
97
+ return _dict
98
+
99
+ @classmethod
100
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
101
+ """Create an instance of ManualRecipientRequestDocument from a dict"""
102
+ if obj is None:
103
+ return None
104
+
105
+ if not isinstance(obj, dict):
106
+ return cls.model_validate(obj)
107
+
108
+ _obj = cls.model_validate({
109
+ "type": obj.get("type"),
110
+ "number": obj.get("number"),
111
+ "issueDate": obj.get("issueDate"),
112
+ "issuingCountry": obj.get("issuingCountry"),
113
+ "expirationDate": obj.get("expirationDate")
114
+ })
115
+ return _obj
116
+
117
+
@@ -18,7 +18,7 @@ import re # noqa: F401
18
18
  import json
19
19
 
20
20
  from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator
21
- from typing import Any, ClassVar, Dict, List
21
+ from typing import Any, ClassVar, Dict, List, Optional
22
22
  from typing_extensions import Annotated
23
23
  from typing import Optional, Set
24
24
  from typing_extensions import Self
@@ -29,13 +29,24 @@ class RecipientRequest(BaseModel):
29
29
  """ # noqa: E501
30
30
  type: StrictStr = Field(description="Type of the recipient.")
31
31
  id: Annotated[int, Field(strict=True, ge=1)] = Field(description="ID of the recipient, references guestId, contactId, groupId, etc. depending on type.")
32
- __properties: ClassVar[List[str]] = ["type", "id"]
32
+ tax_document_source: Optional[StrictStr] = Field(default=None, description="Source of the tax document number.", alias="taxDocumentSource")
33
+ __properties: ClassVar[List[str]] = ["type", "id", "taxDocumentSource"]
33
34
 
34
35
  @field_validator('type')
35
36
  def type_validate_enum(cls, value):
36
37
  """Validates the enum"""
37
- if value not in set(['GUEST', 'CONTACT', 'GROUP', 'COMPANY']):
38
- raise ValueError("must be one of enum values ('GUEST', 'CONTACT', 'GROUP', 'COMPANY')")
38
+ if value not in set(['GUEST', 'CONTACT', 'GROUP', 'COMPANY', 'GROUP_PROFILE', 'GROUP_PROFILE_CONTACT']):
39
+ raise ValueError("must be one of enum values ('GUEST', 'CONTACT', 'GROUP', 'COMPANY', 'GROUP_PROFILE', 'GROUP_PROFILE_CONTACT')")
40
+ return value
41
+
42
+ @field_validator('tax_document_source')
43
+ def tax_document_source_validate_enum(cls, value):
44
+ """Validates the enum"""
45
+ if value is None:
46
+ return value
47
+
48
+ if value not in set(['GUEST_TAX_ID', 'GUEST_DOCUMENT_NUMBER']):
49
+ raise ValueError("must be one of enum values ('GUEST_TAX_ID', 'GUEST_DOCUMENT_NUMBER')")
39
50
  return value
40
51
 
41
52
  model_config = ConfigDict(
@@ -90,7 +101,8 @@ class RecipientRequest(BaseModel):
90
101
 
91
102
  _obj = cls.model_validate({
92
103
  "type": obj.get("type"),
93
- "id": obj.get("id")
104
+ "id": obj.get("id"),
105
+ "taxDocumentSource": obj.get("taxDocumentSource")
94
106
  })
95
107
  return _obj
96
108
 
@@ -28,6 +28,7 @@ class RecipientType(str, Enum):
28
28
  """
29
29
  COMPANY = 'COMPANY'
30
30
  PERSON = 'PERSON'
31
+ MANUAL = 'MANUAL'
31
32
 
32
33
  @classmethod
33
34
  def from_json(cls, json_str: str) -> Self:
@@ -41,10 +41,12 @@ class TestConfigsResponse(unittest.TestCase):
41
41
  show_credit_notes_and_receipts = True,
42
42
  charge_breakdown = True,
43
43
  use_guest_lang = True,
44
+ allow_pending_transactions = True,
44
45
  due_days = 56,
45
46
  lang = '',
46
47
  prefix = '',
47
48
  suffix = '',
49
+ separator = '',
48
50
  legal_company_name = '',
49
51
  title = {
50
52
  'key' : ''
@@ -59,7 +61,6 @@ class TestConfigsResponse(unittest.TestCase):
59
61
  custom_text = {
60
62
  'key' : ''
61
63
  },
62
- create_invoice_on_allocation = True,
63
64
  trigger_events = [
64
65
  'manual'
65
66
  ],
@@ -40,18 +40,19 @@ class TestConfigsUpdateRequest(unittest.TestCase):
40
40
  ],
41
41
  show_detailed_tax_fee = True,
42
42
  charge_breakdown = True,
43
+ allow_pending_transactions = True,
43
44
  use_guest_lang = True,
44
45
  due_days = 56,
45
46
  sequence_start_number = 1,
46
47
  lang = '',
47
48
  prefix = '',
49
+ separator = '',
48
50
  suffix = '',
49
51
  legal_company_name = '',
50
52
  title = {"en":"Invoice","es":"Factura"},
51
53
  show_legal_company_name = True,
52
54
  include_room_number = True,
53
55
  use_document_number = True,
54
- create_invoice_on_allocation = True,
55
56
  update_invoice_on_link_document = True,
56
57
  is_compact = True,
57
58
  use_invoice_title_and_numbering = True,
@@ -44,7 +44,30 @@ class TestCreateInvoiceRequest(unittest.TestCase):
44
44
  user_id = 0,
45
45
  recipient = cloudbeds_fiscal_document.models.recipient_request.RecipientRequest(
46
46
  type = 'GUEST',
47
- id = 1, ),
47
+ id = 1,
48
+ tax_document_source = 'GUEST_TAX_ID', ),
49
+ manual_recipient = cloudbeds_fiscal_document.models.manual_recipient_request.ManualRecipientRequest(
50
+ type = 'PERSON',
51
+ name = '',
52
+ gender = 'M',
53
+ email = '',
54
+ birthday = datetime.datetime.strptime('1975-12-30', '%Y-%m-%d').date(),
55
+ phone = '',
56
+ cell_phone = '',
57
+ tax_id = '',
58
+ address = cloudbeds_fiscal_document.models.manual_recipient_request_address.ManualRecipientRequest_address(
59
+ country = '',
60
+ state = '',
61
+ city = '',
62
+ address1 = '',
63
+ address2 = '',
64
+ zip = '', ),
65
+ document = cloudbeds_fiscal_document.models.manual_recipient_request_document.ManualRecipientRequest_document(
66
+ type = 'na',
67
+ number = '',
68
+ issue_date = datetime.datetime.strptime('1975-12-30', '%Y-%m-%d').date(),
69
+ issuing_country = '',
70
+ expiration_date = datetime.datetime.strptime('1975-12-30', '%Y-%m-%d').date(), ), ),
48
71
  folio_ids = [
49
72
  1
50
73
  ],
@@ -54,7 +77,8 @@ class TestCreateInvoiceRequest(unittest.TestCase):
54
77
  include_transaction_ids = [
55
78
  1
56
79
  ],
57
- simplified = True
80
+ simplified = True,
81
+ due_date_property_timezone = datetime.datetime.strptime('1975-12-30', '%Y-%m-%d').date()
58
82
  )
59
83
  else:
60
84
  return CreateInvoiceRequest(
@@ -63,9 +87,6 @@ class TestCreateInvoiceRequest(unittest.TestCase):
63
87
  ],
64
88
  source_id = 1,
65
89
  source_kind = 'GROUP_PROFILE',
66
- recipient = cloudbeds_fiscal_document.models.recipient_request.RecipientRequest(
67
- type = 'GUEST',
68
- id = 1, ),
69
90
  )
70
91
  """
71
92
 
@@ -43,21 +43,42 @@ class TestCreateReceiptRequest(unittest.TestCase):
43
43
  transaction_id = 56,
44
44
  payment_id = 56,
45
45
  sequence_id = 56,
46
+ skip_integration = True,
46
47
  user_id = 56,
47
48
  source_id = 1,
48
49
  source_kind = 'GROUP_PROFILE',
49
50
  recipient = cloudbeds_fiscal_document.models.recipient_request.RecipientRequest(
50
51
  type = 'GUEST',
51
- id = 1, )
52
+ id = 1,
53
+ tax_document_source = 'GUEST_TAX_ID', ),
54
+ manual_recipient = cloudbeds_fiscal_document.models.manual_recipient_request.ManualRecipientRequest(
55
+ type = 'PERSON',
56
+ name = '',
57
+ gender = 'M',
58
+ email = '',
59
+ birthday = datetime.datetime.strptime('1975-12-30', '%Y-%m-%d').date(),
60
+ phone = '',
61
+ cell_phone = '',
62
+ tax_id = '',
63
+ address = cloudbeds_fiscal_document.models.manual_recipient_request_address.ManualRecipientRequest_address(
64
+ country = '',
65
+ state = '',
66
+ city = '',
67
+ address1 = '',
68
+ address2 = '',
69
+ zip = '', ),
70
+ document = cloudbeds_fiscal_document.models.manual_recipient_request_document.ManualRecipientRequest_document(
71
+ type = 'na',
72
+ number = '',
73
+ issue_date = datetime.datetime.strptime('1975-12-30', '%Y-%m-%d').date(),
74
+ issuing_country = '',
75
+ expiration_date = datetime.datetime.strptime('1975-12-30', '%Y-%m-%d').date(), ), )
52
76
  )
53
77
  else:
54
78
  return CreateReceiptRequest(
55
79
  user_id = 56,
56
80
  source_id = 1,
57
81
  source_kind = 'GROUP_PROFILE',
58
- recipient = cloudbeds_fiscal_document.models.recipient_request.RecipientRequest(
59
- type = 'GUEST',
60
- id = 1, ),
61
82
  )
62
83
  """
63
84
 
@@ -44,7 +44,30 @@ class TestCreateSimpleReceiptRequest(unittest.TestCase):
44
44
  source_kind = 'GROUP_PROFILE',
45
45
  recipient = cloudbeds_fiscal_document.models.recipient_request.RecipientRequest(
46
46
  type = 'GUEST',
47
- id = 1, )
47
+ id = 1,
48
+ tax_document_source = 'GUEST_TAX_ID', ),
49
+ manual_recipient = cloudbeds_fiscal_document.models.manual_recipient_request.ManualRecipientRequest(
50
+ type = 'PERSON',
51
+ name = '',
52
+ gender = 'M',
53
+ email = '',
54
+ birthday = datetime.datetime.strptime('1975-12-30', '%Y-%m-%d').date(),
55
+ phone = '',
56
+ cell_phone = '',
57
+ tax_id = '',
58
+ address = cloudbeds_fiscal_document.models.manual_recipient_request_address.ManualRecipientRequest_address(
59
+ country = '',
60
+ state = '',
61
+ city = '',
62
+ address1 = '',
63
+ address2 = '',
64
+ zip = '', ),
65
+ document = cloudbeds_fiscal_document.models.manual_recipient_request_document.ManualRecipientRequest_document(
66
+ type = 'na',
67
+ number = '',
68
+ issue_date = datetime.datetime.strptime('1975-12-30', '%Y-%m-%d').date(),
69
+ issuing_country = '',
70
+ expiration_date = datetime.datetime.strptime('1975-12-30', '%Y-%m-%d').date(), ), )
48
71
  )
49
72
  else:
50
73
  return CreateSimpleReceiptRequest(
@@ -56,7 +79,8 @@ class TestCreateSimpleReceiptRequest(unittest.TestCase):
56
79
  source_kind = 'GROUP_PROFILE',
57
80
  recipient = cloudbeds_fiscal_document.models.recipient_request.RecipientRequest(
58
81
  type = 'GUEST',
59
- id = 1, ),
82
+ id = 1,
83
+ tax_document_source = 'GUEST_TAX_ID', ),
60
84
  )
61
85
  """
62
86
 
@@ -0,0 +1,38 @@
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.api.export_api import ExportApi
18
+
19
+
20
+ class TestExportApi(unittest.TestCase):
21
+ """ExportApi unit test stubs"""
22
+
23
+ def setUp(self) -> None:
24
+ self.api = ExportApi()
25
+
26
+ def tearDown(self) -> None:
27
+ pass
28
+
29
+ def test_get_folio_pdf(self) -> None:
30
+ """Test case for get_folio_pdf
31
+
32
+ Get folio list of transactions exported as PDF
33
+ """
34
+ pass
35
+
36
+
37
+ if __name__ == '__main__':
38
+ unittest.main()
@@ -79,7 +79,8 @@ class TestFiscalDocumentDetailedResponse(unittest.TestCase):
79
79
  official_id = '',
80
80
  external_id = '',
81
81
  rectifying_invoice_type = '',
82
- cancellation_failed_fallback_status = 'COMPLETED', ),
82
+ cancellation_failed_fallback_status = 'COMPLETED',
83
+ pdf_file_base64 = 'YQ==', ),
83
84
  latest_linked_document = cloudbeds_fiscal_document.models.latest_linked_document.LatestLinkedDocument(
84
85
  id = '',
85
86
  number = '',
@@ -80,7 +80,8 @@ class TestFiscalDocumentPaginated(unittest.TestCase):
80
80
  official_id = '',
81
81
  external_id = '',
82
82
  rectifying_invoice_type = '',
83
- cancellation_failed_fallback_status = 'COMPLETED', ),
83
+ cancellation_failed_fallback_status = 'COMPLETED',
84
+ pdf_file_base64 = 'YQ==', ),
84
85
  latest_linked_document = cloudbeds_fiscal_document.models.latest_linked_document.LatestLinkedDocument(
85
86
  id = '',
86
87
  number = '',
@@ -48,7 +48,8 @@ class TestFiscalDocumentPatchRequest(unittest.TestCase):
48
48
  official_id = '',
49
49
  external_id = '',
50
50
  rectifying_invoice_type = '',
51
- cancellation_failed_fallback_status = 'COMPLETED', )
51
+ cancellation_failed_fallback_status = 'COMPLETED',
52
+ pdf_file_base64 = 'YQ==', )
52
53
  )
53
54
  else:
54
55
  return FiscalDocumentPatchRequest(
@@ -49,7 +49,8 @@ class TestFiscalDocumentSummaryResponse(unittest.TestCase):
49
49
  official_id = '',
50
50
  external_id = '',
51
51
  rectifying_invoice_type = '',
52
- cancellation_failed_fallback_status = 'COMPLETED', ),
52
+ cancellation_failed_fallback_status = 'COMPLETED',
53
+ pdf_file_base64 = 'YQ==', ),
53
54
  linked_to = ''
54
55
  )
55
56
  else:
@@ -0,0 +1,60 @@
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_folio_export_request import GetFolioExportRequest
18
+
19
+ class TestGetFolioExportRequest(unittest.TestCase):
20
+ """GetFolioExportRequest 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) -> GetFolioExportRequest:
29
+ """Test GetFolioExportRequest
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 `GetFolioExportRequest`
34
+ """
35
+ model = GetFolioExportRequest()
36
+ if include_optional:
37
+ return GetFolioExportRequest(
38
+ folio_ids = [3774744,7763263217],
39
+ source_kind = 'GROUP_PROFILE',
40
+ source_id = 56,
41
+ credit_debit_view = True,
42
+ revenue_compact = True,
43
+ date_from = datetime.datetime.strptime('1975-12-30', '%Y-%m-%d').date(),
44
+ date_to = datetime.datetime.strptime('1975-12-30', '%Y-%m-%d').date()
45
+ )
46
+ else:
47
+ return GetFolioExportRequest(
48
+ folio_ids = [3774744,7763263217],
49
+ source_kind = 'GROUP_PROFILE',
50
+ source_id = 56,
51
+ )
52
+ """
53
+
54
+ def testGetFolioExportRequest(self):
55
+ """Test GetFolioExportRequest"""
56
+ # inst_req_only = self.make_instance(include_optional=False)
57
+ # inst_req_and_optional = self.make_instance(include_optional=True)
58
+
59
+ if __name__ == '__main__':
60
+ unittest.main()
@@ -44,7 +44,30 @@ class TestGetInvoicePreviewRequest(unittest.TestCase):
44
44
  user_id = 0,
45
45
  recipient = cloudbeds_fiscal_document.models.recipient_request.RecipientRequest(
46
46
  type = 'GUEST',
47
- id = 1, ),
47
+ id = 1,
48
+ tax_document_source = 'GUEST_TAX_ID', ),
49
+ manual_recipient = cloudbeds_fiscal_document.models.manual_recipient_request.ManualRecipientRequest(
50
+ type = 'PERSON',
51
+ name = '',
52
+ gender = 'M',
53
+ email = '',
54
+ birthday = datetime.datetime.strptime('1975-12-30', '%Y-%m-%d').date(),
55
+ phone = '',
56
+ cell_phone = '',
57
+ tax_id = '',
58
+ address = cloudbeds_fiscal_document.models.manual_recipient_request_address.ManualRecipientRequest_address(
59
+ country = '',
60
+ state = '',
61
+ city = '',
62
+ address1 = '',
63
+ address2 = '',
64
+ zip = '', ),
65
+ document = cloudbeds_fiscal_document.models.manual_recipient_request_document.ManualRecipientRequest_document(
66
+ type = 'na',
67
+ number = '',
68
+ issue_date = datetime.datetime.strptime('1975-12-30', '%Y-%m-%d').date(),
69
+ issuing_country = '',
70
+ expiration_date = datetime.datetime.strptime('1975-12-30', '%Y-%m-%d').date(), ), ),
48
71
  folio_ids = [
49
72
  1
50
73
  ],
@@ -54,7 +77,8 @@ class TestGetInvoicePreviewRequest(unittest.TestCase):
54
77
  include_transaction_ids = [
55
78
  1
56
79
  ],
57
- simplified = True
80
+ simplified = True,
81
+ due_date_property_timezone = datetime.datetime.strptime('1975-12-30', '%Y-%m-%d').date()
58
82
  )
59
83
  else:
60
84
  return GetInvoicePreviewRequest(
@@ -63,9 +87,6 @@ class TestGetInvoicePreviewRequest(unittest.TestCase):
63
87
  ],
64
88
  source_id = 1,
65
89
  source_kind = 'GROUP_PROFILE',
66
- recipient = cloudbeds_fiscal_document.models.recipient_request.RecipientRequest(
67
- type = 'GUEST',
68
- id = 1, ),
69
90
  )
70
91
  """
71
92
 
@@ -45,7 +45,8 @@ class TestGovernmentIntegration(unittest.TestCase):
45
45
  official_id = '',
46
46
  external_id = '',
47
47
  rectifying_invoice_type = '',
48
- cancellation_failed_fallback_status = 'COMPLETED'
48
+ cancellation_failed_fallback_status = 'COMPLETED',
49
+ pdf_file_base64 = 'YQ=='
49
50
  )
50
51
  else:
51
52
  return GovernmentIntegration(
@@ -0,0 +1,33 @@
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.guest_document_type import GuestDocumentType
18
+
19
+ class TestGuestDocumentType(unittest.TestCase):
20
+ """GuestDocumentType unit test stubs"""
21
+
22
+ def setUp(self):
23
+ pass
24
+
25
+ def tearDown(self):
26
+ pass
27
+
28
+ def testGuestDocumentType(self):
29
+ """Test GuestDocumentType"""
30
+ # inst = GuestDocumentType()
31
+
32
+ if __name__ == '__main__':
33
+ unittest.main()
@@ -0,0 +1,33 @@
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.guest_gender import GuestGender
18
+
19
+ class TestGuestGender(unittest.TestCase):
20
+ """GuestGender unit test stubs"""
21
+
22
+ def setUp(self):
23
+ pass
24
+
25
+ def tearDown(self):
26
+ pass
27
+
28
+ def testGuestGender(self):
29
+ """Test GuestGender"""
30
+ # inst = GuestGender()
31
+
32
+ if __name__ == '__main__':
33
+ unittest.main()