public ActionResult Receipt()
        {
            MyObCustomerPayment receipt = new MyObCustomerPayment();
            string MYOBToken            = OAuthKeyService.OAuthInformation.Token.AccessToken;

            receipt = _acountRightService.GetReceiptList(MYOBToken);

            return(View(receipt));
        }
Esempio n. 2
0
        public MyObCustomerPayment GetReceiptList(string MYOBToken)
        {
            string bURL = string.Format("{0}{1}/Sale/CustomerPayment", baseUrl, companyUID);
            MyObCustomerPayment rootobj = new MyObCustomerPayment();

            try
            {
                string jsonResponseString = WebApiGetRequest(bURL, MYOBToken);

                if (jsonResponseString.Contains("\"Count\": null"))
                {
                    return(rootobj);
                }
                rootobj = Newtonsoft.Json.JsonConvert.DeserializeObject <MyObCustomerPayment>(jsonResponseString);

                return(rootobj);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }