DynamicTalk-0.0.1
توضیحات
Explore Netsuite's WSDL and convert Python Dictionaries into Netsuite XML
| ویژگی | مقدار |
|---|---|
| سیستم عامل | OS Independent |
| نام فایل | DynamicTalk-0.0.1 |
| نام | DynamicTalk |
| نسخه کتابخانه | 0.0.1 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Will Watkinson |
| ایمیل نویسنده | wjwats4295@gmail.com |
| آدرس صفحه اصلی | https://gitlab.com/wjwatkinson/dynamictalk |
| آدرس اینترنتی | https://pypi.org/project/DynamicTalk/ |
| مجوز | - |
# dynamictalk
A package for converting python dictionaries into XML for Netsuite.
## __init__()
This package requires passing in a NetSuite object from the netsuite package: https://pypi.org/project/netsuite/
```
from netsuite.client import NetSuite
from dynamictalk import DynamicTalk
conn = NetSuite({config})
dt = DynamicTalk(conn)
```
## view()
Input the API name of the object you want to see and this method will compile the structure of the object, sub objects and all of their custom field lists and return it.
```
from netsuite.client import NetSuite
from dynamictalk import DynamicTalk
conn = NetSuite({config})
dt = DynamicTalk(conn)
print(dt.view(SalesOrder))
```
## build()
Input the data you want converted in dictionary form and the API name of the object the data is for and this method will convert the input data into the appropriate XML structures. The keys in the data must correspond exactly to the Netsuite field API names including case sensitivity.
For reference fields make sure the value is the internal Id of what you want to reference.
The custom field list should be input as a dictionary instead of a list with key value pairs corresponding to the API name of the custom field and the value, or internal Id to be set in that custom field.
```
from netsuite.client import NetSuite
from dynamictalk import DynamicTalk
conn = NetSuite({config})
dt = DynamicTalk(conn)
order = {'externalId': 456343,
'entityId': 436634,
'subsidiary': 5,
'customFieldList':{
'custbody_custom1': 'example'
}
}
xml_order = dt.build(order, 'SalesOrder')
conn.add(xml_order)
```
زبان مورد نیاز
| مقدار | نام |
|---|---|
| >=3.6 | Python |
نحوه نصب
نصب پکیج whl DynamicTalk-0.0.1:
pip install DynamicTalk-0.0.1.whl
نصب پکیج tar.gz DynamicTalk-0.0.1:
pip install DynamicTalk-0.0.1.tar.gz