Skip to main content

Explore Netsuite's WSDL and convert Python Dictionaries into Netsuite XML

Project description

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)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

DynamicTalk-0.0.1.tar.gz (6.2 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page