Sha256: bcfa10dd6b825b5a9d5bfdc356456ad887f9f86be483f68245383de4ec15fff5

Contents?: true

Size: 1.44 KB

Versions: 22

Compression:

Stored size: 1.44 KB

Contents

# The content of this file was automatically generated

require "cgi"
require "json"
require "processout/networking/request"
require "processout/networking/response"

module ProcessOut
  class PaymentDataThreeDSAuthentication
    
    attr_reader :xid

    
    def xid=(val)
      @xid = val
    end
    

    # Initializes the PaymentDataThreeDSAuthentication object
    # Params:
    # +client+:: +ProcessOut+ client instance
    # +data+:: data that can be used to fill the object
    def initialize(client, data = {})
      @client = client

      self.xid = data.fetch(:xid, nil)
      
    end

    # Create a new PaymentDataThreeDSAuthentication using the current client
    def new(data = {})
      PaymentDataThreeDSAuthentication.new(@client, data)
    end

    # Overrides the JSON marshaller to only send the fields we want
    def to_json(options)
      {
          "XID": self.xid,
      }.to_json
    end

    # Fills the object with data coming from the API
    # Params:
    # +data+:: +Hash+ of data coming from the API
    def fill_with_data(data)
      if data.nil?
        return self
      end
      if data.include? "XID"
        self.xid = data["XID"]
      end
      
      self
    end

    # Prefills the object with the data passed as parameters
    # Params:
    # +data+:: +Hash+ of data
    def prefill(data)
      if data.nil?
        return self
      end
      self.xid = data.fetch(:xid, self.xid)
      
      self
    end

    
  end
end

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
processout-3.2.0 lib/processout/payment_data_three_ds_authentication.rb
processout-3.1.0 lib/processout/payment_data_three_ds_authentication.rb
processout-3.0.0 lib/processout/payment_data_three_ds_authentication.rb
processout-2.31.0 lib/processout/payment_data_three_ds_authentication.rb
processout-2.30.0 lib/processout/payment_data_three_ds_authentication.rb
processout-2.29.0 lib/processout/payment_data_three_ds_authentication.rb
processout-2.28.0 lib/processout/payment_data_three_ds_authentication.rb
processout-2.27.1 lib/processout/payment_data_three_ds_authentication.rb
processout-2.26.0 lib/processout/payment_data_three_ds_authentication.rb
processout-2.25.0 lib/processout/payment_data_three_ds_authentication.rb
processout-2.24.0 lib/processout/payment_data_three_ds_authentication.rb
processout-2.23.0 lib/processout/payment_data_three_ds_authentication.rb
processout-2.22.0 lib/processout/payment_data_three_ds_authentication.rb
processout-2.21.0 lib/processout/payment_data_three_ds_authentication.rb
processout-2.19.0 lib/processout/payment_data_three_ds_authentication.rb
processout-2.18.0 lib/processout/payment_data_three_ds_authentication.rb
processout-2.17.0 lib/processout/payment_data_three_ds_authentication.rb
processout-2.16.0 lib/processout/payment_data_three_ds_authentication.rb
processout-2.15.1 lib/processout/payment_data_three_ds_authentication.rb
processout-2.15.0 lib/processout/payment_data_three_ds_authentication.rb