Class Payment.Builder

  • Enclosing class:
    Payment

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

      • Builder

        public Builder()
    • Method Detail

      • processor

        public Payment.Builder processor​(Payment.Processor processor)
        Parameters:
        processor - The payment processor used for the transaction.
        Returns:
        The builder object.
      • wasAuthorized

        public Payment.Builder wasAuthorized​(boolean wasAuthorized)
        Parameters:
        wasAuthorized - The authorization outcome from the payment processor. If the transaction has not yet been approved or denied, do not include this field.
        Returns:
        The builder object.
      • declineCode

        public Payment.Builder declineCode​(String declineCode)
        Parameters:
        declineCode - The decline code as provided by your payment processor. If the transaction was not declined, do not include this field.
        Returns:
        The builder object.
      • build

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