/// <summary> /// Post /setupBeneficiary API call /// </summary> /// <param name="setupBeneficiaryRequest"></param> /// <returns>SetupBeneficiaryResponse</returns> /// public SetupBeneficiaryResponse SetupBeneficiary(SetupBeneficiaryRequest setupBeneficiaryRequest) { string jsonRequest = Util.JsonOperation.SerializeRequest(setupBeneficiaryRequest); string jsonResponse = _setupBeneficiary.Request(jsonRequest); return(JsonConvert.DeserializeObject <SetupBeneficiaryResponse>(jsonResponse)); }
public void TestSetupBeneficiary() { var client = CreateMockTestClientNullRequiredFieldsRequest("Mocks/marketpay/fund/setup-beneficiary-success.json"); var fund = new Fund(client); var setupBeneficiaryRequest = new SetupBeneficiaryRequest(destinationAccountCode: "128952522", merchantReference: "TestMerchantReference", sourceAccountCode: "134498192"); var setupBeneficiaryResponse = fund.SetupBeneficiary(setupBeneficiaryRequest); Assert.AreEqual("9914860354282596", setupBeneficiaryResponse.PspReference); Assert.AreEqual("Success", setupBeneficiaryResponse.ResultCode); }