Пример #1
0
        /// <summary>
        ///Delete Mandates
        /// </summary>
        /// <param name="Mandates">Mandates</param>
        /// <returns>bool</returns>
        public bool Delete(Mandates account)
        {
            account.SetRequiredFields(new List <string> {
                GlobalConstants.ProfileId,
                GlobalConstants.Id,
                GlobalConstants.BankAccountId
            });
            Request request = new Request(
                method: RequestType.Delete,
                uri: PrepareUri("/profiles/" + account.ProfileId() + "/mandates/" + account.Id())
                );

            _client.ProcessRequest(request);
            return(true);
        }
Пример #2
0
        /// <summary>
        /// update Mandates
        /// </summary>
        /// <param name="Mandates">Mandates</param>
        /// <returns>Mandates</returns>
        public Mandates Update(Mandates account)
        {
            account.SetRequiredFields(new List <string> {
                GlobalConstants.Status
            });
            account.CheckRequiredFields();
            Request request = new Request(
                method: RequestType.Put,
                uri: PrepareUri("/profiles/" + account.ProfileId() + "/mandates/" + account.Id()),
                body: account
                );
            dynamic response = _client.ProcessRequest(request);

            Mandates returnVal = new Mandates(response);

            returnVal.ProfileId(account.ProfileId());
            return(returnVal);
        }