Module: Docdata
- Defined in:
- lib/docdata.rb,
lib/docdata/bank.rb,
lib/docdata/ideal.rb,
lib/docdata/engine.rb,
lib/docdata/refund.rb,
lib/docdata/payment.rb,
lib/docdata/shopper.rb,
lib/docdata/version.rb,
lib/docdata/response.rb,
lib/docdata/line_item.rb
Overview
Docdata Module
Defined Under Namespace
Modules: Config Classes: Bank, Engine, Ideal, LineItem, LineItemValidator, Payment, PaymentValidator, Refund, RefundValidator, Response, Shopper, ShopperValidator
Constant Summary collapse
- API_VERSION =
1
- VERSION =
"0.2.3"
Class Method Summary collapse
- .client ⇒ Object
-
.set_credentials_from_environment ⇒ Object
For testing purpose only: set the username and password in environment variables to make the tests pass with your test credentials.
-
.setup {|_self| ... } ⇒ Object
sets up configuration.
- .url ⇒ Object
-
.version ⇒ Object
returns the version number.
Class Method Details
.client ⇒ Object
79 80 81 |
# File 'lib/docdata.rb', line 79 def self.client Savon.client(wsdl: url) end |
.set_credentials_from_environment ⇒ Object
For testing purpose only: set the username and password in environment variables to make the tests pass with your test credentials.
73 74 75 76 77 |
# 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| ... } ⇒ Object
sets up configuration
56 57 58 |
# File 'lib/docdata.rb', line 56 def self.setup yield self end |
.url ⇒ Object
60 61 62 63 64 65 66 67 68 |
# 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 ⇒ Object
returns the version number
51 52 53 |
# File 'lib/docdata.rb', line 51 def self.version VERSION end |