Class TradingPartner


  • @Generated(value="org.openapitools.codegen.languages.JavaClientCodegen",
               comments="Generator version: 7.7.0")
    public class TradingPartner
    extends Object
    Represents a participant in the Avalara directory.
    • Constructor Detail

      • TradingPartner

        public TradingPartner()
      • TradingPartner

        public TradingPartner​(String id,
                              String network)
    • Method Detail

      • getId

        @Nullable
        public String getId()
        Avalara unique ID of the participant in the directory.
        Returns:
        id
      • getName

        @Nonnull
        public String getName()
        Name of the participant (typically, the name of the business entity).
        Returns:
        name
      • setName

        public void setName​(String name)
      • getNetwork

        @Nullable
        public String getNetwork()
        The network where the participant is present. When creating or updating a trading partner, the value provided for the attribute 'network' will be ignored.
        Returns:
        network
      • getRegistrationDate

        @Nullable
        public String getRegistrationDate()
        Registration date of the participant if available.
        Returns:
        registrationDate
      • setRegistrationDate

        public void setRegistrationDate​(String registrationDate)
      • getIdentifiers

        @Nonnull
        public List<Identifier> getIdentifiers()
        A list of identifiers associated with the trading partner. Each identifier should consistently include the fields name, and value to maintain clarity and ensure consistent structure across entries. When creating or updating a trading partner, the attribute 'name' must be agreed upon with Avalara to ensure consistency. Failing to adhere to the agreed values will result in a validation error. Further, when creating or updating a trading partner, the value provided for the attribute 'displayName' will be ignored and instead retrieved from the standard set of display names maintained.
        Returns:
        identifiers
      • setIdentifiers

        public void setIdentifiers​(List<Identifier> identifiers)
      • setAddresses

        public void setAddresses​(List<Address> addresses)
      • getSupportedDocumentTypes

        @Nonnull
        public List<SupportedDocumentTypes> getSupportedDocumentTypes()
        A list of document types supported by the trading partner for exchange. Each document type identifier value must match the standard list maintained by Avalara, which includes Peppol and other public network document type identifier schemes and values, as well as any approved partner-specific identifiers. The 'value' field must exactly match an entry from the provided document identifier list. Any attempt to submit unsupported document types will result in a validation error. Further, when creating or updating a trading partner, the value provided for the attributes 'name' and 'supportedByAvalara' will be ignored.
        Returns:
        supportedDocumentTypes
      • getConsents

        @Nullable
        public Consents getConsents()
        Get consents
        Returns:
        consents
      • setConsents

        public void setConsents​(Consents consents)
      • getExtensions

        @Nullable
        public List<Extension> getExtensions()
        Optional array used to carry additional metadata or configuration values that may be required by specific networks. When creating or updating a trading partner, the keys provided in the 'extensions' attribute must be selected from a predefined list of supported extensions. Using any unsupported keys will result in a validation error.
        Returns:
        extensions
      • setExtensions

        public void setExtensions​(List<Extension> extensions)
      • hashCode

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

        public static void validateJsonElement​(com.google.gson.JsonElement jsonElement)
                                        throws IOException
        Validates the JSON Element and throws an exception if issues found
        Parameters:
        jsonElement - JSON Element
        Throws:
        IOException - if the JSON Element is invalid with respect to TradingPartner
      • fromJson

        public static TradingPartner fromJson​(String jsonString)
                                       throws IOException
        Create an instance of TradingPartner given an JSON string
        Parameters:
        jsonString - JSON string
        Returns:
        An instance of TradingPartner
        Throws:
        IOException - if the JSON string is invalid with respect to TradingPartner
      • toJson

        public String toJson()
        Convert an instance of TradingPartner to an JSON string
        Returns:
        JSON string