module Docdata

Docdata Module

Constants

API_VERSION
VERSION

Public Class Methods

client() click to toggle source
# File lib/docdata.rb, line 79
def self.client
  Savon.client(wsdl: url)
end
set_credentials_from_environment() click to toggle source

For testing purpose only: set the username and password in environment variables to make the tests pass with your test credentials.

# File lib/docdata.rb, line 73
def self.set_credentials_from_environment
  Config.password   = ENV["DOCDATA_PASSWORD"]
  Config.username   = ENV["DOCDATA_USERNAME"]
  Config.return_url = ENV["DOCDATA_RETURN_URL"]
end
setup() { |self| ... } click to toggle source

sets up configuration

# File lib/docdata.rb, line 56
def self.setup
  yield self
end
url() click to toggle source
# File lib/docdata.rb, line 60
def self.url
  if Config.test_mode
    "https://test.docdatapayments.com/ps/services/paymentservice/1_1?wsdl"
  else
    # "https://www.docdatapayments.com/ps/services/paymentservice/1_1?wsdl"
    # "https://secure.docdatapayments.com/ps/services/paymentservice/1_0?wsdl"
    "https://secure.docdatapayments.com/ps/services/paymentservice/1_1?wsdl"
  end
end
version() click to toggle source

returns the version number

# File lib/docdata.rb, line 51
def self.version
  VERSION
end