public void _004_TestSaleStop() { try { var ServiceObject = new SaleService(); var ArgsObject = new SaleStopServiceOptions(); ArgsObject.sale_id = sale_id; var result = ServiceObject.Stop(ArgsObject); Assert.IsInstanceOf<TwoCheckoutResponse>(result); } catch (TwoCheckoutException e) { Assert.IsInstanceOf<TwoCheckoutException>(e); } }
public void _003_TestSaleRetrieve() { try { var ServiceObject = new SaleService(); var ArgsObject = new SaleRetrieveServiceOptions(); ArgsObject.sale_id = sale_id; var result = ServiceObject.Retrieve(ArgsObject); Assert.IsInstanceOf<Sale>(result); } catch (TwoCheckoutException e) { Assert.IsInstanceOf<TwoCheckoutException>(e); } }
public void _002_TestSaleList() { try { var ServiceObject = new SaleService(); var ArgsObject = new SaleListServiceOptions(); ArgsObject.customer_email = "*****@*****.**"; var result = ServiceObject.List(ArgsObject); Assert.IsInstanceOf<SaleList>(result); } catch (TwoCheckoutException e) { Assert.IsInstanceOf<TwoCheckoutException>(e); } }
public void _011_TestSaleComment() { try { var ServiceObject = new SaleService(); var ArgsObject = new SaleCommentServiceOptions(); ArgsObject.sale_id = sale_id; ArgsObject.sale_comment = "Test"; var result = ServiceObject.Comment(ArgsObject); Assert.IsInstanceOf<TwoCheckoutResponse>(result); } catch (TwoCheckoutException e) { Assert.IsInstanceOf<TwoCheckoutException>(e); } }
public void _008_TestLineitemRefund() { try { var ServiceObject = new SaleService(); var ArgsObject = new SaleRefundServiceOptions(); ArgsObject.lineitem_id = lineitem_id; ArgsObject.comment = "test refund"; ArgsObject.category = 5; var result = ServiceObject.Refund(ArgsObject); Assert.IsInstanceOf<TwoCheckoutResponse>(result); } catch (TwoCheckoutException e) { Assert.IsInstanceOf<TwoCheckoutException>(e); } }