public Option Retrieve(OptionRetrieveServiceOptions options)
        {
            String  Result       = TwoCheckoutUtil.Request("api/products/detail_option", "GET", "admin", options);
            Options OptionResult = TwoCheckoutUtil.MapToObject <Options>(Result);

            return(OptionResult.option[0]);
        }
        public Authorization Authorize(ChargeAuthorizeServiceOptions options)
        {
            options.privateKey = TwoCheckoutConfig.PrivateKey;
            options.sellerId   = TwoCheckoutConfig.SellerID;
            string Result = TwoCheckoutUtil.Request("checkout/api/1/" + TwoCheckoutConfig.SellerID + "/rs/authService", "POST", "payment", options);

            return(TwoCheckoutUtil.MapToObject <Authorization>(Result, "response"));
        }
Exemple #3
0
 public TwoCheckoutResponse Refund(SaleRefundServiceOptions options)
 {
     String Result = null;
     if (options.lineitem_id != null)
     {
         Result = TwoCheckoutUtil.Request("api/sales/refund_lineitem", "POST", "admin", options);
     }
     else
     {
         Result = TwoCheckoutUtil.Request("api/sales/refund_invoice", "POST", "admin", options);
     }
     return TwoCheckoutUtil.MapToObject<TwoCheckoutResponse>(Result);
 }
Exemple #4
0
 public TwoCheckoutResponse Stop(SaleStopServiceOptions options)
 {
     String Result = null;
     if (options.sale_id != null)
     {
         Result = TwoCheckoutUtil.Request("api/sales/detail_sale", "GET", "admin", options);
         Dictionary<string, string> Active = TwoCheckoutUtil.Active(Result);
         if (Active.ContainsKey("lineitem_id0"))
         {
             Result = TwoCheckoutUtil.StopActiveLineitems(Active);
         }
         else
         {
             Result = "{ 'response_code': 'NOTICE', 'response_message': " + "'No active recurring lineitems.'" + " }";
         }
     }
     else
     {
         Result = TwoCheckoutUtil.Request("api/sales/stop_lineitem_recurring", "POST", "admin", options);
     }
     return TwoCheckoutUtil.MapToObject<TwoCheckoutResponse>(Result);
 }
Exemple #5
0
        public CouponList List()
        {
            String Result = TwoCheckoutUtil.Request("api/products/list_coupons", "GET", "admin");

            return(TwoCheckoutUtil.MapToObject <CouponList>(Result));
        }
Exemple #6
0
        public Sale Retrieve(SaleRetrieveServiceOptions options)
        {
            string Result = TwoCheckoutUtil.Request("api/sales/detail_sale", "GET", "admin", options);

            return(TwoCheckoutUtil.MapToObject <Sale>(Result, "sale"));
        }
        public Payment PendingPayment()
        {
            string Result = TwoCheckoutUtil.Request("api/acct/detail_pending_payment", "GET", "admin");

            return(TwoCheckoutUtil.MapToObject <Payment>(Result, "payment"));
        }
Exemple #8
0
        public TwoCheckoutResponse Comment(SaleCommentServiceOptions options)
        {
            string Result = TwoCheckoutUtil.Request("api/sales/create_comment", "POST", "admin", options);

            return(TwoCheckoutUtil.MapToObject <TwoCheckoutResponse>(Result));
        }
Exemple #9
0
        public TwoCheckoutResponse Ship(SaleShipServiceOptions options)
        {
            string Result = TwoCheckoutUtil.Request("api/sales/mark_shipped", "POST", "admin", options);

            return(TwoCheckoutUtil.MapToObject <TwoCheckoutResponse>(Result));
        }
        public List <Payment> ListPayments()
        {
            string Result = TwoCheckoutUtil.Request("api/acct/list_payments", "GET", "admin");

            return(TwoCheckoutUtil.MapToObject <List <Payment> >(Result, "payments"));
        }
Exemple #11
0
        public SaleList List(SaleListServiceOptions options = null)
        {
            string Result = TwoCheckoutUtil.Request("api/sales/list_sales", "GET", "admin", options);

            return(TwoCheckoutUtil.MapToObject <SaleList>(Result));
        }
Exemple #12
0
        public TwoCheckoutResponse Delete(CouponDeleteServiceOptions options = null)
        {
            String Result = TwoCheckoutUtil.Request("api/products/delete_coupon", "POST", "admin", options);

            return(TwoCheckoutUtil.MapToObject <TwoCheckoutResponse>(Result));
        }
Exemple #13
0
        public TwoCheckoutResponse Reauth(SaleReauthServiceOptions options)
        {
            String Result = TwoCheckoutUtil.Request("api/sales/reauth", "POST", "admin", options);

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

            return(TwoCheckoutUtil.MapToObject <TwoCheckoutResponse>(Result));
        }
        public OptionList List(OptionListServiceOptions options = null)
        {
            String Result = TwoCheckoutUtil.Request("api/products/list_options", "GET", "admin", options);

            return(TwoCheckoutUtil.MapToObject <OptionList>(Result));
        }
Exemple #16
0
        public Product Retrieve(ProductRetrieveServiceOptions options)
        {
            string Result = TwoCheckoutUtil.Request("api/products/detail_product", "GET", "admin", options);

            return(TwoCheckoutUtil.MapToObject <Product>(Result, "product"));
        }
Exemple #17
0
        public TwoCheckoutResponse Update(ProductUpdateServiceOptions options = null)
        {
            string Result = TwoCheckoutUtil.Request("api/products/update_product", "POST", "admin", options);

            return(TwoCheckoutUtil.MapToObject <TwoCheckoutResponse>(Result));
        }
        public Company CompanyInfo()
        {
            string Result = TwoCheckoutUtil.Request("api/acct/detail_company_info", "GET", "admin");

            return(TwoCheckoutUtil.MapToObject <Company>(Result, "vendor_company_info"));
        }
Exemple #19
0
        public Coupon Retrieve(CouponRetrieveServiceOptions options)
        {
            String Result = TwoCheckoutUtil.Request("api/products/detail_coupon", "GET", "admin", options);

            return(TwoCheckoutUtil.MapToObject <Coupon>(Result, "coupon"));
        }
Exemple #20
0
        public Contact ContactInfo()
        {
            String Result = TwoCheckoutUtil.Request("api/acct/detail_contact_info", "GET", "admin");

            return(TwoCheckoutUtil.MapToObject <Contact>(Result, "vendor_contact_info"));
        }