NetSuite Suite Script examples along with a python script to run them
- Create Credit Card Charge
- Create Credit Card Refund
-
Go to the folder
credit_card_charge_restlet
cd credit_card_charge_restlet
-
Make a copy of the
setup_template.sh
filecp setup_template.sh setup.sh
-
Add correct values in the setup.sh file for the environment variables
#!/bin/bash # NetSuite Token Based Access Credentials export ACCOUNT='NETSUITE ACCOUNT ID' export CONSUMER_KEY='NETSUITE CONSUMER KEY' export CONSUMER_SECRET='NETSUITE CONSUMER SECRET' export TOKEN_KEY='NETSUITE TOKEN KEY' export TOKEN_SECRET='NETSUITE TOKEN SECRET' # RESTlet Details export RESTLET_SCRIPT_ID='NETSUITE RESTLET SCRIPT ID' export RESTLET_DEPLOYMENT_ID='NETSUITE RESTLET DEPLOY ID'
-
Install python requirements
pip install -r requirements.txt
-
Run the python script to access deployed Restlet
source setup.sh && python create_credit_card_charge.py