Skip to content

Commit

Permalink
Merge pull request #19 from mavenlink/add-endpoint-to-client-connection
Browse files Browse the repository at this point in the history
Add support for endpoint field for WSDL version upgrade
  • Loading branch information
simeon13 authored Aug 22, 2023
2 parents f384d73 + 36ab54c commit 5549cca
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion lib/netsuite/configuration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ def attributes
def connection(params={}, credentials={})
client = Savon.client({
wsdl: (credentials[:wsdl] && !credentials[:wsdl].empty?) ? credentials[:wsdl] : wsdl,
endpoint: credentials[:endpoint],
read_timeout: read_timeout,
namespaces: namespaces,
soap_header: auth_header(credentials).update(soap_header),
Expand Down Expand Up @@ -79,7 +80,7 @@ def api_version(version = nil)
if version
self.api_version = version
else
attributes[:api_version] ||= '2015_1'
attributes[:api_version] ||= '2023_1'
end
end

Expand Down
4 changes: 2 additions & 2 deletions lib/netsuite/utilities.rb
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,11 @@ def netsuite_data_center_urls(account_id)
# as of 1/20/18 NS will start using the account ID to determine
# if a account is sandbox (123_SB1) as opposed to using a sandbox domain

wsdl: 'https://webservices.netsuite.com/wsdl/v2017_2_0/netsuite.wsdl',
wsdl: 'https://webservices.netsuite.com/wsdl/v2023_1_0/netsuite.wsdl',

# NOTE don't inherit default namespace settings, it includes the API version
namespaces: {
'xmlns:platformCore' => "urn:core_2017_2.platform.webservices.netsuite.com"
'xmlns:platformCore' => "urn:core_2023_1.platform.webservices.netsuite.com"
},

soap_header: {}
Expand Down

0 comments on commit 5549cca

Please sign in to comment.