Class CurrencyConversion


  • public class CurrencyConversion
    extends Object
    Information related to a currency conversion. A currency conversion occurred in the payment, and the merchant needs to know information related to this conversion (e.g. to print on the sale receipt).
    • Constructor Detail

      • CurrencyConversion

        public CurrencyConversion()
    • Method Detail

      • customerApprovedFlag

        public CurrencyConversion customerApprovedFlag​(Boolean customerApprovedFlag)
        Notify if the customer has approved something. Indicates if the customer has accepted a currency conversion.
        Parameters:
        customerApprovedFlag - Notify if the customer has approved something. Indicates if the customer has accepted a currency conversion.
        Returns:
        the current CurrencyConversion instance, allowing for method chaining
      • getCustomerApprovedFlag

        public Boolean getCustomerApprovedFlag()
        Notify if the customer has approved something. Indicates if the customer has accepted a currency conversion.
        Returns:
        customerApprovedFlag Notify if the customer has approved something. Indicates if the customer has accepted a currency conversion.
      • setCustomerApprovedFlag

        public void setCustomerApprovedFlag​(Boolean customerApprovedFlag)
        Notify if the customer has approved something. Indicates if the customer has accepted a currency conversion.
        Parameters:
        customerApprovedFlag - Notify if the customer has approved something. Indicates if the customer has accepted a currency conversion.
      • convertedAmount

        public CurrencyConversion convertedAmount​(ConvertedAmount convertedAmount)
        convertedAmount
        Parameters:
        convertedAmount -
        Returns:
        the current CurrencyConversion instance, allowing for method chaining
      • getConvertedAmount

        public ConvertedAmount getConvertedAmount()
        Get convertedAmount
        Returns:
        convertedAmount
      • setConvertedAmount

        public void setConvertedAmount​(ConvertedAmount convertedAmount)
        convertedAmount
        Parameters:
        convertedAmount -
      • rate

        public CurrencyConversion rate​(BigDecimal rate)
        Rate of currency conversion.
        Parameters:
        rate - Rate of currency conversion.
        Returns:
        the current CurrencyConversion instance, allowing for method chaining
      • getRate

        public BigDecimal getRate()
        Rate of currency conversion.
        Returns:
        rate Rate of currency conversion.
      • setRate

        public void setRate​(BigDecimal rate)
        Rate of currency conversion.
        Parameters:
        rate - Rate of currency conversion.
      • markup

        public CurrencyConversion markup​(BigDecimal markup)
        Markup of a currency conversion amount as a percentage.
        Parameters:
        markup - Markup of a currency conversion amount as a percentage.
        Returns:
        the current CurrencyConversion instance, allowing for method chaining
      • getMarkup

        public BigDecimal getMarkup()
        Markup of a currency conversion amount as a percentage.
        Returns:
        markup Markup of a currency conversion amount as a percentage.
      • setMarkup

        public void setMarkup​(BigDecimal markup)
        Markup of a currency conversion amount as a percentage.
        Parameters:
        markup - Markup of a currency conversion amount as a percentage.
      • commission

        public CurrencyConversion commission​(BigDecimal commission)
        Commission for a currency conversion.
        Parameters:
        commission - Commission for a currency conversion.
        Returns:
        the current CurrencyConversion instance, allowing for method chaining
      • getCommission

        public BigDecimal getCommission()
        Commission for a currency conversion. minimum: 0.0 maximum: 99999999.999999
        Returns:
        commission Commission for a currency conversion.
      • setCommission

        public void setCommission​(BigDecimal commission)
        Commission for a currency conversion.
        Parameters:
        commission - Commission for a currency conversion.
      • declaration

        public CurrencyConversion declaration​(String declaration)
        Declaration to present to the customer or the cashier for validation. If a declaration has to be presented to the customer.
        Parameters:
        declaration - Declaration to present to the customer or the cashier for validation. If a declaration has to be presented to the customer.
        Returns:
        the current CurrencyConversion instance, allowing for method chaining
      • getDeclaration

        public String getDeclaration()
        Declaration to present to the customer or the cashier for validation. If a declaration has to be presented to the customer.
        Returns:
        declaration Declaration to present to the customer or the cashier for validation. If a declaration has to be presented to the customer.
      • setDeclaration

        public void setDeclaration​(String declaration)
        Declaration to present to the customer or the cashier for validation. If a declaration has to be presented to the customer.
        Parameters:
        declaration - Declaration to present to the customer or the cashier for validation. If a declaration has to be presented to the customer.
      • includeNullValues

        public CurrencyConversion includeNullValues​(boolean includeNullValues)
        Configures whether null values are explicitly serialized in the JSON payload. Default is false.
      • isIncludeNullValues

        public boolean isIncludeNullValues()
        Returns whether null values are explicitly serialized in the JSON payload.
      • setIncludeNullValues

        public void setIncludeNullValues​(boolean includeNullValues)
        Sets whether null values should be explicitly serialized in the JSON payload. Default is false.
      • equals

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

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

        public Map<String,​Object> getExplicitNulls()
        Returns a map of properties to be merged into the JSON payload as explicit null values.
      • fromJson

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

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