Class ApiApp


  • public class ApiApp
    extends AbstractResource
    Contains information about an API App
    • Constructor Detail

      • ApiApp

        public ApiApp()
        Default constructor.
      • ApiApp

        public ApiApp​(org.json.JSONObject json)
               throws HelloSignException
        Constructor that instantiates an ApiApp object based on the JSON response from the HelloSign API.
        Parameters:
        json - JSONObject
        Throws:
        HelloSignException - thrown if there is a problem parsing the JSONObject
    • Method Detail

      • getCallbackUrl

        public java.lang.String getCallbackUrl()
        The app's callback URL (for events).
        Returns:
        String callback URL or null
      • setCallbackUrl

        public void setCallbackUrl​(java.lang.String url)
        Set the callback URL for this API app's events.
        Parameters:
        url - String
      • hasCallbackUrl

        public java.lang.Boolean hasCallbackUrl()
        True if the callback URL is non-null.
        Returns:
        Boolean
      • getClientId

        public java.lang.String getClientId()
        The app's client ID.
        Returns:
        String client ID
      • hasClientId

        public boolean hasClientId()
        Returns true if this app has a client ID.
        Returns:
        boolean
      • getCreatedAt

        public java.util.Date getCreatedAt()
        The time that the app was created.
        Returns:
        Date
      • getDomain

        public java.lang.String getDomain()
        The domain name associated with the app.
        Returns:
        String domain name
      • setDomain

        public void setDomain​(java.lang.String domain)
        Set this API app's domain.
        Parameters:
        domain - String
      • hasDomain

        public java.lang.Boolean hasDomain()
        True if the domain has been set.
        Returns:
        Boolean
      • isApproved

        public java.lang.Boolean isApproved()
        Boolean to indicate if the app has been approved.
        Returns:
        Boolean
      • getName

        public java.lang.String getName()
        The name of the app.
        Returns:
        String name
      • setName

        public void setName​(java.lang.String name)
        Set this API app's name.
        Parameters:
        name - String
      • hasName

        public java.lang.Boolean hasName()
        True if the name is set for this API App.
        Returns:
        Boolean
      • getOauthInfo

        public ApiAppOauth getOauthInfo()
        An object describing the app's OAuth properties.
        Returns:
        ApiAppOauth
      • setOAuthCallbackUrl

        public void setOAuthCallbackUrl​(java.lang.String url)
      • setScopes

        public void setScopes​(java.util.Set<ApiAppOauthScopeType> scopes)
        Set this API app's OAuth scopes.
        Parameters:
        scopes - List of ApiAppOauthScopeType
      • addScope

        public void addScope​(ApiAppOauthScopeType scope)
        Add a scope to this API App's OAuth scope list. Duplicates will be ignored.
        Parameters:
        scope - ApiAppOauthScopeType
      • clearScopes

        public void clearScopes()
        Clear all OAuth scopes for this API App.
      • removeScope

        public void removeScope​(ApiAppOauthScopeType scope)
        Remove the specified OAuth scope from this API App.
        Parameters:
        scope - ApiAppOauthScopeType
      • getOwnerAccount

        public Account getOwnerAccount()
        An object describing the app's owner. NOTE: This Account object will only have the owner's account ID and email address. All other values will be null.
        Returns:
        Account
      • setCustomLogo

        public void setCustomLogo​(java.io.File f)
        Add a custom logo image to this API app.
        Parameters:
        f - File
      • getPostFields

        public java.util.Map<java.lang.String,​java.io.Serializable> getPostFields()
                                                                                 throws HelloSignException
        Internal method used to retrieve the necessary POST fields to submit the API app to HelloSign.
        Returns:
        Map
        Throws:
        HelloSignException - thrown if there is a problem serializing the POST fields.
      • getWhiteLabelingOptions

        public WhiteLabelingOptions getWhiteLabelingOptions()
        Returns the current white labeling options for this API app.
        Returns:
        WhiteLabelingOptions
      • setWhiteLabelingOptions

        public void setWhiteLabelingOptions​(WhiteLabelingOptions options)
        Overrides all white labeling options for this API app.
        Parameters:
        options - WhiteLabelingOptions
      • getPageBackgroundColor

        public java.lang.String getPageBackgroundColor()
        Get the signer page background color.
        Returns:
        String hex color code
      • setPageBackgroundColor

        public void setPageBackgroundColor​(java.lang.String color)
                                    throws HelloSignException
        Set the signer page background color.
        Parameters:
        color - String hex color code
        Throws:
        HelloSignException - thrown if the color string is an invalid hex string
      • getHeaderBackgroundColor

        public java.lang.String getHeaderBackgroundColor()
        Get the signer page header background color.
        Returns:
        String hex color code
      • setHeaderBackgroundColor

        public void setHeaderBackgroundColor​(java.lang.String color)
                                      throws HelloSignException
        Set the signer page header background color.
        Parameters:
        color - String hex color code
        Throws:
        HelloSignException - thrown if the color string is an invalid hex string
      • getTextColor1

        public java.lang.String getTextColor1()
        Get the signer page text 1 color.
        Returns:
        String hex color code
      • setTextColor1

        public void setTextColor1​(java.lang.String color)
                           throws HelloSignException
        Set the signer page text 1 color.
        Parameters:
        color - String hex color code
        Throws:
        HelloSignException - thrown if the color string is an invalid hex string
      • getTextColor2

        public java.lang.String getTextColor2()
        Get the signer page text 2 color.
        Returns:
        String hex color code
      • setTextColor2

        public void setTextColor2​(java.lang.String color)
                           throws HelloSignException
        Set the signer page text 2 color.
        Parameters:
        color - String hex color code
        Throws:
        HelloSignException - thrown if the color string is an invalid hex string
      • getLinkColor

        public java.lang.String getLinkColor()
        Get the signer page link color.
        Returns:
        String hex color code
      • setLinkColor

        public void setLinkColor​(java.lang.String color)
                          throws HelloSignException
        Set the signer page link color.
        Parameters:
        color - String hex color code
        Throws:
        HelloSignException - thrown if the color string is an invalid hex string
      • getPrimaryButtonColor

        public java.lang.String getPrimaryButtonColor()
        Get the signer page primary button color.
        Returns:
        String hex color code
      • setPrimaryButtonColor

        public void setPrimaryButtonColor​(java.lang.String color)
                                   throws HelloSignException
        Set the signer page primary button color.
        Parameters:
        color - String hex color code
        Throws:
        HelloSignException - thrown if the color string is an invalid hex string
      • getPrimaryButtonTextColor

        public java.lang.String getPrimaryButtonTextColor()
        Get the signer page primary button text color.
        Returns:
        String hex color code
      • setPrimaryButtonTextColor

        public void setPrimaryButtonTextColor​(java.lang.String color)
                                       throws HelloSignException
        Set the signer page primary button text color.
        Parameters:
        color - String hex color code
        Throws:
        HelloSignException - thrown if the color string is an invalid hex string
      • getPrimaryButtonHoverColor

        public java.lang.String getPrimaryButtonHoverColor()
        Get the signer page primary button hover color.
        Returns:
        String hex color code
      • setPrimaryButtonHoverColor

        public void setPrimaryButtonHoverColor​(java.lang.String color)
                                        throws HelloSignException
        Set the signer page primary button hover color.
        Parameters:
        color - String hex color code
        Throws:
        HelloSignException - thrown if the color string is an invalid hex string
      • getPrimaryButtonTextHoverColor

        public java.lang.String getPrimaryButtonTextHoverColor()
        Get the signer page primary button text hover color.
        Returns:
        String hex color code
      • setPrimaryButtonTextHoverColor

        public void setPrimaryButtonTextHoverColor​(java.lang.String color)
                                            throws HelloSignException
        Set the signer page primary button text hover color.
        Parameters:
        color - String hex color code
        Throws:
        HelloSignException - thrown if the color string is an invalid hex string
      • getSecondaryButtonColor

        public java.lang.String getSecondaryButtonColor()
        Get the signer page secondary button color.
        Returns:
        String hex color code
      • setSecondaryButtonColor

        public void setSecondaryButtonColor​(java.lang.String color)
                                     throws HelloSignException
        Set the signer page secondary button color.
        Parameters:
        color - String hex color code
        Throws:
        HelloSignException - thrown if the color string is an invalid hex string
      • getSecondaryButtonTextColor

        public java.lang.String getSecondaryButtonTextColor()
        Get the signer page secondary button text color.
        Returns:
        String hex color code
      • setSecondaryButtonTextColor

        public void setSecondaryButtonTextColor​(java.lang.String color)
                                         throws HelloSignException
        Set the signer page secondary button text color.
        Parameters:
        color - String hex color code
        Throws:
        HelloSignException - thrown if the color string is an invalid hex string
      • getSecondaryButtonHoverColor

        public java.lang.String getSecondaryButtonHoverColor()
        Get the signer page secondary button hover color.
        Returns:
        String hex color code
      • setSecondaryButtonHoverColor

        public void setSecondaryButtonHoverColor​(java.lang.String color)
                                          throws HelloSignException
        Set the signer page secondary button hover color.
        Parameters:
        color - String hex color code
        Throws:
        HelloSignException - thrown if the color string is an invalid hex string
      • getSecondaryButtonTextHoverColor

        public java.lang.String getSecondaryButtonTextHoverColor()
        Get the signer page secondary button text hover color.
        Returns:
        String hex color code
      • setSecondaryButtonTextHoverColor

        public void setSecondaryButtonTextHoverColor​(java.lang.String color)
                                              throws HelloSignException
        Set the signer page secondary button text hover color.
        Parameters:
        color - String hex color code
        Throws:
        HelloSignException - thrown if the color string is an invalid hex string