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