class ProcessOut::InvoiceExternalFraudTools
Attributes
forter[R]
Public Class Methods
new(client, data = {})
click to toggle source
Initializes the InvoiceExternalFraudTools
object Params:
client
-
ProcessOut
client instance data
-
data that can be used to fill the object
# File lib/processout/invoice_external_fraud_tools.rb, line 23 def initialize(client, data = {}) @client = client self.forter = data.fetch(:forter, nil) end
Public Instance Methods
fill_with_data(data)
click to toggle source
Fills the object with data coming from the API Params:
data
-
Hash
of data coming from the API
# File lib/processout/invoice_external_fraud_tools.rb, line 45 def fill_with_data(data) if data.nil? return self end if data.include? "forter" self.forter = data["forter"] end self end
forter=(val)
click to toggle source
# File lib/processout/invoice_external_fraud_tools.rb, line 14 def forter=(val) @forter = val end
new(data = {})
click to toggle source
Create a new InvoiceExternalFraudTools
using the current client
# File lib/processout/invoice_external_fraud_tools.rb, line 31 def new(data = {}) InvoiceExternalFraudTools.new(@client, data) end
prefill(data)
click to toggle source
Prefills the object with the data passed as parameters Params:
data
-
Hash
of data
# File lib/processout/invoice_external_fraud_tools.rb, line 59 def prefill(data) if data.nil? return self end self.forter = data.fetch(:forter, self.forter) self end
to_json(options)
click to toggle source
Overrides the JSON marshaller to only send the fields we want
# File lib/processout/invoice_external_fraud_tools.rb, line 36 def to_json(options) { "forter": self.forter, }.to_json end