public async Task <GetPaymentpolicyByNameresponse> getPaymentPolicyByNameService(string name, string marketplaceId) { RestHelper helper = new RestHelper(ApplicationConstants.PaymentPolicy_Url + "get_by_policy_name?name=" + name + "&marketplace_id=" + marketplaceId); var response = await helper.Get(); GetPaymentpolicyByNameresponse getPaymentpolicyByNameresponse = JsonConvert.DeserializeObject <GetPaymentpolicyByNameresponse>(response); return(getPaymentpolicyByNameresponse); }
public void getPaymentPolicyByName() { AccountService accountService = new AccountService(); GetPaymentPolicyByNameRequest getPaymentPolicyByNameRequest = new GetPaymentPolicyByNameRequest(); getPaymentPolicyByNameRequest.name = "default payment policy"; getPaymentPolicyByNameRequest.marketplaceId = MarketplaceIdEnum.EBAY_US; string marketplaceId = getPaymentPolicyByNameRequest.marketplaceId.ToString(); string name = getPaymentPolicyByNameRequest.name; GetPaymentpolicyByNameresponse response = accountService.PaymentpolicyService.getPaymentPolicyByNameService(name, marketplaceId).Result; Assert.IsNotNull(response); }