public void GetTerminalDetailsSuccess() { var client = CreateMockTestClientApiKeyBasedRequest( "Mocks/pos-terminal-management/get-terminals-details-success.json"); var posTerminalManagement = new PosTerminalManagement(client); var getTerminalDetailsRequest = new GetTerminalDetailsRequest { Terminal = "P400Plus-275479597", }; var getTerminalDetailsResponse = posTerminalManagement.GetTerminalDetails(getTerminalDetailsRequest); Assert.AreEqual(getTerminalDetailsResponse.CompanyAccount, "YOUR_COMPANY_ACCOUNT"); Assert.AreEqual(getTerminalDetailsResponse.MerchantAccount, "YOUR_MERCHANT_ACCOUNT"); Assert.AreEqual(getTerminalDetailsResponse.MerchantInventory, false); Assert.AreEqual(getTerminalDetailsResponse.Terminal, "P400Plus-275479597"); Assert.AreEqual(getTerminalDetailsResponse.DeviceModel, "P400Plus"); Assert.AreEqual(getTerminalDetailsResponse.SerialNumber, "275-479-597"); Assert.AreEqual(getTerminalDetailsResponse.PermanentTerminalId, "12000000"); Assert.AreEqual(getTerminalDetailsResponse.FirmwareVersion, "Verifone_VOS 1.50.7"); Assert.AreEqual(getTerminalDetailsResponse.TerminalStatus, "ReAssignToInventoryPending"); Assert.AreEqual(getTerminalDetailsResponse.Country, "NETHERLANDS"); Assert.AreEqual(getTerminalDetailsResponse.DhcpEnabled, false); }
/// <summary> /// post /getTerminalDetails /// </summary> /// <param name="getTerminalDetailsRequest"></param> /// <returns>task GetTerminalDetailsResponse</returns> public async Task<GetTerminalDetailsResponse> GetTerminalDetailsAsync(GetTerminalDetailsRequest getTerminalDetailsRequest) { var jsonRequest = Util.JsonOperation.SerializeRequest(getTerminalDetailsRequest); var jsonResponse = await _getTerminalDetails.RequestAsync(jsonRequest); return JsonConvert.DeserializeObject<GetTerminalDetailsResponse>(jsonResponse); }
/// <summary> /// post /getTerminalDetails /// </summary> /// <param name="getTerminalDetailsRequest"></param> /// <returns>task GetTerminalDetailsResponse</returns> public GetTerminalDetailsResponse GetTerminalDetails(GetTerminalDetailsRequest getTerminalDetailsRequest) { var jsonRequest = Util.JsonOperation.SerializeRequest(getTerminalDetailsRequest); var jsonResponse = _getTerminalDetails.Request(jsonRequest); return JsonConvert.DeserializeObject<GetTerminalDetailsResponse>(jsonResponse); }