コード例 #1
0
ファイル: EmailMain.cs プロジェクト: JonasESmith/ZendeskLead
        public EmailMain()
        {
            InitializeComponent(); googleAPI = new GoogleAPI();

            InitEmailIdList();     InitSalesReps();

            RunGoogleAPI();        StartTimers();

            LoadSalesButtons();

            // Google.Apis.Gmail.v1.Data.Message message = googleAPI.GetMessage("MessageID");
            // ZenOrder.ConvertToLineItems(message, googleAPI);
        }
コード例 #2
0
        // This will take the html body of an email with order details
        //     and parse information into a list that can be used in a
        //     quick manner.
        public List <string> ConvertToLineItems(Google.Apis.Gmail.v1.Data.Message message, GoogleAPI googleAPI)
        {
            string body = FormatBody(googleAPI.GetEmailBody(message));

            string[]      words       = RemoveBrackets(body);
            List <string> productList = RemoveSkus(words);

            productList = FormatProductList(productList);

            return(productList);
        }