Exemple #1
0
        public QueryVoucherResponse QueryVoucherRequest(string externalCode)
        {
            var request  = new QueryVoucherRequest();
            var parmsDic = new Dictionary <string, object>();
            var parms    = new QueryVoucherEntity {
                dtos = new VoucherDto[0].Append(new VoucherDto {
                    ExternalCode = externalCode
                }).ToArray()
            };

            parmsDic.Add("_args", JsonConvert.SerializeObject(parms));
            request.SetPostParameters(parmsDic);
            return(_Client.Excute(request));
        }
Exemple #2
0
        public QueryVoucherResponse QueryVoucherRequest(List <string> ids)
        {
            var request  = new QueryVoucherRequest();
            var parmsDic = new Dictionary <string, object>();
            var parms    = new QueryVoucherEntity();
            var dtos     = new List <VoucherDto>();

            ids.ForEach(t =>
            {
                dtos.Add(new VoucherDto {
                    ExternalCode = t
                });
            });
            parms.dtos = dtos.ToArray();
            parmsDic.Add("_args", JsonConvert.SerializeObject(parms));
            request.SetPostParameters(parmsDic);
            return(_Client.Excute(request));
        }