Class PaymentReferenceBuilder

java.lang.Object
com.commercetools.api.models.payment.PaymentReferenceBuilder
All Implemented Interfaces:
Builder<PaymentReference>

public class PaymentReferenceBuilder extends Object implements Builder<PaymentReference>
PaymentReferenceBuilder
Example to create an instance using the builder pattern

     PaymentReference paymentReference = PaymentReference.builder()
             .id("{id}")
             .build()
 
  • Constructor Details

    • PaymentReferenceBuilder

      public PaymentReferenceBuilder()
  • Method Details

    • id

      Unique identifier of the referenced Payment.

      Parameters:
      id - value to be set
      Returns:
      Builder
    • obj

      Contains the representation of the expanded Payment. Only present in responses to requests with Reference Expansion for Payments.

      Parameters:
      builder - function to build the obj value
      Returns:
      Builder
    • withObj

      Contains the representation of the expanded Payment. Only present in responses to requests with Reference Expansion for Payments.

      Parameters:
      builder - function to build the obj value
      Returns:
      Builder
    • obj

      Contains the representation of the expanded Payment. Only present in responses to requests with Reference Expansion for Payments.

      Parameters:
      obj - value to be set
      Returns:
      Builder
    • getId

      public String getId()

      Unique identifier of the referenced Payment.

      Returns:
      id
    • getObj

      @Nullable public Payment getObj()

      Contains the representation of the expanded Payment. Only present in responses to requests with Reference Expansion for Payments.

      Returns:
      obj
    • build

      public PaymentReference build()
      builds PaymentReference with checking for non-null required values
      Specified by:
      build in interface Builder<PaymentReference>
      Returns:
      PaymentReference
    • buildUnchecked

      public PaymentReference buildUnchecked()
      builds PaymentReference without checking for non-null required values
      Returns:
      PaymentReference
    • of

      public static PaymentReferenceBuilder of()
      factory method for an instance of PaymentReferenceBuilder
      Returns:
      builder
    • of

      public static PaymentReferenceBuilder of(PaymentReference template)
      create builder for PaymentReference instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder