public void _002_TestProductCreate()
 {
     var ServiceObject = new ProductService();
     var ArgsObject = new ProductCreateServiceOptions();
     ArgsObject.approved_url = "http://www.example.com";
     ArgsObject.description = "Test";
     ArgsObject.duration = "1 Year";
     ArgsObject.handling = (decimal)1.00;
     ArgsObject.long_description = "Test";
     ArgsObject.name = "Test Product";
     ArgsObject.price = (decimal)2.00;
     ArgsObject.recurrence = "1 Month";
     ArgsObject.recurring = 1;
     ArgsObject.startup_fee = (decimal)0.50;
     ArgsObject.tangible = 1;
     ArgsObject.vendor_product_id = "test123";
     ArgsObject.weight = (decimal)1.50;
     var result = ServiceObject.Create(ArgsObject);
     product_id = result.product_id;
     Assert.IsInstanceOf<TwoCheckoutResponse>(result);
 }
Esempio n. 2
0
        public TwoCheckoutResponse Create(ProductCreateServiceOptions options)
        {
            string Result = TwoCheckoutUtil.Request("api/products/create_product", "POST", "admin", options);

            return(TwoCheckoutUtil.MapToObject <TwoCheckoutResponse>(Result));
        }
 public TwoCheckoutResponse Create(ProductCreateServiceOptions options)
 {
     String Result = TwoCheckoutUtil.Request("api/products/create_product", "POST", "admin", options);
     return TwoCheckoutUtil.MapToObject<TwoCheckoutResponse>(Result);
 }