Skip to content

Commit d8875ce

Browse files
committed
global field
1 parent 4f39663 commit d8875ce

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

facturapi/resources/invoices.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@ class InvoiceRequest(BaseModel):
106106
pdf_custom_section: Optional[str]
107107
addenda: Optional[str]
108108
namespaces: Optional[Namespace]
109+
global_: Optional[Dict] = None
109110

110111

111112
@dataclass
@@ -161,6 +162,7 @@ class Invoice(Creatable, Deletable, Downloadable, Queryable, Retrievable):
161162
series: Optional[str] = None
162163
related: Optional[List[str]] = None
163164
relation: Optional[InvoiceRelation] = None
165+
global_: Optional[Dict] = None
164166

165167
@classmethod
166168
def create(cls, data: InvoiceRequest) -> 'Invoice':
@@ -174,6 +176,9 @@ def create(cls, data: InvoiceRequest) -> 'Invoice':
174176
175177
"""
176178
cleaned_data = data.dict(exclude_unset=True, exclude_none=True)
179+
if data.global_:
180+
cleaned_data['global'] = cleaned_data.pop('global_')
181+
177182
return cast('Invoice', cls._create(**cleaned_data))
178183

179184
@classmethod

facturapi/types/exc.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@
22
from typing import Any, Dict
33

44

5-
class FacturapiException(Exception):
6-
...
5+
class FacturapiException(Exception): ...
76

87

98
class NoResultFound(FacturapiException):

facturapi/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
__version__ = '0.1.1' # pragma: no cover
1+
__version__ = '0.1.2.dev0' # pragma: no cover
22
CLIENT_VERSION = __version__

0 commit comments

Comments
 (0)