Class: OnlinePayments::SDK::Domain::VisaAuthenticationOptions

Inherits:
DataObject
  • Object
show all
Defined in:
lib/onlinepayments/sdk/domain/visa_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



12
13
14
# File 'lib/onlinepayments/sdk/domain/visa_authentication_options.rb', line 12

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



12
13
14
# File 'lib/onlinepayments/sdk/domain/visa_authentication_options.rb', line 12

def acquirer_merchant_id
  @acquirer_merchant_id
end

#merchant_nameString?

Returns the current value of merchant_name.

Returns:

  • (String, nil)

    the current value of merchant_name



12
13
14
# File 'lib/onlinepayments/sdk/domain/visa_authentication_options.rb', line 12

def merchant_name
  @merchant_name
end

Instance Method Details

#from_hash(hash) ⇒ Object



29
30
31
32
33
34
35
36
37
38
39
40
# File 'lib/onlinepayments/sdk/domain/visa_authentication_options.rb', line 29

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? 'merchantName'
    @merchant_name = hash['merchantName']
  end
end

#to_hHash

Returns:

  • (Hash)


21
22
23
24
25
26
27
# File 'lib/onlinepayments/sdk/domain/visa_authentication_options.rb', line 21

def to_h
  hash = super
  hash['acquirerBIN'] = @acquirer_bin unless @acquirer_bin.nil?
  hash['acquirerMerchantId'] = @acquirer_merchant_id unless @acquirer_merchant_id.nil?
  hash['merchantName'] = @merchant_name unless @merchant_name.nil?
  hash
end