/// <summary> /// update SEPABankAccount /// </summary> /// <param name="SEPABankAccount">SEPABankAccount</param> /// <returns>SEPABankAccount</returns> public SepaBankAccounts Update(SepaBankAccounts account) { account.SetRequiredFields(new List <string> { GlobalConstants.ProfileId }); account.CheckRequiredFields(); account.SetOptionalFields(new List <string> { GlobalConstants.NickName, GlobalConstants.MerchantRefNum, GlobalConstants.AccountHolderName, GlobalConstants.Iban, GlobalConstants.Bic, GlobalConstants.BillingAddressId, }); Request request = new Request( method: RequestType.Put, uri: PrepareUri("/profiles/" + account.ProfileId() + "/sepabankaccounts/" + account.Id()), body: account ); dynamic response = _client.ProcessRequest(request); SepaBankAccounts returnVal = new SepaBankAccounts(response); returnVal.ProfileId(account.ProfileId()); return(returnVal); }
/// <summary> ///Delete SEPABankAccount /// </summary> /// <param name="SEPABankAccount">SEPABankAccount</param> /// <returns>bool</returns> public bool Delete(SepaBankAccounts account) { account.SetRequiredFields(new List <string> { GlobalConstants.ProfileId, GlobalConstants.Id }); account.CheckRequiredFields(); Request request = new Request( method: RequestType.Delete, uri: PrepareUri("/profiles/" + account.ProfileId() + "/sepabankaccounts/" + account.Id()) ); _client.ProcessRequest(request); return(true); }
/// <summary> /// Get SEPABankAccount /// </summary> /// <param name="SEPABankAccount">SEPABankAccount</param> /// <returns>SEPABankAccount</returns> public SepaBankAccounts Get(SepaBankAccounts account) { account.SetRequiredFields(new List <string> { GlobalConstants.BillingAddressId, GlobalConstants.Id }); account.CheckRequiredFields(); Request request = new Request( method: RequestType.Get, uri: PrepareUri("/profiles/" + account.ProfileId() + "/sepabankaccounts/" + account.Id()) ); dynamic response = _client.ProcessRequest(request); SepaBankAccounts returnVal = new SepaBankAccounts(response); returnVal.ProfileId(account.ProfileId()); return(returnVal); }