Class: Worldline::Connect::SDK::V1::Domain::FraudFields

Inherits:
Domain::DataObject show all
Defined in:
lib/worldline/connect/sdk/v1/domain/fraud_fields.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Domain::DataObject

new_from_hash

Instance Attribute Details

#addresses_are_identicalObject

Deprecated.

For risk assessments there is no replacement. For other calls, use Order.shipping.addressIndicator instead



32
33
34
# File 'lib/worldline/connect/sdk/v1/domain/fraud_fields.rb', line 32

def addresses_are_identical
  @addresses_are_identical
end

#black_list_dataString

Returns the current value of black_list_data.

Returns:

  • (String)

    the current value of black_list_data



32
33
34
# File 'lib/worldline/connect/sdk/v1/domain/fraud_fields.rb', line 32

def black_list_data
  @black_list_data
end

#card_owner_addressObject

Deprecated.

This should be the same as Order.customer.billingAddress



32
33
34
# File 'lib/worldline/connect/sdk/v1/domain/fraud_fields.rb', line 32

def card_owner_address
  @card_owner_address
end

#customer_ip_addressString

Returns the current value of customer_ip_address.

Returns:

  • (String)

    the current value of customer_ip_address



32
33
34
# File 'lib/worldline/connect/sdk/v1/domain/fraud_fields.rb', line 32

def customer_ip_address
  @customer_ip_address
end

#default_form_fillObject

Deprecated.

Use Order.customer.device.defaultFormFill instead



32
33
34
# File 'lib/worldline/connect/sdk/v1/domain/fraud_fields.rb', line 32

def default_form_fill
  @default_form_fill
end

#device_fingerprint_activatedObject

Deprecated.

No replacement



32
33
34
# File 'lib/worldline/connect/sdk/v1/domain/fraud_fields.rb', line 32

def device_fingerprint_activated
  @device_fingerprint_activated
end

#device_fingerprint_transaction_idObject

Deprecated.

Use Order.customer.device.deviceFingerprintTransactionId instead



32
33
34
# File 'lib/worldline/connect/sdk/v1/domain/fraud_fields.rb', line 32

def device_fingerprint_transaction_id
  @device_fingerprint_transaction_id
end

#gift_card_typeString

Returns the current value of gift_card_type.

Returns:

  • (String)

    the current value of gift_card_type



32
33
34
# File 'lib/worldline/connect/sdk/v1/domain/fraud_fields.rb', line 32

def gift_card_type
  @gift_card_type
end

#gift_messageString

Returns the current value of gift_message.

Returns:

  • (String)

    the current value of gift_message



32
33
34
# File 'lib/worldline/connect/sdk/v1/domain/fraud_fields.rb', line 32

def gift_message
  @gift_message
end

#has_forgotten_pwdObject

Deprecated.

Use Order.customer.account.hasForgottenPassword instead



32
33
34
# File 'lib/worldline/connect/sdk/v1/domain/fraud_fields.rb', line 32

def has_forgotten_pwd
  @has_forgotten_pwd
end

#has_passwordObject

Deprecated.

Use Order.customer.account.hasPassword instead



32
33
34
# File 'lib/worldline/connect/sdk/v1/domain/fraud_fields.rb', line 32

def has_password
  @has_password
end

#is_previous_customerObject

Deprecated.

Use Order.customer.isPreviousCustomer instead



32
33
34
# File 'lib/worldline/connect/sdk/v1/domain/fraud_fields.rb', line 32

def is_previous_customer
  @is_previous_customer
end

#order_timezoneString

Returns the current value of order_timezone.

Returns:

  • (String)

    the current value of order_timezone



32
33
34
# File 'lib/worldline/connect/sdk/v1/domain/fraud_fields.rb', line 32

def order_timezone
  @order_timezone
end

#ship_commentsObject

Deprecated.

Use Order.shipping.comments instead



32
33
34
# File 'lib/worldline/connect/sdk/v1/domain/fraud_fields.rb', line 32

def ship_comments
  @ship_comments
end

#shipment_tracking_numberObject

Deprecated.

Use Order.shipping.trackingNumber instead



32
33
34
# File 'lib/worldline/connect/sdk/v1/domain/fraud_fields.rb', line 32

def shipment_tracking_number
  @shipment_tracking_number
end

#shipping_detailsObject

Deprecated.

No replacement



32
33
34
# File 'lib/worldline/connect/sdk/v1/domain/fraud_fields.rb', line 32

def shipping_details
  @shipping_details
end

#user_dataArray<String>

Returns the current value of user_data.

Returns:

  • (Array<String>)

    the current value of user_data



32
33
34
# File 'lib/worldline/connect/sdk/v1/domain/fraud_fields.rb', line 32

def user_data
  @user_data
end

#websiteObject

Deprecated.

