Esempio n. 1
0
        public async Task WhenAsync(MergePatchContactMechDto c)
        {
            var idObj         = (c as IMergePatchContactMech).ContactMechId;
            var uriParameters = new ContactMechUriParameters();

            uriParameters.Id = idObj;

            var req  = new ContactMechPatchRequest(uriParameters, (MergePatchContactMechDto)c);
            var resp = await _ramlClient.ContactMech.Patch(req);

            ContactMechProxyUtils.ThrowOnHttpResponseError(resp);
        }
Esempio n. 2
0
        public async Task <IContactMechState> GetAsync(string contactMechId)
        {
            IContactMechState state = null;
            var idObj         = contactMechId;
            var uriParameters = new ContactMechUriParameters();

            uriParameters.Id = idObj;

            var req = new ContactMechGetRequest(uriParameters);

            var resp = await _ramlClient.ContactMech.Get(req);

            ContactMechProxyUtils.ThrowOnHttpResponseError(resp);
            state = (resp.Content == null) ? null : resp.Content.ToContactMechState();
            return(state);
        }
Esempio n. 3
0
        public async Task WhenAsync(DeleteContactMechDto c)
        {
            var idObj         = (c as IDeleteContactMech).ContactMechId;
            var uriParameters = new ContactMechUriParameters();

            uriParameters.Id = idObj;

            var q = new ContactMechDeleteQuery();

            q.CommandId   = c.CommandId;
            q.RequesterId = c.RequesterId;
            q.Version     = Convert.ToString(c.Version);

            var req = new ContactMechDeleteRequest(uriParameters);

            req.Query = q;

            var resp = await _ramlClient.ContactMech.Delete(req);

            ContactMechProxyUtils.ThrowOnHttpResponseError(resp);
        }