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

Add support for endpoint field for WSDL version upgrade #19

Merged
merged 2 commits into from
Aug 22, 2023
Merged
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
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