Package Avalara.SDK.model.EInvoicing.V1
Class TradingPartner
- java.lang.Object
-
- Avalara.SDK.model.EInvoicing.V1.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.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classTradingPartner.CustomTypeAdapterFactory
-
Field Summary
Fields Modifier and Type Field Description static HashSet<String>openapiFieldsstatic HashSet<String>openapiRequiredFieldsstatic StringSERIALIZED_NAME_ADDRESSESstatic StringSERIALIZED_NAME_CONSENTSstatic StringSERIALIZED_NAME_EXTENSIONSstatic StringSERIALIZED_NAME_IDstatic StringSERIALIZED_NAME_IDENTIFIERSstatic StringSERIALIZED_NAME_NAMEstatic StringSERIALIZED_NAME_NETWORKstatic StringSERIALIZED_NAME_REGISTRATION_DATEstatic StringSERIALIZED_NAME_SUPPORTED_DOCUMENT_TYPES
-
Constructor Summary
Constructors Constructor Description TradingPartner()TradingPartner(String id, String network)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description TradingPartneraddAddressesItem(Address addressesItem)TradingPartneraddExtensionsItem(Extension extensionsItem)TradingPartneraddIdentifiersItem(Identifier identifiersItem)TradingPartneraddresses(List<Address> addresses)TradingPartneraddSupportedDocumentTypesItem(SupportedDocumentTypes supportedDocumentTypesItem)TradingPartnerconsents(Consents consents)booleanequals(Object o)TradingPartnerextensions(List<Extension> extensions)static TradingPartnerfromJson(String jsonString)Create an instance of TradingPartner given an JSON stringList<Address>getAddresses()Get addressesConsentsgetConsents()Get consentsList<Extension>getExtensions()Optional array used to carry additional metadata or configuration values that may be required by specific networks.StringgetId()Avalara unique ID of the participant in the directory.List<Identifier>getIdentifiers()A list of identifiers associated with the trading partner.StringgetName()Name of the participant (typically, the name of the business entity).StringgetNetwork()The network where the participant is present.StringgetRegistrationDate()Registration date of the participant if available.List<SupportedDocumentTypes>getSupportedDocumentTypes()A list of document types supported by the trading partner for exchange.inthashCode()TradingPartneridentifiers(List<Identifier> identifiers)TradingPartnername(String name)TradingPartnerregistrationDate(String registrationDate)voidsetAddresses(List<Address> addresses)voidsetConsents(Consents consents)voidsetExtensions(List<Extension> extensions)voidsetIdentifiers(List<Identifier> identifiers)voidsetName(String name)voidsetRegistrationDate(String registrationDate)voidsetSupportedDocumentTypes(List<SupportedDocumentTypes> supportedDocumentTypes)TradingPartnersupportedDocumentTypes(List<SupportedDocumentTypes> supportedDocumentTypes)StringtoJson()Convert an instance of TradingPartner to an JSON stringStringtoString()static voidvalidateJsonElement(com.google.gson.JsonElement jsonElement)Validates the JSON Element and throws an exception if issues found
-
-
-
Field Detail
-
SERIALIZED_NAME_ID
public static final String SERIALIZED_NAME_ID
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_NAME
public static final String SERIALIZED_NAME_NAME
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_NETWORK
public static final String SERIALIZED_NAME_NETWORK
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_REGISTRATION_DATE
public static final String SERIALIZED_NAME_REGISTRATION_DATE
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_IDENTIFIERS
public static final String SERIALIZED_NAME_IDENTIFIERS
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_ADDRESSES
public static final String SERIALIZED_NAME_ADDRESSES
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_SUPPORTED_DOCUMENT_TYPES
public static final String SERIALIZED_NAME_SUPPORTED_DOCUMENT_TYPES
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_CONSENTS
public static final String SERIALIZED_NAME_CONSENTS
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_EXTENSIONS
public static final String SERIALIZED_NAME_EXTENSIONS
- See Also:
- Constant Field Values
-
-
Method Detail
-
getId
@Nullable public String getId()
Avalara unique ID of the participant in the directory.- Returns:
- id
-
name
public TradingPartner name(String name)
-
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
-
registrationDate
public TradingPartner registrationDate(String registrationDate)
-
getRegistrationDate
@Nullable public String getRegistrationDate()
Registration date of the participant if available.- Returns:
- registrationDate
-
setRegistrationDate
public void setRegistrationDate(String registrationDate)
-
identifiers
public TradingPartner identifiers(List<Identifier> identifiers)
-
addIdentifiersItem
public TradingPartner addIdentifiersItem(Identifier identifiersItem)
-
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)
-
addresses
public TradingPartner addresses(List<Address> addresses)
-
addAddressesItem
public TradingPartner addAddressesItem(Address addressesItem)
-
supportedDocumentTypes
public TradingPartner supportedDocumentTypes(List<SupportedDocumentTypes> supportedDocumentTypes)
-
addSupportedDocumentTypesItem
public TradingPartner addSupportedDocumentTypesItem(SupportedDocumentTypes supportedDocumentTypesItem)
-
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
-
setSupportedDocumentTypes
public void setSupportedDocumentTypes(List<SupportedDocumentTypes> supportedDocumentTypes)
-
consents
public TradingPartner consents(Consents consents)
-
setConsents
public void setConsents(Consents consents)
-
extensions
public TradingPartner extensions(List<Extension> extensions)
-
addExtensionsItem
public TradingPartner addExtensionsItem(Extension extensionsItem)
-
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
-
validateJsonElement
public static void validateJsonElement(com.google.gson.JsonElement jsonElement) throws IOExceptionValidates 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
-
-