Skip to content

Instantly share code, notes, and snippets.

/j.rb Secret

Created June 6, 2016 17:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/fa2eb24a6309e9d9d5a3bb557350a7e5 to your computer and use it in GitHub Desktop.
Save anonymous/fa2eb24a6309e9d9d5a3bb557350a7e5 to your computer and use it in GitHub Desktop.
def call(credentials)
header_info = get_oauth_token(credentials)
namespaces = {"xmlns:ns0" => "https://...", "xmlns:ns1 = />" => "http://...",}
client = Savon.client(wsdl: '../....wsdl',
endpoint: 'https://...',
# convert_request_keys_to: :camelcase,
namespaces: namespaces,
headers: {
"Authorization" => header_info[:token],
"csn" => "...",
"timestamp" => header_info[:timestamp],
"signature" => header_info[:signature],
"content-type" => "application/xml"
})
client.call(:match_account_contact, message: {
"xmlns:ns0:..." => {
"xmlns:ns1 = :.../>" => "...",
"xmlns:ns1 = :.../>" => "...",
"xmlns:ns1 = :.../>" => "..."
},
"xmlns:ns0:RequestContext" => {
"xmlns:ns0:..." => "...",
"xmlns:ns0:..." => "..."
"xmlns:ns0:..." => "...",
"xmlns:ns0:..." => "...",
"xmlns:ns0:..." => "...",
"xmlns:ns0:..." => "..."
},
"xmlns:ns0:..." => {
"xmlns:ns0:..." => "...",
"xmlns:ns0:..." => "...",
"xmlns:ns0:..." => {
"xmlns:ns0:..." => "...",
"xmlns:ns0:..." => " ",
"xmlns:ns0:..." => "...",
"xmlns:ns0:..." => "...",
"xmlns:ns0:..." => " ",
"xmlns:ns0:..." => "...",
"xmlns:ns0:..." => "...",
"xmlns:ns0:..." => " ",
"xmlns:ns0:..." => "...",
"xmlns:ns0:..." => "..."
},
"xmlns:ns0:..." =>
},
"xmlns:ns0:..." => {
"xmlns:ns0:..." => "...",
"xmlns:ns0:..." => "...",
"xmlns:ns0:..." => "..."
}
})
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment