Class: OnlinePayments::SDK::Domain::AuthenticationOptions

Inherits:
DataObject
  • Object
show all
Defined in:
lib/onlinepayments/sdk/domain/authentication_options.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from DataObject

new_from_hash

Instance Attribute Details

#acquirer_binString?

Returns the current value of acquirer_bin.

Returns:

  • (String, nil)

    the current value of acquirer_bin



13
14
15
# File 'lib/onlinepayments/sdk/domain/authentication_options.rb', line 13

def acquirer_bin
  @acquirer_bin
end

#acquirer_merchant_idString?

Returns the current value of acquirer_merchant_id.

Returns:

  • (String, nil)

    the current value of acquirer_merchant_id



13
14
15
# File 'lib/onlinepayments/sdk/domain/authentication_options.rb', line 13

def acquirer_merchant_id
  @acquirer_merchant_id
end

#merchant_category_codeString?

Returns the current value of merchant_category_code.

Returns:

  • (String, nil)

    the current value of merchant_category_code



13
14
15
# File 'lib/onlinepayments/sdk/domain/authentication_options.rb', line 13

def merchant_category_code
  @merchant_category_code
end

#merchant_country_codeString?

Returns the current value of merchant_country_code.

Returns:

  • (String, nil)

    the current value of merchant_country_code



13
14
15
# File 'lib/onlinepayments/sdk/domain/authentication_options.rb', line 13

def merchant_country_code
  @merchant_country_code
end

Instance Method Details

#from_hash(hash) ⇒ Object



33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# File 'lib/onlinepayments/sdk/domain/authentication_options.rb', line 33

def from_hash(hash)
  super
  if hash.has_key? 'acquirerBIN'
    @acquirer_bin = hash['acquirerBIN']
  end
  if hash.has_key? 'acquirerMerchantId'
    @acquirer_merchant_id = hash['acquirerMerchantId']
  end
  if hash.has_key? 'merchantCategoryCode'
    @merchant_category_code = hash['merchantCategoryCode']
  end
  if hash.has_key? 'merchantCountryCode'
    @merchant_country_code = hash['merchantCountryCode']
  end
end

#to_hHash

Returns:

  • (Hash)


24
25
26
27
28
29
30
31
# File 'lib/onlinepayments/sdk/domain/authentication_options.rb', line 24

def to_h
  hash = super
  hash['acquirerBIN'] = @acquirer_bin unless @acquirer_bin.nil?
  hash['acquirerMerchantId'] = @acquirer_merchant_id unless @acquirer_merchant_id.nil?
  hash['merchantCategoryCode'] = @merchant_category_code unless @merchant_category_code.nil?
  hash['merchantCountryCode'] = @merchant_country_code unless @merchant_country_code.nil?
  hash
end