forked from ej2/python-quickbooks
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpaymentmethod.py
More file actions
34 lines (25 loc) · 1 KB
/
paymentmethod.py
File metadata and controls
34 lines (25 loc) · 1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
from six import python_2_unicode_compatible
from .base import QuickbooksManagedObject, QuickbooksTransactionEntity, Ref
@python_2_unicode_compatible
class PaymentMethod(QuickbooksManagedObject, QuickbooksTransactionEntity):
"""
QBO definition: The PaymentMethod entity provides the method of payment for received goods. Delete is achieved by setting the
Active attribute to false in an entity update request; thus, making it inactive. In this type of delete,
the record is not permanently deleted, but is hidden for display purposes. References to inactive objects are
left intact.
"""
class_dict = {}
qbo_object_name = "PaymentMethod"
def __init__(self):
super(PaymentMethod, self).__init__()
self.Name = ""
self.Type = ""
self.Active = True
def __str__(self):
return self.Name
def to_ref(self):
ref = Ref()
ref.name = self.Name
ref.type = self.qbo_object_name
ref.value = self.Id
return ref