@ -21,21 +21,24 @@ class Invoice:
|
||||
attempted: Union[Unset, bool] = False
|
||||
created_at: Union[Unset, datetime.datetime] = UNSET
|
||||
currency: Union[Unset, Currency] = UNSET
|
||||
customer_email: Union[Unset, str] = UNSET
|
||||
customer_id: Union[Unset, str] = UNSET
|
||||
default_payment_method: Union[Unset, str] = UNSET
|
||||
description: Union[Unset, str] = UNSET
|
||||
id: Union[Unset, str] = UNSET
|
||||
invoice_pdf: Union[Unset, str] = UNSET
|
||||
invoice_url: Union[Unset, str] = UNSET
|
||||
from ..models.invoice_line_item import InvoiceLineItem
|
||||
lines: Union[Unset, List[InvoiceLineItem]] = UNSET
|
||||
metadata: Union[Unset, Any] = UNSET
|
||||
number: Union[Unset, str] = UNSET
|
||||
paid: Union[Unset, bool] = False
|
||||
pdf: Union[Unset, str] = UNSET
|
||||
receipt_number: Union[Unset, str] = UNSET
|
||||
statement_descriptor: Union[Unset, str] = UNSET
|
||||
status: Union[Unset, InvoiceStatus] = UNSET
|
||||
subtotal: Union[Unset, int] = UNSET
|
||||
tax: Union[Unset, int] = UNSET
|
||||
total: Union[Unset, int] = UNSET
|
||||
url: Union[Unset, str] = UNSET
|
||||
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
@ -51,10 +54,11 @@ class Invoice:
|
||||
currency: Union[Unset, str] = UNSET
|
||||
if not isinstance(self.currency, Unset):
|
||||
currency = self.currency.value
|
||||
customer_email = self.customer_email
|
||||
customer_id = self.customer_id
|
||||
default_payment_method = self.default_payment_method
|
||||
description = self.description
|
||||
id = self.id
|
||||
invoice_pdf = self.invoice_pdf
|
||||
invoice_url = self.invoice_url
|
||||
from ..models.invoice_line_item import InvoiceLineItem
|
||||
lines: Union[Unset, List[InvoiceLineItem]] = UNSET
|
||||
if not isinstance(self.lines, Unset):
|
||||
@ -62,6 +66,7 @@ class Invoice:
|
||||
metadata = self.metadata
|
||||
number = self.number
|
||||
paid = self.paid
|
||||
pdf = self.pdf
|
||||
receipt_number = self.receipt_number
|
||||
statement_descriptor = self.statement_descriptor
|
||||
status: Union[Unset, str] = UNSET
|
||||
@ -70,6 +75,7 @@ class Invoice:
|
||||
subtotal = self.subtotal
|
||||
tax = self.tax
|
||||
total = self.total
|
||||
url = self.url
|
||||
|
||||
field_dict: Dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
@ -88,14 +94,16 @@ class Invoice:
|
||||
field_dict['created_at'] = created_at
|
||||
if currency is not UNSET:
|
||||
field_dict['currency'] = currency
|
||||
if customer_email is not UNSET:
|
||||
field_dict['customer_email'] = customer_email
|
||||
if customer_id is not UNSET:
|
||||
field_dict['customer_id'] = customer_id
|
||||
if default_payment_method is not UNSET:
|
||||
field_dict['default_payment_method'] = default_payment_method
|
||||
if description is not UNSET:
|
||||
field_dict['description'] = description
|
||||
if id is not UNSET:
|
||||
field_dict['id'] = id
|
||||
if invoice_pdf is not UNSET:
|
||||
field_dict['invoice_pdf'] = invoice_pdf
|
||||
if invoice_url is not UNSET:
|
||||
field_dict['invoice_url'] = invoice_url
|
||||
if lines is not UNSET:
|
||||
field_dict['lines'] = lines
|
||||
if metadata is not UNSET:
|
||||
@ -104,6 +112,8 @@ class Invoice:
|
||||
field_dict['number'] = number
|
||||
if paid is not UNSET:
|
||||
field_dict['paid'] = paid
|
||||
if pdf is not UNSET:
|
||||
field_dict['pdf'] = pdf
|
||||
if receipt_number is not UNSET:
|
||||
field_dict['receipt_number'] = receipt_number
|
||||
if statement_descriptor is not UNSET:
|
||||
@ -116,6 +126,8 @@ class Invoice:
|
||||
field_dict['tax'] = tax
|
||||
if total is not UNSET:
|
||||
field_dict['total'] = total
|
||||
if url is not UNSET:
|
||||
field_dict['url'] = url
|
||||
|
||||
return field_dict
|
||||
|
||||
@ -146,14 +158,16 @@ class Invoice:
|
||||
else:
|
||||
currency = Currency(_currency)
|
||||
|
||||
customer_email = d.pop("customer_email", UNSET)
|
||||
|
||||
customer_id = d.pop("customer_id", UNSET)
|
||||
|
||||
default_payment_method = d.pop("default_payment_method", UNSET)
|
||||
|
||||
description = d.pop("description", UNSET)
|
||||
|
||||
id = d.pop("id", UNSET)
|
||||
|
||||
invoice_pdf = d.pop("invoice_pdf", UNSET)
|
||||
|
||||
invoice_url = d.pop("invoice_url", UNSET)
|
||||
|
||||
from ..models.invoice_line_item import InvoiceLineItem
|
||||
lines = cast(List[InvoiceLineItem], d.pop("lines", UNSET))
|
||||
|
||||
@ -162,6 +176,8 @@ class Invoice:
|
||||
|
||||
paid = d.pop("paid", UNSET)
|
||||
|
||||
pdf = d.pop("pdf", UNSET)
|
||||
|
||||
receipt_number = d.pop("receipt_number", UNSET)
|
||||
|
||||
statement_descriptor = d.pop("statement_descriptor", UNSET)
|
||||
@ -179,6 +195,8 @@ class Invoice:
|
||||
|
||||
total = d.pop("total", UNSET)
|
||||
|
||||
url = d.pop("url", UNSET)
|
||||
|
||||
invoice = cls(
|
||||
amount_due=amount_due,
|
||||
amount_paid=amount_paid,
|
||||
@ -187,20 +205,23 @@ class Invoice:
|
||||
attempted=attempted,
|
||||
created_at=created_at,
|
||||
currency=currency,
|
||||
customer_email=customer_email,
|
||||
customer_id=customer_id,
|
||||
default_payment_method=default_payment_method,
|
||||
description=description,
|
||||
id=id,
|
||||
invoice_pdf=invoice_pdf,
|
||||
invoice_url=invoice_url,
|
||||
lines=lines,
|
||||
metadata=metadata,
|
||||
number=number,
|
||||
paid=paid,
|
||||
pdf=pdf,
|
||||
receipt_number=receipt_number,
|
||||
statement_descriptor=statement_descriptor,
|
||||
status=status,
|
||||
subtotal=subtotal,
|
||||
tax=tax,
|
||||
total=total,
|
||||
url=url,
|
||||
)
|
||||
|
||||
invoice.additional_properties = d
|
||||
|
Reference in New Issue
Block a user