Class: ProcessOut::InvoiceExternalFraudTools
- Inherits:
-
Object
- Object
- ProcessOut::InvoiceExternalFraudTools
- Defined in:
- lib/processout/invoice_external_fraud_tools.rb
Instance Attribute Summary collapse
-
#forter ⇒ Object
Returns the value of attribute forter.
-
#ravelin ⇒ Object
Returns the value of attribute ravelin.
-
#riskified ⇒ Object
Returns the value of attribute riskified.
-
#signifyd ⇒ Object
Returns the value of attribute signifyd.
Instance Method Summary collapse
-
#fill_with_data(data) ⇒ Object
Fills the object with data coming from the API Params:
data::Hashof data coming from the API. -
#initialize(client, data = {}) ⇒ InvoiceExternalFraudTools
constructor
Initializes the InvoiceExternalFraudTools object Params:
client::ProcessOutclient instancedata:: data that can be used to fill the object. -
#new(data = {}) ⇒ Object
Create a new InvoiceExternalFraudTools using the current client.
-
#prefill(data) ⇒ Object
Prefills the object with the data passed as parameters Params:
data::Hashof data. -
#to_json(options) ⇒ Object
Overrides the JSON marshaller to only send the fields we want.
Constructor Details
#initialize(client, data = {}) ⇒ InvoiceExternalFraudTools
Initializes the InvoiceExternalFraudTools object Params:
clientProcessOutclient instancedatadata that can be used to fill the object
42 43 44 45 46 47 48 49 50 |
# File 'lib/processout/invoice_external_fraud_tools.rb', line 42 def initialize(client, data = {}) @client = client self.forter = data.fetch(:forter, nil) self.ravelin = data.fetch(:ravelin, nil) self.signifyd = data.fetch(:signifyd, nil) self.riskified = data.fetch(:riskified, nil) end |
Instance Attribute Details
#forter ⇒ Object
Returns the value of attribute forter.
11 12 13 |
# File 'lib/processout/invoice_external_fraud_tools.rb', line 11 def forter @forter end |
#ravelin ⇒ Object
Returns the value of attribute ravelin.
12 13 14 |
# File 'lib/processout/invoice_external_fraud_tools.rb', line 12 def ravelin @ravelin end |
#riskified ⇒ Object
Returns the value of attribute riskified.
14 15 16 |
# File 'lib/processout/invoice_external_fraud_tools.rb', line 14 def riskified @riskified end |
#signifyd ⇒ Object
Returns the value of attribute signifyd.
13 14 15 |
# File 'lib/processout/invoice_external_fraud_tools.rb', line 13 def signifyd @signifyd end |
Instance Method Details
#fill_with_data(data) ⇒ Object
Fills the object with data coming from the API Params:
dataHashof data coming from the API
70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 |
# File 'lib/processout/invoice_external_fraud_tools.rb', line 70 def fill_with_data(data) if data.nil? return self end if data.include? "forter" self.forter = data["forter"] end if data.include? "ravelin" self.ravelin = data["ravelin"] end if data.include? "signifyd" self.signifyd = data["signifyd"] end if data.include? "riskified" self.riskified = data["riskified"] end self end |
#new(data = {}) ⇒ Object
Create a new InvoiceExternalFraudTools using the current client
53 54 55 |
# File 'lib/processout/invoice_external_fraud_tools.rb', line 53 def new(data = {}) InvoiceExternalFraudTools.new(@client, data) end |
#prefill(data) ⇒ Object
Prefills the object with the data passed as parameters Params:
dataHashof data
93 94 95 96 97 98 99 100 101 102 103 |
# File 'lib/processout/invoice_external_fraud_tools.rb', line 93 def prefill(data) if data.nil? return self end self.forter = data.fetch(:forter, self.forter) self.ravelin = data.fetch(:ravelin, self.ravelin) self.signifyd = data.fetch(:signifyd, self.signifyd) self.riskified = data.fetch(:riskified, self.riskified) self end |
#to_json(options) ⇒ Object
Overrides the JSON marshaller to only send the fields we want
58 59 60 61 62 63 64 65 |
# File 'lib/processout/invoice_external_fraud_tools.rb', line 58 def to_json() { "forter": self.forter, "ravelin": self.ravelin, "signifyd": self.signifyd, "riskified": self.riskified, }.to_json end |