Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updates sandbox url to new address #383

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ NetSuite.configure do
api_version '2012_1'

# optionally specify full wsdl URL (to switch to sandbox, for example)
wsdl "https://webservices.sandbox.netsuite.com/wsdl/v#{api_version}_0/netsuite.wsdl"
wsdl "https://system.netsuite.com/wsdl/v#{api_version}_0/netsuite.wsdl"

Choose a reason for hiding this comment

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

should this be "https://webservices.netsuite.com/wsdl/v#{api_version}_0/netsuite.wsdl"? In order to get this working correctly for our current setup we had to use the former url not the system one

Choose a reason for hiding this comment

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

Correct. You may have to add in the Data Center (ie. na1, na2) if users aren't going to use data center agnostic rules.

From NetSuite Help Docs:

The format of an account-specific domain name is: ..netsuite.com. For example, if your account ID is 123456, your account-specific domains would be:
123456.suitetalk.api.netsuite.com
123456.restlets.api.netsuite.com
123456.shop.netsuite.com

As of 2017.2, account-specific domains are supported for SuiteTalk (web services), RESTlets, and External Catalog (WSDK) shopping sites. These account-specific domains are unique to your account because they contain your account ID as part of the domain name. These domains do not change when your account is moved to a different data center.

Format of a Data Center-Specific NetSuite URL

For web services, rest, and External Catalog (WSDK) site URLs, consider using account-specific URLs rather than data center-specific URLs. See URLs for Account-Specific Domains.

Data center-specific NetSuite URLs are strings made up of the following parameters: ...netsuite.com.

Choose a reason for hiding this comment

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

Ignorant question: How do you find your account id?

Copy link
Member

Choose a reason for hiding this comment

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

@cooncesean Navigate to the SuiteTalk preferences via “Setup > Integration > Web Services Preferences” to find this ID.


# if your datacenter is being switched, you'll have to manually set your wsdl location
wsdl "https://webservices.na2.netsuite.com/wsdl/v#{api_version}_0/netsuite.wsdl"
Expand Down Expand Up @@ -570,4 +570,4 @@ states.to_array.first[:get_all_response][:get_all_result][:record_list][:record]

# About SuiteSync

[SuiteSync, the Stripe-NetSuite integration](http://suitesync.io) uses this gem and funds the majority of it's development and maintenance.
[SuiteSync, the Stripe-NetSuite integration](http://suitesync.io) uses this gem and funds the majority of it's development and maintenance.
4 changes: 2 additions & 2 deletions lib/netsuite/configuration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ def wsdl(wsdl = nil)
else
attributes[:wsdl] ||= begin
if sandbox
"https://webservices.sandbox.netsuite.com/wsdl/v#{api_version}_0/netsuite.wsdl"
"https://system.netsuite.com/wsdl/v#{api_version}_0/netsuite.wsdl"
else
"https://#{wsdl_domain}/wsdl/v#{api_version}_0/netsuite.wsdl"
end
Expand All @@ -138,7 +138,7 @@ def wsdl_domain(wsdl_domain = nil)
else
# if sandbox, this parameter is ignored
if sandbox
'webservices.sandbox.netsuite.com'
'system.netsuite.com'
else
attributes[:wsdl_domain] ||= 'webservices.netsuite.com'
end
Expand Down
2 changes: 1 addition & 1 deletion lib/netsuite/namespaces/list_emp.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ module NetSuite
module Namespaces
module ListEmp

# https://webservices.sandbox.netsuite.com/xsd/lists/v2013_2_0/employees.xsd
# https://system.netsuite.com/xsd/lists/v2013_2_0/employees.xsd
def record_namespace
'listEmp'
end
Expand Down
2 changes: 1 addition & 1 deletion lib/netsuite/namespaces/list_mkt.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ module NetSuite
module Namespaces
module ListMkt

# https://webservices.sandbox.netsuite.com/xsd/lists/v2013_2_0/marketing.xsd
# https://system.netsuite.com/xsd/lists/v2013_2_0/marketing.xsd
def record_namespace
'listMkt'
end
Expand Down
4 changes: 2 additions & 2 deletions spec/netsuite/configuration_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -355,8 +355,8 @@
expect(config.wsdl).to include('custom.domain.com')

config.sandbox = true
expect(config.wsdl_domain).to eq('webservices.sandbox.netsuite.com')
expect(config.wsdl).to include('webservices.sandbox.netsuite.com')
expect(config.wsdl_domain).to eq('system.netsuite.com')
expect(config.wsdl).to include('system.netsuite.com')
end

describe '#logger=' do
Expand Down