Class: PaymentHighway::Config

Inherits:
Object
  • Object
show all
Defined in:
lib/payment_highway/config.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(account:, key:, secret:, merchant: nil, service: 'https://v1.api.paymenthighway.io', version: PaymentHighway::API_VERSION) ⇒ Config

Returns a new instance of Config.



4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# File 'lib/payment_highway/config.rb', line 4

def initialize(
  account:,
  key:,
  secret:,
  merchant: nil, # This is optional only and it's used if account has sub merchant
  service: 'https://v1.api.paymenthighway.io',
  version: PaymentHighway::API_VERSION
)
  @account = 
  @merchant = merchant
  @key = key
  @secret = secret
  @service = service
  @version = version
end

Instance Attribute Details

#accountObject

Returns the value of attribute account.



3
4
5
# File 'lib/payment_highway/config.rb', line 3

def 
  @account
end

#keyObject

Returns the value of attribute key.



3
4
5
# File 'lib/payment_highway/config.rb', line 3

def key
  @key
end

#merchantObject

Returns the value of attribute merchant.



3
4
5
# File 'lib/payment_highway/config.rb', line 3

def merchant
  @merchant
end

#secretObject

Returns the value of attribute secret.



3
4
5
# File 'lib/payment_highway/config.rb', line 3

def secret
  @secret
end

#serviceObject

Returns the value of attribute service.



3
4
5
# File 'lib/payment_highway/config.rb', line 3

def service
  @service
end

#versionObject

Returns the value of attribute version.



3
4
5
# File 'lib/payment_highway/config.rb', line 3

def version
  @version
end