Initial commit
This commit is contained in:
0
invoice_ninja/models/README.md
Normal file
0
invoice_ninja/models/README.md
Normal file
0
invoice_ninja/models/__init__.py
Normal file
0
invoice_ninja/models/__init__.py
Normal file
27
invoice_ninja/models/client.py
Normal file
27
invoice_ninja/models/client.py
Normal file
@@ -0,0 +1,27 @@
|
||||
class Client(object):
|
||||
def __init__(self, client_id: int = None, name: str = None,
|
||||
address: str = None, city: str = None, state: str = None,
|
||||
postal_code: str = None, phone: str = None,
|
||||
email: str = None, pets: str = None):
|
||||
self.id = client_id
|
||||
self.name = name
|
||||
self.address = address
|
||||
self.city = city
|
||||
self.state = state
|
||||
self.postal_code = postal_code
|
||||
self.phone = phone
|
||||
self.email = email
|
||||
self.pets = pets
|
||||
|
||||
def __str__(self):
|
||||
return 'Client({}, {}, {}, {}, {}, {}, {}, {}, {})'.format(
|
||||
self.id,
|
||||
self.name,
|
||||
self.address,
|
||||
self.city,
|
||||
self.state,
|
||||
self.postal_code,
|
||||
self.phone,
|
||||
self.email,
|
||||
self.pets)
|
||||
|
||||
36
invoice_ninja/models/clientContact.py
Normal file
36
invoice_ninja/models/clientContact.py
Normal file
@@ -0,0 +1,36 @@
|
||||
class ClientContact(object):
|
||||
def __init__(self, first_name: str = '',
|
||||
last_name: str = '',
|
||||
email: str = '',
|
||||
phone: str = '',
|
||||
send_email: bool = True,
|
||||
custom_value1: str = '',
|
||||
custom_value2: str = '',
|
||||
custom_value3: str = '',
|
||||
custom_value4: str = ''):
|
||||
self.first_name = first_name
|
||||
self.last_name = last_name
|
||||
self.email = email
|
||||
self.phone = phone
|
||||
|
||||
# Flag for whether the contact will receive emails.
|
||||
self.send_email = send_email
|
||||
|
||||
# Custom values
|
||||
self.custom_value1 = custom_value1
|
||||
self.custom_value2 = custom_value2
|
||||
self.custom_value3 = custom_value3
|
||||
self.custom_value4 = custom_value4
|
||||
|
||||
def __str__(self):
|
||||
return 'ClientContact({}, {}, {}, {}, {}, {}, {}, {}, {})'.format(
|
||||
self.first_name,
|
||||
self.last_name,
|
||||
self.email,
|
||||
self.phone,
|
||||
self.send_email,
|
||||
self.custom_value1,
|
||||
self.custom_value2,
|
||||
self.custom_value3,
|
||||
self.custom_value4)
|
||||
|
||||
38
invoice_ninja/models/clientSettings.py
Normal file
38
invoice_ninja/models/clientSettings.py
Normal file
@@ -0,0 +1,38 @@
|
||||
class ClientSettings(object):
|
||||
def __init__(self, language_id: str = None,
|
||||
currency_id: str = None,
|
||||
payment_terms: str = None,
|
||||
valid_until: str = None,
|
||||
default_task_rate: float = 0,
|
||||
send_reminders: bool = None):
|
||||
# The language ID for the client, for the full list of languages,
|
||||
# please see this resource - optional
|
||||
#
|
||||
# https://invoiceninja.github.io/docs/statics/#languages
|
||||
self.language_id = language_id
|
||||
|
||||
# The currency ID - optional
|
||||
# See this resource for full list:
|
||||
#
|
||||
# https://invoiceninja.github.io/docs/statics/#currencies
|
||||
self.currency_id = currency_id
|
||||
|
||||
# The payment terms - in days - optional
|
||||
self.payment_terms = payment_terms
|
||||
|
||||
# The quote terms - optional
|
||||
#
|
||||
# How many days the quote will be valid for.
|
||||
self.valid_until = valid_until
|
||||
|
||||
# The task rate for this client - optional
|
||||
#
|
||||
# A value of 0 equates to disabled.
|
||||
self.default_task_rate = default_task_rate
|
||||
|
||||
# Whether the client will receive reminders - optional
|
||||
#
|
||||
# When left unset, this setting will rely on the company
|
||||
# settings as the override/default
|
||||
self.send_reminders = send_reminders
|
||||
|
||||
Reference in New Issue
Block a user