Download the PHP package firebear/netsuite-php without Composer
On this page you can find all versions of the php package firebear/netsuite-php. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package netsuite-php
NetSuite PHP API Client
A PHP API client package for NetSuite, pried from the NetSuite PHP Toolkit.
Adding it to your project:
Require with composer:
V2 in Alpha
Changes in v2:
- Changed namespaces
- Significantly simplified NetSuiteClient
- Added a convenience method for creating an instance using environment variables for configuration
- Improved logging, still logs even if exception is thrown in soap call.
Quickstart:
Instantiating the NetSuiteService class:
The rest of the examples assume that you have done this.
You can alternatively place your config in environment variables. This is helpful in hosted environments where deployment of config files is either not desired or practical. You can find the valid keys in the included .env.example file with sample values.
Previously, instantiating the NetSuiteClient with ENV data entailed using the
static method createFromEnv
. This method is now marked as deprecated
and
if you are using it, please change your code to use the standard constructor
which will extract your configuration out of the $_ENV superglobal for you.
Account-Specific Data Center URLs
With 2019_1, this library provides support to utilize NetSuite's new account-specific data center URL with each request. In practice, this lookup does have a measurable overhead cost. As such, I'd suggest using this feature only if your manner of NetSuite integration is such that you make fewer connections, handling integration in batches. If your manner of integration is to instead make many frequent, brief requests from NetSuite, then you will probably prefer to provide your data center URL explicitly and remove the lookup from every session.
Retreiving a customer record:
Searching for customers who emails start with "j":
Adding a new customer:
Adding a salesOrder with a custom field:
This example of an order creation is not a complete example but shows how you set up and add the object generally as well as how you would add custom fields to the sale on insert.
Creating an Item Fulfillment:
Creating an item fulfillment against a Sales Order requires initializing the new record based on the target record (the sales order). Then you can set the properties on the new record accordingly and add it to NetSuite. The same method is used for creating CashSale records.
Logging
You can set logging on or off on the fly, or override the configuration setting passed in. Please note that if you don't specify a logging directory in the config or afterwards, then you won't get logs no matter what you do.
Set a logging path
Turn logging on
Turn logging off
Token-Based Authentication
Instead of instantiating NetSuiteService
with the standard credentials method, you can pass a set of credentials of the form consumerKey
/consumerSecret
/token
/tokenSecret
.
Status
- [x] Extract the ~1500 classes from their single file...
- [x] Composer package with autoloading
- [x] Pass config through constructor
- [x] Optional environment variable config
- [x] Namespacing
- [x] Logging
- [x] Dynamic Data Center URLs
- [x] Expanded user documentation
- [x] Support automagic configuration via ENV variables
License
Original work is Copyright © 2010-2015 NetSuite Inc. and provided "as is." Refer to the NetSuite Toolkit License Agreement file.
All additional work is licensed under the Apache 2.0 open source software license according to the included LICENSE file.
All versions of netsuite-php with dependencies
ext-soap Version *
ext-simplexml Version *
ext-openssl Version *
paragonie/random_compat Version >=1