Class: ActiveMerchant::Billing::MoneybookersResponse
- Inherits:
-
Object
- Object
- ActiveMerchant::Billing::MoneybookersResponse
- Defined in:
- lib/active_merchant/billing/gateways/moneybookers.rb
Instance Method Summary collapse
-
#initialize(response_body) ⇒ MoneybookersResponse
constructor
A new instance of MoneybookersResponse.
- #success? ⇒ Boolean
- #token ⇒ Object
Constructor Details
#initialize(response_body) ⇒ MoneybookersResponse
Returns a new instance of MoneybookersResponse.
4 5 6 |
# File 'lib/active_merchant/billing/gateways/moneybookers.rb', line 4 def initialize response_body @response = response_body end |
Instance Method Details
#success? ⇒ Boolean
16 17 18 |
# File 'lib/active_merchant/billing/gateways/moneybookers.rb', line 16 def success? @response =~ /^\w{32}$/ end |
#token ⇒ Object
8 9 10 11 12 13 14 |
# File 'lib/active_merchant/billing/gateways/moneybookers.rb', line 8 def token return result = if(success?) @response else nil end end |