Skip to content

Commit

Permalink
Updated to 2021_1 (#109)
Browse files Browse the repository at this point in the history
Update to the 2021.1 version of web services toolkit thanks to @FSElias
  • Loading branch information
FSElias authored Oct 5, 2021
1 parent 07edc11 commit 8ce9ae1
Show file tree
Hide file tree
Showing 43 changed files with 557 additions and 103 deletions.
2 changes: 1 addition & 1 deletion .env.example
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
## General Settings
NETSUITE_ENDPOINT="2020_2"
NETSUITE_ENDPOINT="2021_1"
NETSUITE_HOST="https://webservices.netsuite.com"
NETSUITE_ACCOUNT="MYACCT1"

Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@

# Files
.DS_Store
composer.lock
composer.lock
*.bat
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ use NetSuite\NetSuiteService;

$config = [
// required -------------------------------------
"endpoint" => "2020_2",
"endpoint" => "2021_1",
"host" => "https://webservices.netsuite.com",
"account" => "MYACCT1",
"consumerKey" => "0123456789ABCDEF",
Expand All @@ -80,7 +80,7 @@ use NetSuite\NetSuiteService;

$config = [
// required -------------------------------------
"endpoint" => "2020_2",
"endpoint" => "2021_1",
"host" => "https://webservices.netsuite.com",
"email" => "[email protected]",
"password" => "mySecretPwd",
Expand Down Expand Up @@ -127,7 +127,7 @@ you'll have a client instance in the container.

## Account-Specific Data Center URLs

With `2019_1`, this library provides support to utilize NetSuite's new
With `2021_1`, this library provides support to utilize NetSuite's new
account-specific data center URL detection on 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
Expand Down Expand Up @@ -173,8 +173,8 @@ $service->logRequests(false); // Turn logging off.

This repository always contains classes generated from the version of the
NetSuite PHP Toolkit corresponding with the web services version denoted
by the specific release. Release `v2020.2.0`, for instance, is the first
release built against NetSuite's `2020_1` web services toolkit. If you want
by the specific release. Release `v2021.1.0`, for instance, is the first
release built against NetSuite's `2021_1` web services toolkit. If you want
to generate the class files yourself, for whatever reason, there is code
included with the package to do so, using the following steps:

Expand Down
2 changes: 1 addition & 1 deletion samples/config.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

// An example of loading your config from environment variables with optional defaults.
return [
'endpoint' => getenv('NETSUITE_ENDPOINT') ?: '2017_1',
'endpoint' => getenv('NETSUITE_ENDPOINT') ?: '2021_1',
'host' => getenv('NETSUITE_HOST') ?: 'https://webservices.netsuite.com',
'email' => getenv('NETSUITE_EMAIL') ?: '[email protected]',
'password' => getenv('NETSUITE_PASSWORD') ?: 'mySecretPwd',
Expand Down
19 changes: 17 additions & 2 deletions src/Classes/AssemblyItem.php
Original file line number Diff line number Diff line change
Expand Up @@ -567,9 +567,21 @@ class AssemblyItem extends Record {
*/
public $autoLeadTime;
/**
* @var integer
* @var float
*/
public $buildTime;
/**
* @var float
*/
public $buildTimeLotSize;
/**
* @var float
*/
public $fixedBuildTime;
/**
* @var \NetSuite\Classes\RecordRef
*/
public $planningItemCategory;
/**
* @var float
*/
Expand Down Expand Up @@ -1016,7 +1028,10 @@ class AssemblyItem extends Record {
"averageCost" => "float",
"leadTime" => "integer",
"autoLeadTime" => "boolean",
"buildTime" => "integer",
"buildTime" => "float",
"buildTimeLotSize" => "float",
"fixedBuildTime" => "float",
"planningItemCategory" => "RecordRef",
"lastPurchasePrice" => "float",
"purchaseDescription" => "string",
"safetyStockLevel" => "float",
Expand Down
5 changes: 5 additions & 0 deletions src/Classes/Customer.php
Original file line number Diff line number Diff line change
Expand Up @@ -554,6 +554,10 @@ class Customer extends Record {
* @var \NetSuite\Classes\CustomerTaxRegistrationList
*/
public $taxRegistrationList;
/**
* @var \NetSuite\Classes\RecordRef
*/
public $defaultAllocationStrategy;
/**
* @var \NetSuite\Classes\CustomFieldList
*/
Expand Down Expand Up @@ -701,6 +705,7 @@ class Customer extends Record {
"groupPricingList" => "CustomerGroupPricingList",
"itemPricingList" => "CustomerItemPricingList",
"taxRegistrationList" => "CustomerTaxRegistrationList",
"defaultAllocationStrategy" => "RecordRef",
"customFieldList" => "CustomFieldList",
"internalId" => "string",
"externalId" => "string",
Expand Down
5 changes: 5 additions & 0 deletions src/Classes/CustomerDeposit.php
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,10 @@ class CustomerDeposit extends Record {
* @var \NetSuite\Classes\AccountingBookDetailList
*/
public $accountingBookDetailList;
/**
* @var float
*/
public $salesOrderRequiredDepositDue;
/**
* @var \NetSuite\Classes\CustomFieldList
*/
Expand Down Expand Up @@ -321,6 +325,7 @@ class CustomerDeposit extends Record {
"tranId" => "string",
"applyList" => "CustomerDepositApplyList",
"accountingBookDetailList" => "AccountingBookDetailList",
"salesOrderRequiredDepositDue" => "float",
"customFieldList" => "CustomFieldList",
"internalId" => "string",
"externalId" => "string",
Expand Down
5 changes: 5 additions & 0 deletions src/Classes/CustomerSearchBasic.php
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,10 @@ class CustomerSearchBasic extends SearchRecordBasic {
* @var \NetSuite\Classes\SearchLongField
*/
public $daysOverdue;
/**
* @var \NetSuite\Classes\SearchMultiSelectField
*/
public $defaultAllocationStrategy;
/**
* @var \NetSuite\Classes\SearchDoubleField
*/
Expand Down Expand Up @@ -690,6 +694,7 @@ class CustomerSearchBasic extends SearchRecordBasic {
"dateClosed" => "SearchDateField",
"dateCreated" => "SearchDateField",
"daysOverdue" => "SearchLongField",
"defaultAllocationStrategy" => "SearchMultiSelectField",
"defaultOrderPriority" => "SearchDoubleField",
"defaultTaxReg" => "SearchMultiSelectField",
"defaultTaxRegText" => "SearchStringField",
Expand Down
5 changes: 5 additions & 0 deletions src/Classes/CustomerSearchRowBasic.php
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,10 @@ class CustomerSearchRowBasic extends SearchRowBasic {
* @var \NetSuite\Classes\SearchColumnLongField[]
*/
public $daysOverdue;
/**
* @var \NetSuite\Classes\SearchColumnSelectField[]
*/
public $defaultAllocationStrategy;
/**
* @var \NetSuite\Classes\SearchColumnDoubleField[]
*/
Expand Down Expand Up @@ -794,6 +798,7 @@ class CustomerSearchRowBasic extends SearchRowBasic {
"dateClosed" => "SearchColumnDateField[]",
"dateCreated" => "SearchColumnDateField[]",
"daysOverdue" => "SearchColumnLongField[]",
"defaultAllocationStrategy" => "SearchColumnSelectField[]",
"defaultOrderPriority" => "SearchColumnDoubleField[]",
"defaultTaxReg" => "SearchColumnStringField[]",
"depositBalance" => "SearchColumnDoubleField[]",
Expand Down
5 changes: 5 additions & 0 deletions src/Classes/Employee.php
Original file line number Diff line number Diff line change
Expand Up @@ -450,6 +450,10 @@ class Employee extends Record {
* @var \NetSuite\Classes\EmployeeBonusTargetPayFrequency
*/
public $bonusTargetPayFrequency;
/**
* @var \NetSuite\Classes\EmployeeCorporateCardsList
*/
public $corporateCardsList;
/**
* @var \NetSuite\Classes\CustomFieldList
*/
Expand Down Expand Up @@ -571,6 +575,7 @@ class Employee extends Record {
"bonusTargetComment" => "string",
"bonusTargetType" => "EmployeeBonusTargetType",
"bonusTargetPayFrequency" => "EmployeeBonusTargetPayFrequency",
"corporateCardsList" => "EmployeeCorporateCardsList",
"customFieldList" => "CustomFieldList",
"internalId" => "string",
"externalId" => "string",
Expand Down
38 changes: 38 additions & 0 deletions src/Classes/EmployeeCorporateCards.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
<?php
/**
* This file is part of the netsuitephp/netsuite-php library
* AND originally from the NetSuite PHP Toolkit.
*
* New content:
* @package ryanwinchester/netsuite-php
* @copyright Copyright (c) Ryan Winchester
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache-2.0
* @link https://github.com/netsuitephp/netsuite-php
*
* Original content:
* @copyright Copyright (c) NetSuite Inc.
* @license https://raw.githubusercontent.com/netsuitephp/netsuite-php/master/original/NetSuite%20Application%20Developer%20License%20Agreement.txt
* @link http://www.netsuite.com/portal/developers/resources/suitetalk-sample-applications.shtml
*/

namespace NetSuite\Classes;

class EmployeeCorporateCards {
/**
* @var string
*/
public $embossedName;
/**
* @var string
*/
public $expiration;
/**
* @var \NetSuite\Classes\RecordRef
*/
public $corporateCardProfile;
static $paramtypesmap = array(
"embossedName" => "string",
"expiration" => "dateTime",
"corporateCardProfile" => "RecordRef",
);
}
33 changes: 33 additions & 0 deletions src/Classes/EmployeeCorporateCardsList.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<?php
/**
* This file is part of the netsuitephp/netsuite-php library
* AND originally from the NetSuite PHP Toolkit.
*
* New content:
* @package ryanwinchester/netsuite-php
* @copyright Copyright (c) Ryan Winchester
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache-2.0
* @link https://github.com/netsuitephp/netsuite-php
*
* Original content:
* @copyright Copyright (c) NetSuite Inc.
* @license https://raw.githubusercontent.com/netsuitephp/netsuite-php/master/original/NetSuite%20Application%20Developer%20License%20Agreement.txt
* @link http://www.netsuite.com/portal/developers/resources/suitetalk-sample-applications.shtml
*/

namespace NetSuite\Classes;

class EmployeeCorporateCardsList {
/**
* @var \NetSuite\Classes\EmployeeCorporateCards[]
*/
public $corporateCards;
/**
* @var boolean
*/
public $replaceAll;
static $paramtypesmap = array(
"corporateCards" => "EmployeeCorporateCards[]",
"replaceAll" => "boolean",
);
}
15 changes: 15 additions & 0 deletions src/Classes/EmployeeSearchBasic.php
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,10 @@ class EmployeeSearchBasic extends SearchRecordBasic {
* @var \NetSuite\Classes\SearchBooleanField
*/
public $concurrentWebServicesUser;
/**
* @var \NetSuite\Classes\SearchMultiSelectField
*/
public $corporateCardProfile;
/**
* @var \NetSuite\Classes\SearchEnumMultiSelectField
*/
Expand Down Expand Up @@ -182,6 +186,10 @@ class EmployeeSearchBasic extends SearchRecordBasic {
* @var \NetSuite\Classes\SearchStringField
*/
public $email;
/**
* @var \NetSuite\Classes\SearchStringField
*/
public $embossedName;
/**
* @var \NetSuite\Classes\SearchMultiSelectField
*/
Expand Down Expand Up @@ -210,6 +218,10 @@ class EmployeeSearchBasic extends SearchRecordBasic {
* @var \NetSuite\Classes\SearchMultiSelectField
*/
public $expenseReportCurrency;
/**
* @var \NetSuite\Classes\SearchDateField
*/
public $expiration;
/**
* @var \NetSuite\Classes\SearchMultiSelectField
*/
Expand Down Expand Up @@ -547,6 +559,7 @@ class EmployeeSearchBasic extends SearchRecordBasic {
"commissionPlan" => "SearchMultiSelectField",
"compensationCurrency" => "SearchEnumMultiSelectField",
"concurrentWebServicesUser" => "SearchBooleanField",
"corporateCardProfile" => "SearchMultiSelectField",
"country" => "SearchEnumMultiSelectField",
"county" => "SearchStringField",
"dateCreated" => "SearchDateField",
Expand All @@ -560,13 +573,15 @@ class EmployeeSearchBasic extends SearchRecordBasic {
"education" => "SearchMultiSelectField",
"eligibleForCommission" => "SearchBooleanField",
"email" => "SearchStringField",
"embossedName" => "SearchStringField",
"employeeStatus" => "SearchMultiSelectField",
"employeeType" => "SearchMultiSelectField",
"employeeTypeKpi" => "SearchBooleanField",
"entityId" => "SearchStringField",
"ethnicity" => "SearchMultiSelectField",
"expenseLimit" => "SearchDoubleField",
"expenseReportCurrency" => "SearchMultiSelectField",
"expiration" => "SearchDateField",
"externalId" => "SearchMultiSelectField",
"externalIdString" => "SearchStringField",
"fax" => "SearchStringField",
Expand Down
15 changes: 15 additions & 0 deletions src/Classes/EmployeeSearchRowBasic.php
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,10 @@ class EmployeeSearchRowBasic extends SearchRowBasic {
* @var \NetSuite\Classes\SearchColumnBooleanField[]
*/
public $concurrentWebServicesUser;
/**
* @var \NetSuite\Classes\SearchColumnSelectField[]
*/
public $corporateCardProfile;
/**
* @var \NetSuite\Classes\SearchColumnEnumSelectField[]
*/
Expand Down Expand Up @@ -230,6 +234,10 @@ class EmployeeSearchRowBasic extends SearchRowBasic {
* @var \NetSuite\Classes\SearchColumnStringField[]
*/
public $email;
/**
* @var \NetSuite\Classes\SearchColumnStringField[]
*/
public $embossedName;
/**
* @var \NetSuite\Classes\SearchColumnSelectField[]
*/
Expand Down Expand Up @@ -258,6 +266,10 @@ class EmployeeSearchRowBasic extends SearchRowBasic {
* @var \NetSuite\Classes\SearchColumnSelectField[]
*/
public $expenseReportCurrency;
/**
* @var \NetSuite\Classes\SearchColumnDateField[]
*/
public $expiration;
/**
* @var \NetSuite\Classes\SearchColumnSelectField[]
*/
Expand Down Expand Up @@ -663,6 +675,7 @@ class EmployeeSearchRowBasic extends SearchRowBasic {
"comments" => "SearchColumnStringField[]",
"compensationCurrency" => "SearchColumnEnumSelectField[]",
"concurrentWebServicesUser" => "SearchColumnBooleanField[]",
"corporateCardProfile" => "SearchColumnSelectField[]",
"country" => "SearchColumnEnumSelectField[]",
"countryCode" => "SearchColumnStringField[]",
"dateCreated" => "SearchColumnDateField[]",
Expand All @@ -672,13 +685,15 @@ class EmployeeSearchRowBasic extends SearchRowBasic {
"department" => "SearchColumnSelectField[]",
"eligibleForCommission" => "SearchColumnBooleanField[]",
"email" => "SearchColumnStringField[]",
"embossedName" => "SearchColumnStringField[]",
"employeeStatus" => "SearchColumnSelectField[]",
"employeeType" => "SearchColumnSelectField[]",
"entityId" => "SearchColumnStringField[]",
"entityNumber" => "SearchColumnLongField[]",
"ethnicity" => "SearchColumnSelectField[]",
"expenseLimit" => "SearchColumnDoubleField[]",
"expenseReportCurrency" => "SearchColumnSelectField[]",
"expiration" => "SearchColumnDateField[]",
"externalId" => "SearchColumnSelectField[]",
"fax" => "SearchColumnStringField[]",
"firstName" => "SearchColumnStringField[]",
Expand Down
5 changes: 5 additions & 0 deletions src/Classes/ExpenseReport.php
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,10 @@ class ExpenseReport extends Record {
* @var \NetSuite\Classes\RecordRef
*/
public $subsidiaryTaxRegNum;
/**
* @var boolean
*/
public $policyViolated;
/**
* @var \NetSuite\Classes\CustomFieldList
*/
Expand Down Expand Up @@ -206,6 +210,7 @@ class ExpenseReport extends Record {
"taxDetailsList" => "TaxDetailsList",
"nexus" => "RecordRef",
"subsidiaryTaxRegNum" => "RecordRef",
"policyViolated" => "boolean",
"customFieldList" => "CustomFieldList",
"internalId" => "string",
"externalId" => "string",
Expand Down
Loading

1 comment on commit 8ce9ae1

@jaydenn7
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi chaps - can this be officially Released as v2021.1 ?

Please sign in to comment.