Class CreateOrderRequest


  • public class CreateOrderRequest
    extends Object
    CreateOrderRequest
    • Constructor Detail

      • CreateOrderRequest

        public CreateOrderRequest()
    • Method Detail

      • amount

        public CreateOrderRequest amount​(Amount amount)
        amount
        Parameters:
        amount -
        Returns:
        the current CreateOrderRequest instance, allowing for method chaining
      • getAmount

        public Amount getAmount()
        amount
        Returns:
        amount
      • setAmount

        public void setAmount​(Amount amount)
        amount
        Parameters:
        amount -
      • expiresAt

        public CreateOrderRequest expiresAt​(String expiresAt)
        The date when the order should expire. If not provided, the default expiry duration is 1 day. [ISO 8601](https://www.w3.org/TR/NOTE-datetime) format: YYYY-MM-DDThh:mm:ss+TZD, for example, **2020-12-18T10:15:30+01:00**.
        Parameters:
        expiresAt -
        Returns:
        the current CreateOrderRequest instance, allowing for method chaining
      • getExpiresAt

        public String getExpiresAt()
        The date when the order should expire. If not provided, the default expiry duration is 1 day. [ISO 8601](https://www.w3.org/TR/NOTE-datetime) format: YYYY-MM-DDThh:mm:ss+TZD, for example, **2020-12-18T10:15:30+01:00**.
        Returns:
        expiresAt
      • setExpiresAt

        public void setExpiresAt​(String expiresAt)
        The date when the order should expire. If not provided, the default expiry duration is 1 day. [ISO 8601](https://www.w3.org/TR/NOTE-datetime) format: YYYY-MM-DDThh:mm:ss+TZD, for example, **2020-12-18T10:15:30+01:00**.
        Parameters:
        expiresAt -
      • merchantAccount

        public CreateOrderRequest merchantAccount​(String merchantAccount)
        The merchant account identifier, with which you want to process the order.
        Parameters:
        merchantAccount -
        Returns:
        the current CreateOrderRequest instance, allowing for method chaining
      • getMerchantAccount

        public String getMerchantAccount()
        The merchant account identifier, with which you want to process the order.
        Returns:
        merchantAccount
      • setMerchantAccount

        public void setMerchantAccount​(String merchantAccount)
        The merchant account identifier, with which you want to process the order.
        Parameters:
        merchantAccount -
      • reference

        public CreateOrderRequest reference​(String reference)
        A custom reference identifying the order.
        Parameters:
        reference -
        Returns:
        the current CreateOrderRequest instance, allowing for method chaining
      • getReference

        public String getReference()
        A custom reference identifying the order.
        Returns:
        reference
      • setReference

        public void setReference​(String reference)
        A custom reference identifying the order.
        Parameters:
        reference -
      • equals

        public boolean equals​(Object o)
        Return true if this CreateOrderRequest object is equal to o.
        Overrides:
        equals in class Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • fromJson

        public static CreateOrderRequest fromJson​(String jsonString)
                                           throws com.fasterxml.jackson.core.JsonProcessingException
        Create an instance of CreateOrderRequest given an JSON string
        Parameters:
        jsonString - JSON string
        Returns:
        An instance of CreateOrderRequest
        Throws:
        com.fasterxml.jackson.core.JsonProcessingException - if the JSON string is invalid with respect to CreateOrderRequest
      • toJson

        public String toJson()
                      throws com.fasterxml.jackson.core.JsonProcessingException
        Convert an instance of CreateOrderRequest to an JSON string
        Returns:
        JSON string
        Throws:
        com.fasterxml.jackson.core.JsonProcessingException