Structs

The following structs are available globally.

  • Amount

    Amount object stores information about an amount and the corresponding currency for a transaction

    See more

    Declaration

    Swift

    public struct Amount: StringLiteralConvertible
  • Collection of static identifiers for all supported currencies

    See more

    Declaration

    Swift

    public struct Currency
  • JudoError

    The JudoError object holds all the information about errors that occurred within the SDK or at any stage when making a call to the judo API

    See more

    Declaration

    Swift

    public struct JudoError: ErrorType
  • Response

    Response object is created out of the JSON response of the judo API for seamless handling of values returned in any call.

    The response object can hold multiple transaction objects and supports pagination if available.

    In most cases (successful Payment, Pre-auth or RegisterCard operation) a Response object will hold one TransactionData object. Supporting CollectionType protocol, you can access the elements by subscripting let transactionData = response[0] or using the available variable response.first as a more readable approach.

    See more

    Declaration

    Swift

    public struct Response: GeneratorType, ArrayLiteralConvertible
  • PaymentToken

    A PaymentToken object which is one part to be used in any token transactions

    See more

    Declaration

    Swift

    public struct PaymentToken
  • Consumer

    Consumer stores information about a reference and a consumer token to be used in any kind of token transaction.

    See more

    Declaration

    Swift

    public struct Consumer
  • TransactionData

    TransactionData is an object that references all information in correspondance with a Transaction with the judo API

    See more

    Declaration

    Swift

    public struct TransactionData
  • Address object for card transactions

    The Address object stores information around the address that is related to a card

    See more

    Declaration

    Swift

    public struct Address
  • A class which can be used to easily customize the SDKs view

    See more

    Declaration

    Swift

    public struct Theme
  • The Session struct is a wrapper for the REST API calls

    See more

    Declaration

    Swift

    public struct Session
  • Pagination

    Struct to save state of a paginated response

    Declaration

    Swift

    public struct Pagination
  • Referencing a transaction

    the Reference object is supposed to simplify storing reference data like consumer, payment references and metadata dictionary that can hold an arbitrary set of key value based information

    you create a reference object by calling the initializer with a reference of your consumer.

    If you have used the reference to register a card, make sure that the consumer reference stays the same for making token based transactions

    guard let references = Reference(consumerRef: "consumer0053252") else { return }
    

    the Reference initializer returns an optional because of the payment reference which is being generated using the identifierForVendor() method on UIDevice.currentDevice(). The method returns an optional value and thus can return nil in certain device states.

    If the value is nil, wait and get the value again later. This happens, for example, after the device has been restarted but before the user has unlocked the device.

    See more

    Declaration

    Swift

    public struct Reference
  • Entry point for interacting with judoKit

    See more

    Declaration

    Swift

    public struct JudoKit
  • Card

    Card objects store all the necessary card information for making transactions

    See more

    Declaration

    Swift

    public struct Card