Class Account

java.lang.Object
com.imc.iss.groovy.account.Account

public class Account extends Object
This is a class representing an account for use by groovy scripts

Inside the script, an instance of this class, containing the data of the account that the script will be run on, will be provided automatically and can be accessed as a variable named account

  • Method Details

    • addPartnerFunctions

      public Account addPartnerFunctions(Collection<PartnerFunctionRecord> partnerFunctionRecords)
      Add partner function records into account's Partner Function.
      Parameters:
      partnerFunctionRecords - . The partner function records to add into a account.
      Returns:
      The Account instance.
    • addSalesInfo

      public Account addSalesInfo(Collection<SalesInfo> salesInfos)
      Add salesInfo records into account's salesInfo Function.
      Parameters:
      salesInfo - . The sales info to add into a account.
      Returns:
      The Account instance.
    • deletePartnerFunctions

      public Account deletePartnerFunctions(Collection<BusinessObject> partnerFunctionRecords)
      Remove partner function records into account's Partner Function.
      Parameters:
      partnerFunctionRecords - . The partner function records to remove into a account.
      Returns:
      The Account instance.
    • deleteSalesInfo

      public Account deleteSalesInfo(Collection<BusinessObject> salesInfos)
      Remove salesInfo records into account's salesInfo Function.
      Parameters:
      salesInfo - . The sales info records to remove from account.
      Returns:
      The Account instance.
    • getAccountAddresses

      public Collection<String> getAccountAddresses() throws IMCException
      gets the list of Addresses for the Account
      Throws:
      IMCException
    • getAccountDataAttributeValue

      public Object getAccountDataAttributeValue(String attributeURI) throws IMCException
      To get the value of a account data attribute by attribute URI.
      Parameters:
      attributeURI - as String. The URI of the account data attribute.
      Returns:
      the value of the account data attribute as Object.
      Throws:
      IMCException
    • getAccountRegionRelationAttributeURI

      public String getAccountRegionRelationAttributeURI(String attributeURI) throws IMCException
      To get the URI of a account relation attribute by attribute URI.
      Parameters:
      attributeURI - as String. The URI of the account relation attribute.
      Returns:
      the object URI of the account relation attribute as String.
      Throws:
      IMCException
    • getAccountRelationAttributeErpId

      public String getAccountRelationAttributeErpId(String attributeURI) throws IMCException
      To get the ERPID of a account relation attribute by attribute URI.
      Parameters:
      attributeURI - as String. The URI of the quote relation attribute.
      Returns:
      the ERPId of the account relation attribute as String.
      Throws:
      IMCException
    • getAccountRelationAttributeObjectId

      public String getAccountRelationAttributeObjectId(String attributeURI) throws IMCException
      To get the object Id of a account relation attribute by attribute URI.
      Parameters:
      attributeURI - as String. The URI of the account relation attribute.
      Returns:
      the objectId of the account relation attribute as String.
      Throws:
      IMCException
    • getAccountRelationAttributeObjectName

      public String getAccountRelationAttributeObjectName(String attributeURI) throws IMCException
      To get the object name of a account relation attribute by attribute URI.
      Parameters:
      attributeURI - as String. The URI of the account relation attribute.
      Returns:
      the object name of the account relation attribute as String.
      Throws:
      IMCException
    • getAccountRelationAttributeURI

      public String getAccountRelationAttributeURI(String attributeURI) throws IMCException
      To get the URI of a account relation attribute by attribute URI.
      Parameters:
      attributeURI - as String. The URI of the account relation attribute.
      Returns:
      the object URI of the account relation attribute as String.
      Throws:
      IMCException
    • getAccountURI

      public String getAccountURI()
      Retrieves the URI of this account
      Returns:
      The account URI as String
    • getAddresses

      public List<Address> getAddresses() throws IMCException
      Gets a list of Address objects for the Account.
      Returns:
      List
      Throws:
      IMCException
    • getContacts

      public Collection<BusinessObject> getContacts() throws IMCException
      Retrieves the contacts of the account.
      Returns:
      Collection <BusinessObject>.
      Throws:
      IMCException
    • getPartnerFunctions

      public Collection<BusinessObject> getPartnerFunctions() throws IMCException
      Retrieves the partner functions of the account.
      Returns:
      Collection <BusinessObject>.
      Throws:
      IMCException
    • getSalesInfo

      public Collection<BusinessObject> getSalesInfo() throws IMCException
      Retrieves the salesInfo of the account.
      Returns:
      Collection <BusinessObject>.
      Throws:
      IMCException
    • setAccountAddressDataAttribute

      public void setAccountAddressDataAttribute(String addressURI, String attributeURI, Object value) throws IMCException
      sets the data attributes for the address of an account
      Parameters:
      addressURI - as String. The URI of the address belonging to an account
      attributeURI - as String. The URI of the Data Attribute to be updated
      value - The value to be assigned to the Data attribute for the address of an account
      Throws:
      IMCException
    • setAccountAddressRelationAttribute

      public void setAccountAddressRelationAttribute(String addressURI, String attributeURI, String value) throws IMCException
      sets the relation attributes for the address of an account
      Parameters:
      addressURI - as String. The URI of the address belonging to an account
      attributeURI - as String. The URI of the relation Attribute to be updated
      value - The value to be assigned to the relation attribute for the address of an account
      Throws:
      IMCException
    • setAccountDataAttribute

      public Account setAccountDataAttribute(String attributeURI, Object value) throws IMCException
      To set a value for the account data attribute.
      Parameters:
      attributeURI - as String. The URI of the account data attribute.
      value - as Object. The value for the account data attribute.
      Returns:
      The Account instance.
      Throws:
      IMCException - the platform exception
    • setAccountRelationAttribute

      public Account setAccountRelationAttribute(String attributeURI, String valueURI) throws IMCException
      To set a value for the account relation attribute.
      Parameters:
      attributeURI - as String. The URI of the account relation attribute.
      valueURI - as Object. The value for the account relation attribute.
      Returns:
      The Account instance.
      Throws:
      IMCException - the platform exception
    • toString

      public String toString()
      Returns a string representation of the account
      Overrides:
      toString in class Object
      Returns:
      A string representation of the account.