Class: OnlinePayments::SDK::Domain::FraudFields
- Inherits:
-
DataObject
- Object
- DataObject
- OnlinePayments::SDK::Domain::FraudFields
- Defined in:
- lib/onlinepayments/sdk/domain/fraud_fields.rb
Instance Attribute Summary collapse
-
#black_list_data ⇒ String
The current value of black_list_data.
-
#customer_ip_address ⇒ Object
deprecated
Deprecated.
Use order.customer.device.ipAddress instead. The IP Address of the customer that is making the payment
-
#product_categories ⇒ Array<String>
The current value of product_categories.
Instance Method Summary collapse
Methods inherited from DataObject
Instance Attribute Details
#black_list_data ⇒ String
Returns the current value of black_list_data.
12 13 14 |
# File 'lib/onlinepayments/sdk/domain/fraud_fields.rb', line 12 def black_list_data @black_list_data end |
#customer_ip_address ⇒ Object
Deprecated.
Use order.customer.device.ipAddress instead. The IP Address of the customer that is making the payment
12 13 14 |
# File 'lib/onlinepayments/sdk/domain/fraud_fields.rb', line 12 def customer_ip_address @customer_ip_address end |
#product_categories ⇒ Array<String>
Returns the current value of product_categories.
12 13 14 |
# File 'lib/onlinepayments/sdk/domain/fraud_fields.rb', line 12 def product_categories @product_categories end |
Instance Method Details
#from_hash(hash) ⇒ Object
30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 |
# File 'lib/onlinepayments/sdk/domain/fraud_fields.rb', line 30 def from_hash(hash) super if hash.has_key? 'blackListData' @black_list_data = hash['blackListData'] end if hash.has_key? 'customerIpAddress' @customer_ip_address = hash['customerIpAddress'] end if hash.has_key? 'productCategories' raise TypeError, "value '%s' is not an Array" % [hash['productCategories']] unless hash['productCategories'].is_a? Array @product_categories = [] hash['productCategories'].each do |e| @product_categories << e end end end |
#to_h ⇒ Hash
22 23 24 25 26 27 28 |
# File 'lib/onlinepayments/sdk/domain/fraud_fields.rb', line 22 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['productCategories'] = @product_categories unless @product_categories.nil? hash end |