Example #1
0
        private static OperatingContextRM CreateOperatingContextForAssociateWithREST(int associateId, Commands.V1.OperatingContext.Create cmd)
        {
            string url = CreateOperatingContextForAssociateAPI.Replace("{associateId}", associateId.ToString());

            string postREST = PostREST(url, JsonConvert.SerializeObject(cmd));

            return(ReadModels.GetOperatingContextRM(postREST));
        }
Example #2
0
        private static OperatingContextRM CreateOperatingContextForCustomerWithREST(Commands.V1.OperatingContext.CreateForCustomer cmd)
        {
            string url = CreateOperatingContextForCustomerAPI.Replace("{customerId}", cmd.CustomerId.ToString());

            // The associate Id is not really important, but perhaps it should be
            url = url.Replace("{associateId}", "1");

            string postREST = PostREST(url, JsonConvert.SerializeObject(cmd));

            return(ReadModels.GetOperatingContextRM(postREST));
        }