Пример #1
0
 public static Restaurant PutRestaurant(this RestfulBusinessApiClient api, Restaurant restaurant)
 {
     return(api.PutJson <Restaurant>("Restaurants/" + restaurant.Id.UrlEncode(), restaurant));
 }
Пример #2
0
 public static Asset PutAsset(this RestfulBusinessApiClient api, Asset asset)
 {
     return(api.PutJson <Asset>("Assets/" + asset.Id.UrlEncode(), asset));
 }
Пример #3
0
 public static RetailLocation PutRetailLocation(this RestfulBusinessApiClient api,
                                                RetailLocation retailRetailLocation)
 {
     return(api.PutJson <RetailLocation>("RetailLocations/" + retailRetailLocation.Id.UrlEncode(),
                                         retailRetailLocation));
 }
Пример #4
0
        /// <summary>
        ///     Sends a PUT request to the server to UPDATE an existing User, using <see cref="User.UserName" /> as the resource
        ///     Id.
        /// </summary>
        /// <param name="api"></param>
        /// <param name="user"></param>
        /// <returns></returns>
        public static User PutUser(this RestfulBusinessApiClient api, User user)
        {
            user.VerifyKeysAreValidXmlNames();

            return(api.PutJson <User>("Users/" + user.UserName.UrlEncode(), user));
        }