TransactionProcess

public class TransactionProcess

Superclass Helper for Collection, Void and Refund

  • The receipt ID for a collection, void or refund

    Declaration

    Swift

    public private (set) var receiptId: String
  • The amount of the collection, void or refund

    Declaration

    Swift

    public private (set) var amount: Amount
  • The payment reference String for a collection, void or refund

    Declaration

    Swift

    public private (set) var paymentReference: String = ""
  • Device identification for this transaction to prevent fraud

    Declaration

    Swift

    public private (set) var deviceSignal: JSONDictionary?
  • The current Session to access the Judo API

    Declaration

    Swift

    public var APISession: Session?
  • apiSession caller - this method sets the session variable and returns itself for further use

    Parameter

    Parameter session: the API session which is used to call the Judo endpoints

    Returns

    reactive self

    Declaration

    Swift

    public func apiSession(session: Session) -> Self

    Parameters

    session

    the API session which is used to call the Judo endpoints

    Return Value

    reactive self

  • Reactive method to set device signal information of the device, this method is optional and is used for fraud prevention

    Parameter

    Parameter deviceSignal: a Dictionary which contains information about the device

    Returns

    reactive self

    Declaration

    Swift

    public func deviceSignal(deviceSignal: JSONDictionary) -> Self

    Parameters

    deviceSignal

    a Dictionary which contains information about the device

    Return Value

    reactive self

  • Completion caller - this method will automatically trigger a Session Call to the judo REST API and execute the request based on the information that were set in the previous methods

    Parameter

    Parameter block: a completion block that is called when the request finishes

    Returns

    reactive self

    Declaration

    Swift

    public func completion(block: JudoCompletionBlock) -> Self

    Parameters

    block

    a completion block that is called when the request finishes

    Return Value

    reactive self

  • Helper method for extensions of this class to be able to access the dynamic path value

    Declaration

    Swift

    public func path() -> String

    Return Value

    the rest api access path of the current class