Module: Twoctwop::Config

Extended by:
Config
Included in:
Twoctwop, Config
Defined in:
lib/twoctwop/config.rb

Overview

Twoctwop::Config.configure do |config|

config.merchant_id = '111'
config.secret_key  = '12345678'
config.private_key = 'private key goes here'
config.certificate = 'certifiate goes here'
config.passphrase  = 'if private key has passphrase'

end

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#certificateObject

Returns the value of attribute certificate.



20
21
22
# File 'lib/twoctwop/config.rb', line 20

def certificate
  @certificate
end

#endpointObject

Returns the value of attribute endpoint.



20
21
22
# File 'lib/twoctwop/config.rb', line 20

def endpoint
  @endpoint
end

#merchant_idObject

Returns the value of attribute merchant_id.



20
21
22
# File 'lib/twoctwop/config.rb', line 20

def merchant_id
  @merchant_id
end

#passphraseObject

Returns the value of attribute passphrase.



20
21
22
# File 'lib/twoctwop/config.rb', line 20

def passphrase
  @passphrase
end

#private_keyObject

Returns the value of attribute private_key.



20
21
22
# File 'lib/twoctwop/config.rb', line 20

def private_key
  @private_key
end

#secret_keyObject

Returns the value of attribute secret_key.



20
21
22
# File 'lib/twoctwop/config.rb', line 20

def secret_key
  @secret_key
end

Instance Method Details

#configure {|_self| ... } ⇒ Object

Yields:

  • (_self)

Yield Parameters:



22
23
24
# File 'lib/twoctwop/config.rb', line 22

def configure
  yield self  
end