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