class ProcessOut::PaymentDataThreeDSAuthentication
Attributes
xid[R]
Public Class Methods
new(client, data = {})
click to toggle source
Initializes the PaymentDataThreeDSAuthentication
object Params:
client
-
ProcessOut
client instance data
-
data that can be used to fill the object
# File lib/processout/payment_data_three_ds_authentication.rb, line 23 def initialize(client, data = {}) @client = client self.xid = data.fetch(:xid, 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/payment_data_three_ds_authentication.rb, line 45 def fill_with_data(data) if data.nil? return self end if data.include? "XID" self.xid = data["XID"] end self end
new(data = {})
click to toggle source
Create a new PaymentDataThreeDSAuthentication
using the current client
# File lib/processout/payment_data_three_ds_authentication.rb, line 31 def new(data = {}) PaymentDataThreeDSAuthentication.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/payment_data_three_ds_authentication.rb, line 59 def prefill(data) if data.nil? return self end self.xid = data.fetch(:xid, self.xid) self end
to_json(options)
click to toggle source
Overrides the JSON marshaller to only send the fields we want
# File lib/processout/payment_data_three_ds_authentication.rb, line 36 def to_json(options) { "XID": self.xid, }.to_json end
xid=(val)
click to toggle source
# File lib/processout/payment_data_three_ds_authentication.rb, line 14 def xid=(val) @xid = val end