Class: ProcessOut::PaymentDataThreeDSAuthentication
- Inherits:
-
Object
- Object
- ProcessOut::PaymentDataThreeDSAuthentication
- Defined in:
- lib/processout/payment_data_three_ds_authentication.rb
Instance Attribute Summary collapse
-
#xid ⇒ Object
Returns the value of attribute xid.
Instance Method Summary collapse
-
#fill_with_data(data) ⇒ Object
- Fills the object with data coming from the API Params:
data
-
Hash
of data coming from the API.
- Fills the object with data coming from the API Params:
-
#initialize(client, data = {}) ⇒ PaymentDataThreeDSAuthentication
constructor
- Initializes the PaymentDataThreeDSAuthentication object Params:
client
ProcessOut
client instancedata
-
data that can be used to fill the object.
- Initializes the PaymentDataThreeDSAuthentication object Params:
-
#new(data = {}) ⇒ Object
Create a new PaymentDataThreeDSAuthentication using the current client.
-
#prefill(data) ⇒ Object
- Prefills the object with the data passed as parameters Params:
data
-
Hash
of data.
- Prefills the object with the data passed as parameters Params:
Constructor Details
#initialize(client, data = {}) ⇒ PaymentDataThreeDSAuthentication
Initializes the PaymentDataThreeDSAuthentication object Params:
client
-
ProcessOut
client instance data
-
data that can be used to fill the object
22 23 24 25 26 27 |
# File 'lib/processout/payment_data_three_ds_authentication.rb', line 22 def initialize(client, data = {}) @client = client self.xid = data.fetch(:xid, nil) end |
Instance Attribute Details
#xid ⇒ Object
Returns the value of attribute xid.
10 11 12 |
# File 'lib/processout/payment_data_three_ds_authentication.rb', line 10 def xid @xid end |
Instance Method Details
#fill_with_data(data) ⇒ Object
Fills the object with data coming from the API Params:
data
-
Hash
of data coming from the API
37 38 39 40 41 42 43 44 45 46 |
# File 'lib/processout/payment_data_three_ds_authentication.rb', line 37 def fill_with_data(data) if data.nil? return self end if data.include? "XID" self.xid = data["XID"] end self end |
#new(data = {}) ⇒ Object
Create a new PaymentDataThreeDSAuthentication using the current client
30 31 32 |
# File 'lib/processout/payment_data_three_ds_authentication.rb', line 30 def new(data = {}) PaymentDataThreeDSAuthentication.new(@client, data) end |
#prefill(data) ⇒ Object
Prefills the object with the data passed as parameters Params:
data
-
Hash
of data
51 52 53 54 55 56 57 58 |
# File 'lib/processout/payment_data_three_ds_authentication.rb', line 51 def prefill(data) if data.nil? return self end self.xid = data.fetch(:xid, self.xid) self end |