Exemplo n.º 1
0
        /// <summary>
        /// 過去に作成した課金のリストを取得します。
        /// </summary>
        /// <param name="list">リストを取得する際の条件</param>
        /// <param name="customerid">課金情報を取得する対象の顧客ID</param>
        /// <returns>課金情報のリスト</returns>
        public ChargeList All(ListRequest list, string customerid)
        {
            string query = string.Empty;

            if (list != null || !string.IsNullOrWhiteSpace(customerid))
            {
                Dictionary <string, string> dic = new Dictionary <string, string>();

                if (list != null)
                {
                    list.ToFormContent(dic);
                }

                if (!string.IsNullOrWhiteSpace(customerid))
                {
                    dic.Add("customer", customerid);
                }

                query = HelperImpl.ToQueryString(dic);
            }

            HttpRequestMessage message = new HttpRequestMessage(HttpMethod.Get, new Uri(parent.BaseUri, "charges?" + query));

            ChargeList retval = this.parent.SendRequest <ChargeList>(message);

            return(retval);
        }
Exemplo n.º 2
0
        /// <summary>
        /// 顧客のリストを取得します。
        /// </summary>
        /// <param name="list">リストを取得する際の条件</param>
        /// <returns>顧客のリスト</returns>
        public CustomerList All(ListRequest list)
        {
            Dictionary <string, string> dic = list.ToFormContent(new Dictionary <string, string>());
            string             query        = HelperImpl.ToQueryString(dic);
            HttpRequestMessage message      = new HttpRequestMessage(HttpMethod.Get, new Uri(parent.BaseUri, "customers?" + query));

            CustomerList retval = this.parent.SendRequest <CustomerList>(message);

            return(retval);
        }