Class: OnlinePayments::SDK::Domain::FraudFields

Inherits:
OnlinePayments::SDK::DataObject show all
Defined in:
lib/onlinepayments/sdk/domain/fraud_fields.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from OnlinePayments::SDK::DataObject

new_from_hash

Instance Attribute Details

#black_list_dataString

Returns the current value of black_list_data.

Returns:

  • (String)

    the current value of black_list_data



11
12
13
# File 'lib/onlinepayments/sdk/domain/fraud_fields.rb', line 11

def black_list_data
  @black_list_data
end

#customer_ip_addressString

Returns the current value of customer_ip_address.

Returns:

  • (String)

    the current value of customer_ip_address



11
12
13
# File 'lib/onlinepayments/sdk/domain/fraud_fields.rb', line 11

def customer_ip_address
  @customer_ip_address
end

Instance Method Details

#from_hash(hash) ⇒ Object



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

def from_hash(hash)
  super
  @black_list_data = hash['blackListData'] if hash.key? 'blackListData'
  @customer_ip_address = hash['customerIpAddress'] if hash.key? 'customerIpAddress'
end

#to_hHash

Returns:

  • (Hash)


16
17
18
19
20
21
# File 'lib/onlinepayments/sdk/domain/fraud_fields.rb', line 16

def to_h
  hash = super
  hash['blackListData'] = @black_list_data unless @black_list_data.nil?
  hash['customerIpAddress'] = @customer_ip_address unless @customer_ip_address.nil?
  hash
end