Class: ActiveMerchant::Billing::MoneybookersResponse

Inherits:
Object
  • Object
show all
Defined in:
lib/active_merchant/billing/gateways/moneybookers.rb

Instance Method Summary collapse

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

Returns:

  • (Boolean)


16
17
18
# File 'lib/active_merchant/billing/gateways/moneybookers.rb', line 16

def success?
  @response =~ /^\w{32}$/
end

#tokenObject



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