lib/netsuite/actions/get_deleted.rb in netsuite-0.9.2 vs lib/netsuite/actions/get_deleted.rb in netsuite-0.9.3
- old
+ new
@@ -1,26 +1,17 @@
module NetSuite
module Actions
- class GetDeleted
+ class GetDeleted < AbstractAction
include Support::Requests
def initialize(object = nil, options = {})
@object = object
@options = options
end
private
- def request(credentials={})
- NetSuite::Configuration.connection(
- {namespaces: {
- 'xmlns:platformMsgs' => "urn:messages_#{NetSuite::Configuration.api_version}.platform.webservices.netsuite.com",
- 'xmlns:platformCore' => "urn:core_#{NetSuite::Configuration.api_version}.platform.webservices.netsuite.com"
- }}, credentials
- ).call :get_deleted, message: request_body
- end
-
def soap_type
NetSuite::Support::Records.netsuite_type(@object)
end
# <soap:Body>
@@ -68,9 +59,22 @@
@success ||= response_body[:status][:@is_success] == 'true'
end
def response_body
@response_body ||= response_hash[:get_deleted_result]
+ end
+
+ def request_options
+ {
+ namespaces: {
+ 'xmlns:platformMsgs' => "urn:messages_#{NetSuite::Configuration.api_version}.platform.webservices.netsuite.com",
+ 'xmlns:platformCore' => "urn:core_#{NetSuite::Configuration.api_version}.platform.webservices.netsuite.com"
+ }
+ }
+ end
+
+ def action_name
+ :get_deleted
end
module Support
def self.included(base)
base.extend(ClassMethods)