class Cb::Clients::ApplicationExternal

Public Class Methods

submit_app(app) click to toggle source
# File lib/cb/clients/application_external.rb, line 16
def self.submit_app(app)
  fail Cb::IncomingParamIsWrongTypeException unless app.is_a?(Cb::Models::ApplicationExternal)

  xml_hash = cb_client.cb_post(Cb.configuration.uri_application_external, body: app.to_xml)

  if xml_hash.key? 'ApplyUrl'
    app.apply_url = xml_hash['ApplyUrl']
  else
    app.apply_url = ''
  end

  cb_client.append_api_responses(app, xml_hash)
end