Class LineItem

  • All Implemented Interfaces:
    java.lang.Cloneable, java.util.Map<java.lang.String,​java.lang.Object>

    public final class LineItem
    extends com.google.api.client.json.GenericJson
    A line item in a payment request.

    This is the Java data model class that specifies how to parse/serialize into the JSON that is transmitted over HTTP when working with the RCS Business Messaging API. For a detailed explanation see: https://developers.google.com/api-client-library/java/google-http-java-client/json

    Author:
    Google, Inc.
    • Nested Class Summary

      • Nested classes/interfaces inherited from class com.google.api.client.util.GenericData

        com.google.api.client.util.GenericData.Flags
      • Nested classes/interfaces inherited from class java.util.AbstractMap

        java.util.AbstractMap.SimpleEntry<K extends java.lang.Object,​V extends java.lang.Object>, java.util.AbstractMap.SimpleImmutableEntry<K extends java.lang.Object,​V extends java.lang.Object>
      • Nested classes/interfaces inherited from interface java.util.Map

        java.util.Map.Entry<K extends java.lang.Object,​V extends java.lang.Object>
    • Constructor Summary

      Constructors 
      Constructor Description
      LineItem()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      LineItem clone()  
      Money getAmount()
      The amount of the line item.
      java.lang.String getLabel()
      The text for a line item.
      java.lang.String getSubText()
      (Optional) Text that is displayed in a smaller font below the line item label.
      java.lang.String getType()
      The line item type.
      LineItem set​(java.lang.String fieldName, java.lang.Object value)  
      LineItem setAmount​(Money amount)
      The amount of the line item.
      LineItem setLabel​(java.lang.String label)
      The text for a line item.
      LineItem setSubText​(java.lang.String subText)
      (Optional) Text that is displayed in a smaller font below the line item label.
      LineItem setType​(java.lang.String type)
      The line item type.
      • Methods inherited from class com.google.api.client.json.GenericJson

        getFactory, setFactory, toPrettyString, toString
      • Methods inherited from class com.google.api.client.util.GenericData

        entrySet, get, getClassInfo, getUnknownKeys, put, putAll, remove, setUnknownKeys
      • Methods inherited from class java.util.AbstractMap

        clear, containsKey, containsValue, equals, hashCode, isEmpty, keySet, size, values
      • Methods inherited from class java.lang.Object

        finalize, getClass, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface java.util.Map

        compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAll
    • Constructor Detail

      • LineItem

        public LineItem()
    • Method Detail

      • getAmount

        public Money getAmount()
        The amount of the line item. SECONDARY line items may have a negative amount.
        Returns:
        value or null for none
      • setAmount

        public LineItem setAmount​(Money amount)
        The amount of the line item. SECONDARY line items may have a negative amount.
        Parameters:
        amount - amount or null for none
      • getLabel

        public java.lang.String getLabel()
        The text for a line item. For example, "Total due".
        Returns:
        value or null for none
      • setLabel

        public LineItem setLabel​(java.lang.String label)
        The text for a line item. For example, "Total due".
        Parameters:
        label - label or null for none
      • getSubText

        public java.lang.String getSubText()
        (Optional) Text that is displayed in a smaller font below the line item label.
        Returns:
        value or null for none
      • setSubText

        public LineItem setSubText​(java.lang.String subText)
        (Optional) Text that is displayed in a smaller font below the line item label.
        Parameters:
        subText - subText or null for none
      • getType

        public java.lang.String getType()
        The line item type.
        Returns:
        value or null for none
      • setType

        public LineItem setType​(java.lang.String type)
        The line item type.
        Parameters:
        type - type or null for none
      • set

        public LineItem set​(java.lang.String fieldName,
                            java.lang.Object value)
        Overrides:
        set in class com.google.api.client.json.GenericJson
      • clone

        public LineItem clone()
        Overrides:
        clone in class com.google.api.client.json.GenericJson