Interface PaymentMethod

All Superinterfaces:
BaseResource

public interface PaymentMethod extends BaseResource
PaymentMethod
Example to create an instance using the builder pattern

     PaymentMethod paymentMethod = PaymentMethod.builder()
             .id("{id}")
             .version(0.3)
             .createdAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
             .lastModifiedAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
             .paymentMethodStatus(PaymentMethodStatus.ACTIVE)
             .default(true)
             .build()
 
  • Method Details

    • getId

      @NotNull @NotNull String getId()

      Unique identifier of the PaymentMethod.

      Specified by:
      getId in interface BaseResource
      Returns:
      id
    • getVersion

      @NotNull @NotNull Long getVersion()

      Current version of the PaymentMethod.

      Specified by:
      getVersion in interface BaseResource
      Returns:
      version
    • getKey

      String getKey()

      User-defined unique identifier of the PaymentMethod.

      Returns:
      key
    • getName

      @Valid @Valid LocalizedString getName()

      Name of the PaymentMethod.

      Returns:
      name
    • getCustomer

      @Valid @Valid CustomerReference getCustomer()

      Reference to a Customer associated with the PaymentMethod.

      If businessUnit is set, the Customer is an Associate of the Business Unit.

      Returns:
      customer
    • getBusinessUnit

      @Valid @Valid BusinessUnitKeyReference getBusinessUnit()

      Reference to a BusinessUnit associated with the PaymentMethod.

      Only available for B2B-enabled Projects.

      Returns:
      businessUnit
    • getMethod

      String getMethod()

      Payment Method used for the Payment—for example, a credit card or direct debit.

      Returns:
      method
    • getPaymentInterface

      String getPaymentInterface()

      Payment service that processes the Payment—for example, a PSP.

      Returns:
      paymentInterface
    • getInterfaceAccount

      String getInterfaceAccount()

      Account or instance of the payment interface when multiple accounts are used (per interface).

      Returns:
      interfaceAccount
    • getToken

      @Valid @Valid PaymentMethodToken getToken()

      Tokenized representation of the PaymentMethod used by the payment interface.

      Returns:
      token
    • getPaymentMethodStatus

      @NotNull @NotNull PaymentMethodStatus getPaymentMethodStatus()

      Status of the PaymentMethod.

      Returns:
      paymentMethodStatus
    • getDefault

      @NotNull @NotNull Boolean getDefault()

      Indicates if the PaymentMethod is the default.

      The default applies per Customer, Business Unit, or the combination of both (Associate).

      Returns:
      default
    • getCustom

      @Valid @Valid CustomFields getCustom()

      Custom Fields of the PaymentMethod.

      Returns:
      custom
    • getCreatedAt

      @NotNull @NotNull ZonedDateTime getCreatedAt()

      Date and time (UTC) the PaymentMethod was initially created.

      Specified by:
      getCreatedAt in interface BaseResource
      Returns:
      createdAt
    • getLastModifiedAt

      @NotNull @NotNull ZonedDateTime getLastModifiedAt()

      Date and time (UTC) the PaymentMethod was last updated.

      Specified by:
      getLastModifiedAt in interface BaseResource
      Returns:
      lastModifiedAt
    • getLastModifiedBy

      @Valid @Valid LastModifiedBy getLastModifiedBy()

      IDs and references that last modified the PaymentMethod.

      Returns:
      lastModifiedBy
    • getCreatedBy

      @Valid @Valid CreatedBy getCreatedBy()

      IDs and references that created the PaymentMethod.

      Returns:
      createdBy
    • setId

      void setId(String id)

      Unique identifier of the PaymentMethod.

      Specified by:
      setId in interface BaseResource
      Parameters:
      id - value to be set
    • setVersion

      void setVersion(Long version)

      Current version of the PaymentMethod.

      Specified by:
      setVersion in interface BaseResource
      Parameters:
      version - value to be set
    • setKey

      void setKey(String key)

      User-defined unique identifier of the PaymentMethod.

      Parameters:
      key - value to be set
    • setName

      void setName(LocalizedString name)

      Name of the PaymentMethod.

      Parameters:
      name - value to be set
    • setCustomer

      void setCustomer(CustomerReference customer)

      Reference to a Customer associated with the PaymentMethod.

      If businessUnit is set, the Customer is an Associate of the Business Unit.

      Parameters:
      customer - value to be set
    • setBusinessUnit

      void setBusinessUnit(BusinessUnitKeyReference businessUnit)

      Reference to a BusinessUnit associated with the PaymentMethod.

      Only available for B2B-enabled Projects.

      Parameters:
      businessUnit - value to be set
    • setMethod

      void setMethod(String method)

      Payment Method used for the Payment—for example, a credit card or direct debit.

      Parameters:
      method - value to be set
    • setPaymentInterface

      void setPaymentInterface(String paymentInterface)

      Payment service that processes the Payment—for example, a PSP.

      Parameters:
      paymentInterface - value to be set
    • setInterfaceAccount

      void setInterfaceAccount(String interfaceAccount)

      Account or instance of the payment interface when multiple accounts are used (per interface).

      Parameters:
      interfaceAccount - value to be set
    • setToken

      void setToken(PaymentMethodToken token)

      Tokenized representation of the PaymentMethod used by the payment interface.

      Parameters:
      token - value to be set
    • setPaymentMethodStatus

      void setPaymentMethodStatus(PaymentMethodStatus paymentMethodStatus)

      Status of the PaymentMethod.

      Parameters:
      paymentMethodStatus - value to be set
    • setDefault

      void setDefault(Boolean _default)

      Indicates if the PaymentMethod is the default.

      The default applies per Customer, Business Unit, or the combination of both (Associate).

      Parameters:
      _default - value to be set
    • setCustom

      void setCustom(CustomFields custom)

      Custom Fields of the PaymentMethod.

      Parameters:
      custom - value to be set
    • setCreatedAt

      void setCreatedAt(ZonedDateTime createdAt)

      Date and time (UTC) the PaymentMethod was initially created.

      Specified by:
      setCreatedAt in interface BaseResource
      Parameters:
      createdAt - value to be set
    • setLastModifiedAt

      void setLastModifiedAt(ZonedDateTime lastModifiedAt)

      Date and time (UTC) the PaymentMethod was last updated.

      Specified by:
      setLastModifiedAt in interface BaseResource
      Parameters:
      lastModifiedAt - value to be set
    • setLastModifiedBy

      void setLastModifiedBy(LastModifiedBy lastModifiedBy)

      IDs and references that last modified the PaymentMethod.

      Parameters:
      lastModifiedBy - value to be set
    • setCreatedBy

      void setCreatedBy(CreatedBy createdBy)

      IDs and references that created the PaymentMethod.

      Parameters:
      createdBy - value to be set
    • of

      static PaymentMethod of()
      factory method
      Returns:
      instance of PaymentMethod
    • of

      static PaymentMethod of(PaymentMethod template)
      factory method to create a shallow copy PaymentMethod
      Parameters:
      template - instance to be copied
      Returns:
      copy instance
    • copyDeep

      PaymentMethod copyDeep()
      Specified by:
      copyDeep in interface BaseResource
    • deepCopy

      @Nullable static PaymentMethod deepCopy(@Nullable PaymentMethod template)
      factory method to create a deep copy of PaymentMethod
      Parameters:
      template - instance to be copied
      Returns:
      copy instance
    • builder

      static PaymentMethodBuilder builder()
      builder factory method for PaymentMethod
      Returns:
      builder
    • builder

      static PaymentMethodBuilder builder(PaymentMethod template)
      create builder for PaymentMethod instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder
    • withPaymentMethod

      default <T> T withPaymentMethod(Function<PaymentMethod,T> helper)
      accessor map function
      Type Parameters:
      T - mapped type
      Parameters:
      helper - function to map the object
      Returns:
      mapped value
    • typeReference

      static com.fasterxml.jackson.core.type.TypeReference<PaymentMethod> typeReference()
      gives a TypeReference for usage with Jackson DataBind
      Returns:
      TypeReference