Ejemplo n.º 1
0
        public CfAutoReplyQueryResult QueryAutoReplies(CfQueryAutoReplies cfQueryAutoReplies)
        {
            var resourceList = BaseRequest <ResourceList>(HttpMethod.Get, new QueryAutoReplies(cfQueryAutoReplies),
                                                          new CallfireRestRoute <Text>(null, TextRestRouteObjects.AutoReply, null));

            var autoReply = resourceList.Resource == null ? null
                : resourceList.Resource.Select(r => AutoReplyMapper.FromAutoReplay((AutoReply)r)).ToArray();

            return(new CfAutoReplyQueryResult(resourceList.TotalResults, autoReply));
        }
Ejemplo n.º 2
0
        public CfAutoReply GetAutoReply(long id)
        {
            var resource = BaseRequest <Resource>(HttpMethod.Get, null, new CallfireRestRoute <Text>(id, TextRestRouteObjects.AutoReply, null));

            return(AutoReplyMapper.FromAutoReplay(resource.Resources as AutoReply));
        }
Ejemplo n.º 3
0
 public CfAutoReply GetAutoReply(long id)
 {
     return(AutoReplyMapper.FromAutoReplay(TextService.GetAutoReply(new IdRequest(id))));
 }