Class Device.Builder

  • Enclosing class:
    Device

    public static final class Device.Builder
    extends Object
    Builder creates instances of Device from values set by the builder's methods.
    • Constructor Detail

      • Builder

        public Builder()
        Constructor for the Device.Builder class
      • Builder

        public Builder​(InetAddress ipAddress)
        Constructor for the Device.Builder class
        Parameters:
        ipAddress - The IP address associated with the device used by the customer in the transaction.
    • Method Detail

      • userAgent

        public Device.Builder userAgent​(String ua)
        Parameters:
        ua - The HTTP “User-Agent” header of the browser used in the transaction.
        Returns:
        The builder object.
      • acceptLanguage

        public Device.Builder acceptLanguage​(String acceptLanguage)
        Parameters:
        acceptLanguage - The HTTP “Accept-Language” header of the device used in the transaction.
        Returns:
        The builder object.
      • ipAddress

        public Device.Builder ipAddress​(InetAddress ipAddress)
        Parameters:
        ipAddress - The IP address associated with the device used by the customer in the transaction.
        Returns:
        The builder object.
      • sessionAge

        public Device.Builder sessionAge​(Double sessionAge)
        Parameters:
        sessionAge - The number of seconds between the creation of the user's session and the time of the transaction. Note that session_age is not the duration of the current visit, but the time since the start of the first visit.
        Returns:
        The builder object.
      • sessionId

        public Device.Builder sessionId​(String sessionId)
        Parameters:
        sessionId - A string up to 255 characters in length. This is an ID which uniquely identifies a visitor's session on the site.
        Returns:
        The builder object.
      • build

        public Device build()
        Returns:
        An instance of Device created from the fields set on this builder.