/// <summary> /// Post /unSuspendAccountHolder API call /// </summary> /// <param name="unSuspendAccountHolderRequest"></param> /// <returns>UnSuspendAccountHolderResponse</returns> public UnSuspendAccountHolderResponse UnSuspendAccountHolder(UnSuspendAccountHolderRequest unSuspendAccountHolderRequest) { var jsonRequest = Util.JsonOperation.SerializeRequest(unSuspendAccountHolderRequest); var jsonResponse = _unSuspendAccountHolder.Request(jsonRequest); return(JsonConvert.DeserializeObject <UnSuspendAccountHolderResponse>(jsonResponse)); }
public void TestUnSuspendAccountHolderSuccess() { var client = CreateMockTestClientNullRequiredFieldsRequest("Mocks/marketpay/account/un-suspend-account-holder-success.json"); var account = new Account(client); var unSuspendAccountHolderRequest = new UnSuspendAccountHolderRequest(accountHolderCode: "123456"); var unSuspendAccountHolderResponse = account.UnSuspendAccountHolder(unSuspendAccountHolderRequest); Assert.AreEqual(unSuspendAccountHolderResponse.PspReference, "8815813528286482"); Assert.AreEqual(unSuspendAccountHolderResponse.AccountHolderStatus.Status, AccountHolderStatus.StatusEnum.Active); Assert.AreEqual(unSuspendAccountHolderResponse.AccountHolderStatus.PayoutState.AllowPayout, false); Assert.AreEqual(unSuspendAccountHolderResponse.AccountHolderStatus.PayoutState.Disabled, false); }