class ExperianMS::API
Public Class Methods
new(options={})
click to toggle source
Creates a new API
# File lib/experian_ms/api.rb, line 12 def initialize(options={}) options = ExperianMS.options.merge(options) Configuration::VALID_OPTIONS_KEYS.each do |key| send("#{key}=", options[key]) end self.class.base_uri base_url end
Public Instance Methods
change_base_uri=(uri)
click to toggle source
# File lib/experian_ms/api.rb, line 20 def change_base_uri=(uri) send(:base_url, uri) self.class.base_uri uri end
config()
click to toggle source
# File lib/experian_ms/api.rb, line 25 def config conf = {} Configuration::VALID_OPTIONS_KEYS.each do |key| conf[key] = send key end conf end
request(xml, end_point = '/ats/XmlPost/PostSecureAuth2/')
click to toggle source
# File lib/experian_ms/api.rb, line 33 def request(xml, end_point = '/ats/XmlPost/PostSecureAuth2/') authenticate post(xml, end_point) end
Private Instance Methods
post(xml, end_point)
click to toggle source
# File lib/experian_ms/api.rb, line 40 def post(xml, end_point) self.class.post(end_point, headers: grant_header.merge("Content-Type" => content_type), body: xml, debug_output: $stdout).parsed_response end