Create new ACL

REST: POST /email/domain/{domain}/acl
@param accountId [required] Deleguates rights to
@param domain [required] Name of your domain name
763061
public OvhAcl domain_acl_POST(String domain, String accountId) throws IOException {
		String qPath = "/email/domain/{domain}/acl";
		StringBuilder sb = path(qPath, domain);
		HashMap<String, Object>o = new HashMap<String, Object>();
		addBody(o, "accountId", accountId);
		String resp = exec(qPath, "POST", sb.toString(), o);
		return convertTo(resp, OvhAcl.class);
	}
868506
@Trace(dispatcher = true)
	public Domain createReverseDomain(String name, Long templateId, String authorityType) throws GloboDnsException {
		NewRelic.setTransactionName(null, "/globodns/createReverseDomain");
		return this.createDomain(name, templateId, authorityType, true);
	}
236109
public static IDomainAccess createDomainAccess(IDBAccess dbAccess, String domainName) {
		return IDomainAccessFactory.INSTANCE.createDomainAccess(dbAccess, domainName);
	}
1374227
private IDomain createDomainIfNotExist(String domainId){
        IDomain foundDomain=findDomainByID(domainId);
        if(foundDomain==null){
            foundDomain=user.createDomain(domainName);
        }
        return foundDomain;
    }
479276
public void removeAccount(Account accountToDelete) {
        // Thou shalt not delete root
        if (accountToDelete.getId().equals(rootAccount.getId()))
            return;

        Account parent = findParent(accountToDelete);
        if (parent != null) {
            removeAccount(parent, accountToDelete);
            setDirty(true);
        }
    }
322415
def make_account_admin(self, user_id, account_id, role=None, role_id=None, send_confirmation=None):
        
        path = {}
        data = {}
        params = {}

        # REQUIRED - PATH - account_id
        """ID"""
        path["account_id"] = account_id

        # REQUIRED - user_id
        """The id of the user to promote."""
        data["user_id"] = user_id

        # OPTIONAL - role
        """(deprecated)
        The user's admin relationship with the account will be created with the
        given role. Defaults to 'AccountAdmin'."""
        if role is not None:
            data["role"] = role

        # OPTIONAL - role_id
        """The user's admin relationship with the account will be created with the
        given role. Defaults to the built-in role for 'AccountAdmin'."""
        if role_id is not None:
            data["role_id"] = role_id

        # OPTIONAL - send_confirmation
        """Send a notification email to
        the new admin if true. Default is true."""
        if send_confirmation is not None:
            data["send_confirmation"] = send_confirmation

        self.logger.debug("POST /api/v1/accounts/{account_id}/admins with query params: {params} and form data: {data}".format(params=params, data=data, **path))
        return self.generic_request("POST", "/api/v1/accounts/{account_id}/admins".format(**path), data=data, params=params, single_item=True)
660593
public OvhDomainUsageAccountStruct domain_account_accountName_usage_GET(String domain, String accountName) throws IOException {
		String qPath = "/email/domain/{domain}/account/{accountName}/usage";
		StringBuilder sb = path(qPath, domain, accountName);
		String resp = exec(qPath, "GET", sb.toString(), null);
		return convertTo(resp, OvhDomainUsageAccountStruct.class);
	}
217292
public Optional<PartnerAccount> create(long partnerId, PartnerAccount account)
    {
        return HTTP.POST(String.format("/v2/partners/%d/accounts", partnerId), account, PARTNER_ACCOUNT);
    }
1067373
public Response create(String username, String password, String organization, String email, String phone, String countryCode, String firstName, String lastName) {
        Response op = new Response();
        if (userDAO.hasUser(username) == false) {
            if (userDAO.hasUserWithEmail(email) == false) {
                if (organizationDAO.hasOrganization(organization) == true) {
                    PersistedUser user = new PersistedUser(username, null, Arrays.asList("ROLE_USER"), organization, email, phone, countryCode);
                    user.firstName = firstName;
                    user.lastName = lastName;
                    user.has2FAEnabled = Boolean.parseBoolean(authyEnabled);
                    createPasswordHash(user, password);
                    com.authy.api.User authyUser = client.getUsers().createUser(user.email, user.phone, user.countryCode);
                    user.authProviderId = authyUser.getId();
                    userDAO.create(user);
                    op.setPayload(true);
                    sendAccountVerificationMessage(user, null);
                    notifyOperator(user);
                } else {
                    op.addError(new Error(11));
                }
            } else {
                op.addError(new Error(Error.USER_BY_EMAIL_FOUND));
            }
        } else {
            op.addError(new Error(7));
        }
        return op;
    }
614580
private Domain createDomain(String name, Long templateId, String authorityType, boolean reverse) throws GloboDnsException {
		Domain domain = new Domain();
		domain.getDomainAttributes().setName(name);
		domain.getDomainAttributes().setTemplateId(templateId);
		domain.getDomainAttributes().setAuthorityType(authorityType);
		
		GloboDnsRoot<Domain> globoDnsRoot = this.post("/domains.json" + (reverse ? "?reverse=true" : ""), domain, false);
		if (globoDnsRoot == null) {
			throw new GloboDnsException("Invalid response");
		}
		return globoDnsRoot.getFirstObject();
	}
1033617
public static MozuUrl removeUserRoleAsyncUrl(Integer accountId, Integer roleId, String userId)
	{
		UrlFormatter formatter = new UrlFormatter("/api/commerce/customer/b2baccounts/{accountId}/user/{userId}/roles/{roleId}");
		formatter.formatUrl("accountId", accountId);
		formatter.formatUrl("roleId", roleId);
		formatter.formatUrl("userId", userId);
		return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ;
	}
991043
public function createBankAccount($accountID, BankAccount $bankAccount, $auto = true)
    {
        return $this->httpHelper->post("/accounts/" . intval($accountID) . "/payment_methods", [
            'type' => 'bank account',
            'account_number' => $bankAccount->getAccountNumber(),
            'routing_number' => $bankAccount->getRoutingNumber(),
            'name_on_account' => $bankAccount->getName(),
            'account_type' => $bankAccount->getType(),
            'auto' => (bool)$auto,
        ]);
    }
11079
@SuppressWarnings("unused")
    public static void changeCredentials(String accountID, String token) {
        changeCredentials(accountID, token, null);
    }
472977
public function delete($accountId, $permissionId, $optParams = array())
  {
    $params = array('accountId' => $accountId, 'permissionId' => $permissionId);
    $params = array_merge($params, $optParams);
    return $this->call('delete', array($params));
  }
1034089
public void setAccountIds(java.util.Collection<String> accountIds) {
        if (accountIds == null) {
            this.accountIds = null;
            return;
        }

        this.accountIds = new java.util.ArrayList<String>(accountIds);
    }
918661
public OvhAcl project_serviceName_acl_accountId_GET(String serviceName, String accountId) throws IOException {
		String qPath = "/cloud/project/{serviceName}/acl/{accountId}";
		StringBuilder sb = path(qPath, serviceName, accountId);
		String resp = exec(qPath, "GET", sb.toString(), null);
		return convertTo(resp, OvhAcl.class);
	}
1210767
public static MozuUrl deleteB2BAccountAttributeUrl(Integer accountId, String attributeFQN)
	{
		UrlFormatter formatter = new UrlFormatter("/api/commerce/customer/b2baccounts/{accountId}/attributes/{attributeFQN}");
		formatter.formatUrl("accountId", accountId);
		formatter.formatUrl("attributeFQN", attributeFQN);
		return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ;
	}