lib/pack_material/services/integrate_bulk_stock_adjustment.rb
def call
      return failed_response('Bulk Stock Adjustment does not exist') unless @bsa

      request_xml = build_xml
      return request_xml if @just_show_xml

      log_string = '_so_xml'
      @log_repo.log_infodump('integrate_bsa', @id, 'sending' + log_string, request_xml)

      res = make_http_call(request_xml)
      @log_repo.log_infodump('integrate_bsa', @id, 'response' + log_string, res.instance.body)

      formatted_res = format_response(res.instance.body)
      apply_changes(formatted_res)
    end
# rubocop:disable Metrics/ClassLength
# Send XML representation to accounting system.
# - use the `just_show_xml` flag to check the XML output without modifying the db.
#
# @param user_name [string] the user who initiated this task.
# @param [Integer] mr_bulk_stock_adjustment_id
# @param just_show_xml [bool] set to true to just return XML from the call without updating the db.
disable Metrics/ClassLength
Send XML representation to accounting system.
use the `just_show_xml` flag to check the XML output without modifying the db.
disable Metrics / ClassLength Send XML representation to accounting system . use the ` just_show_xml ` flag to check the XML output without modifying the db .
def call
      return failed_response('Bulk Stock Adjustment does not exist') unless @bsa
      request_xml = build_xml
      return request_xml if @just_show_xml
      log_string = '_so_xml'
      @log_repo.log_infodump('integrate_bsa', @id, 'sending' + log_string, request_xml)
      res = make_http_call(request_xml)
      @log_repo.log_infodump('integrate_bsa', @id, 'response' + log_string, res.instance.body)
      formatted_res = format_response(res.instance.body)
      apply_changes(formatted_res)
    end
def call return failed_response ( 'Bulk Stock Adjustment does not exist' ) unless @bsa request_xml = build_xml return request_xml if @just_show_xml log_string = '_so_xml' @log_repo . log_infodump ( 'integrate_bsa' , @id , 'sending' + log_string , request_xml ) res = make_http_call ( request_xml ) @log_repo . log_infodump ( 'integrate_bsa' , @id , 'response' + log_string , res . instance . body ) formatted_res = format_response ( res . instance . body ) apply_changes ( formatted_res ) end
rubocop:disable Metrics/ClassLength
Send XML representation to accounting system.
rubocop : disable Metrics / ClassLength Send XML representation to accounting system .
user_name
the user who initiated this task.
the user who initiated this task .
None
just_show_xml
set to true to just return XML from the call without updating the db.
set to true to just return XML from the call without updating the db .