Use Merchant.websiteUrl instead



32
33
34
# File 'lib/worldline/connect/sdk/v1/domain/fraud_fields.rb', line 32

def website
  @website
end

Instance Method Details

#from_hash(hash) ⇒ Object



106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
# File 'lib/worldline/connect/sdk/v1/domain/fraud_fields.rb', line 106

def from_hash(hash)
  super
  if hash.has_key? 'addressesAreIdentical'
    @addresses_are_identical = hash['addressesAreIdentical']
  end
  if hash.has_key? 'blackListData'
    @black_list_data = hash['blackListData']
  end
  if hash.has_key? 'cardOwnerAddress'
    raise TypeError, "value '%s' is not a Hash" % [hash['cardOwnerAddress']] unless hash['cardOwnerAddress'].is_a? Hash
    @card_owner_address = Worldline::Connect::SDK::V1::Domain::Address.new_from_hash(hash['cardOwnerAddress'])
  end
  if hash.has_key? 'customerIpAddress'
    @customer_ip_address = hash['customerIpAddress']
  end
  if hash.has_key? 'defaultFormFill'
    @default_form_fill = hash['defaultFormFill']
  end
  if hash.has_key? 'deviceFingerprintActivated'
    @device_fingerprint_activated = hash['deviceFingerprintActivated']
  end
  if hash.has_key? 'deviceFingerprintTransactionId'
    @device_fingerprint_transaction_id = hash['deviceFingerprintTransactionId']
  end
  if hash.has_key? 'giftCardType'
    @gift_card_type = hash['giftCardType']
  end
  if hash.has_key? 'giftMessage'
    @gift_message = hash['giftMessage']
  end
  if hash.has_key? 'hasForgottenPwd'
    @has_forgotten_pwd = hash['hasForgottenPwd']
  end
  if hash.has_key? 'hasPassword'
    @has_password = hash['hasPassword']
  end
  if hash.has_key? 'isPreviousCustomer'
    @is_previous_customer = hash['isPreviousCustomer']
  end
  if hash.has_key? 'orderTimezone'
    @order_timezone = hash['orderTimezone']
  end
  if hash.has_key? 'shipComments'
    @ship_comments = hash['shipComments']
  end
  if hash.has_key? 'shipmentTrackingNumber'
    @shipment_tracking_number = hash['shipmentTrackingNumber']
  end
  if hash.has_key? 'shippingDetails'
    raise TypeError, "value '%s' is not a Hash" % [hash['shippingDetails']] unless hash['shippingDetails'].is_a? Hash
    @shipping_details = Worldline::Connect::SDK::V1::Domain::FraudFieldsShippingDetails.new_from_hash(hash['shippingDetails'])
  end
  if hash.has_key? 'userData'
    raise TypeError, "value '%s' is not an Array" % [hash['userData']] unless hash['userData'].is_a? Array
    @user_data = []
    hash['userData'].each do |e|
      @user_data << e
    end
  end
  if hash.has_key? 'website'
    @website = hash['website']
  end
end

#to_hHash

Returns:

  • (Hash)


83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
# File 'lib/worldline/connect/sdk/v1/domain/fraud_fields.rb', line 83

def to_h
  hash = super
  hash['addressesAreIdentical'] = @addresses_are_identical unless @addresses_are_identical.nil?
  hash['blackListData'] = @black_list_data unless @black_list_data.nil?
  hash['cardOwnerAddress'] = @card_owner_address.to_h unless @card_owner_address.nil?
  hash['customerIpAddress'] = @customer_ip_address unless @customer_ip_address.nil?
  hash['defaultFormFill'] = @default_form_fill unless @default_form_fill.nil?
  hash['deviceFingerprintActivated'] = @device_fingerprint_activated unless @device_fingerprint_activated.nil?
  hash['deviceFingerprintTransactionId'] = @device_fingerprint_transaction_id unless @device_fingerprint_transaction_id.nil?
  hash['giftCardType'] = @gift_card_type unless @gift_card_type.nil?
  hash['giftMessage'] = @gift_message unless @gift_message.nil?
  hash['hasForgottenPwd'] = @has_forgotten_pwd unless @has_forgotten_pwd.nil?
  hash['hasPassword'] = @has_password unless @has_password.nil?
  hash['isPreviousCustomer'] = @is_previous_customer unless @is_previous_customer.nil?
  hash['orderTimezone'] = @order_timezone unless @order_timezone.nil?
  hash['shipComments'] = @ship_comments unless @ship_comments.nil?
  hash['shipmentTrackingNumber'] = @shipment_tracking_number unless @shipment_tracking_number.nil?
  hash['shippingDetails'] = @shipping_details.to_h unless @shipping_details.nil?
  hash['userData'] = @user_data unless @user_data.nil?
  hash['website'] = @website unless @website.nil?
  hash
end