Class Policy


  • public class Policy
    extends Object
    Policy
    • Constructor Detail

      • Policy

        public Policy()
    • Method Detail

      • resources

        public Policy resources​(Set<Resource> resources)
        An object containing the type and the unique identifier of the user of the component. For [Onboarding components](https://docs.adyen.com/platforms/onboard-users/components), this is the ID of the legal entity that has a contractual relationship with your platform. For sole proprietorships, use the ID of the legal entity of the individual owner. For [Platform Experience components](https://docs.adyen.com/platforms/build-user-dashboards), this is the ID of the account holder that is associated with the balance account shown in the component.
        Parameters:
        resources -
        Returns:
        the current Policy instance, allowing for method chaining
      • addResourcesItem

        public Policy addResourcesItem​(Resource resourcesItem)
      • getResources

        public Set<Resource> getResources()
        An object containing the type and the unique identifier of the user of the component. For [Onboarding components](https://docs.adyen.com/platforms/onboard-users/components), this is the ID of the legal entity that has a contractual relationship with your platform. For sole proprietorships, use the ID of the legal entity of the individual owner. For [Platform Experience components](https://docs.adyen.com/platforms/build-user-dashboards), this is the ID of the account holder that is associated with the balance account shown in the component.
        Returns:
        resources
      • setResources

        public void setResources​(Set<Resource> resources)
        An object containing the type and the unique identifier of the user of the component. For [Onboarding components](https://docs.adyen.com/platforms/onboard-users/components), this is the ID of the legal entity that has a contractual relationship with your platform. For sole proprietorships, use the ID of the legal entity of the individual owner. For [Platform Experience components](https://docs.adyen.com/platforms/build-user-dashboards), this is the ID of the account holder that is associated with the balance account shown in the component.
        Parameters:
        resources -
      • roles

        public Policy roles​(Set<String> roles)
        The name of the role required to use the component.
        Parameters:
        roles -
        Returns:
        the current Policy instance, allowing for method chaining
      • addRolesItem

        public Policy addRolesItem​(String rolesItem)
      • getRoles

        public Set<String> getRoles()
        The name of the role required to use the component.
        Returns:
        roles
      • setRoles

        public void setRoles​(Set<String> roles)
        The name of the role required to use the component.
        Parameters:
        roles -
      • equals

        public boolean equals​(Object o)
        Return true if this Policy object is equal to o.
        Overrides:
        equals in class Object
      • hashCode

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

        public static Policy fromJson​(String jsonString)
                               throws com.fasterxml.jackson.core.JsonProcessingException
        Create an instance of Policy given an JSON string
        Parameters:
        jsonString - JSON string
        Returns:
        An instance of Policy
        Throws:
        com.fasterxml.jackson.core.JsonProcessingException - if the JSON string is invalid with respect to Policy
      • toJson

        public String toJson()
                      throws com.fasterxml.jackson.core.JsonProcessingException
        Convert an instance of Policy to an JSON string
        Returns:
        JSON string
        Throws:
        com.fasterxml.jackson.core.JsonProcessingException