lib/netsuite/actions/upsert.rb in netsuite-0.2.4 vs lib/netsuite/actions/upsert.rb in netsuite-0.2.5
- old
+ new
@@ -9,12 +9,12 @@
@object = object
end
private
- def request
- NetSuite::Configuration.connection.call :upsert, :message => request_body
+ def request(credentials={})
+ NetSuite::Configuration.connection({}, credentials).call :upsert, :message => request_body
end
# <soap:Body>
# <platformMsgs:upsert>
# <platformMsgs:record xsi:type="listRel:Customer">
@@ -68,11 +68,11 @@
NetSuite::Error.new(error)
end
end
module Support
- def upsert
- response = NetSuite::Actions::Upsert.call(self)
+ def upsert(credentials={})
+ response = NetSuite::Actions::Upsert.call([self], credentials)
@errors = response.errors
if response.success?
@internal_id = response.body[:@internal_id]