lib/netsuite/actions/get_all.rb in netsuite-0.9.2 vs lib/netsuite/actions/get_all.rb in netsuite-0.9.3
- old
+ new
@@ -1,23 +1,17 @@
# https://system.netsuite.com/help/helpcenter/en_US/Output/Help/SuiteCloudCustomizationScriptingWebServices/SuiteTalkWebServices/getAll.html
module NetSuite
module Actions
- class GetAll
+ class GetAll < AbstractAction
include Support::Requests
def initialize(klass)
@klass = klass
end
private
- def request(credentials={})
- NetSuite::Configuration.connection(
- { element_form_default: :unqualified }, credentials
- ).call(:get_all, message: request_body)
- end
-
# <soap:Body>
# <platformMsgs:getAll>
# <record>
# <recordType>salesTaxItem</recordType>
# </record>
@@ -45,9 +39,19 @@
end
end
def response_hash
@response_hash ||= @response.body[:get_all_response][:get_all_result]
+ end
+
+ def request_options
+ {
+ element_form_default: :unqualified
+ }
+ end
+
+ def action_name
+ :get_all
end
module Support
def self.included(base)