Skip to content

Commit

Permalink
update c# SDK project XML documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
Olman62 committed Feb 8, 2021
1 parent 684a71b commit 1433437
Show file tree
Hide file tree
Showing 29 changed files with 154 additions and 39 deletions.
Binary file modified .vs/Route4MeSDK/v16/.suo
Binary file not shown.
9 changes: 9 additions & 0 deletions Route4MeSDKLibrary/DataTypes/V5/Address/Address.cs
Original file line number Diff line number Diff line change
Expand Up @@ -336,6 +336,9 @@ public class Address : QueryTypes.GenericParameters
[ReadOnly(true)]
public double? DistanceToNextDestination { get; set; }

/// <summary>
/// UDU distance to next destination.
/// </summary>
[DataMember(Name = "udu_distance_to_next_destination", EmitDefaultValue = false)]
[ReadOnly(true)]
public double? UduDistanceToNextDestination { get; set; }
Expand Down Expand Up @@ -542,11 +545,17 @@ public class Address : QueryTypes.GenericParameters
[DataMember(Name = "joint", EmitDefaultValue = false)]
public int? Joint { get; set; }

/// <summary>
/// Bundle count
/// </summary>
[DataMember(Name = "bundle_count", EmitDefaultValue = true)]
[DefaultValue(0)]
[ReadOnly(true)]
public int BundleCount { get; set; }

/// <summary>
/// Bundle items
/// </summary>
[DataMember(Name = "bundle_items", EmitDefaultValue = true)]
[ReadOnly(true)]
public BundledItemResponse[] BundleItems { get; set; }
Expand Down
1 change: 0 additions & 1 deletion Route4MeSDKLibrary/DataTypes/V5/DataObject.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ public class DataObject : DataObjectBase
/// <summary>
/// An optimization problem state. See <see cref="OptimizationState"/>
/// </summary>
///
[DataMember(Name = "state")]
public OptimizationState State { get; set; }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,41 +3,74 @@

namespace Route4MeSDK.DataTypes.V5
{
/// <summary>
/// Route datatable configuration
/// </summary>
public class RouteDataTableConfigResponse
{
/// <summary>
/// API Capabilities
/// </summary>
[DataMember(Name = "api_capabilities", EmitDefaultValue = false)]
public ApiCapabilitiesCls ApiCapabilities { get; set; }

/// <summary>
/// API Preferences
/// </summary>
[DataMember(Name = "api_preferences", EmitDefaultValue = false)]
public ApiPreferencesCls ApiPreferences { get; set; }
}

public class ApiCapabilitiesCls
{
/// <summary>
/// Sortable Fields
/// </summary>
[DataMember(Name = "sortable_fields", EmitDefaultValue = false)]
public string[] SortableFields { get; set; }

/// <summary>
/// Combinations of the sortable fields
/// </summary>
[DataMember(Name = "sortable_fields_combinations", EmitDefaultValue = false)]
public List<string[]> SortableFieldsCombinations { get; set; }

/// <summary>
/// If true, multi-sorting enabled.
/// </summary>
[DataMember(Name = "multi_sorting_enabled", EmitDefaultValue = false)]
public bool? MultiSortingEnabled { get; set; }

/// <summary>
/// An array of the filterable fields.
/// </summary>
[DataMember(Name = "filterable_fields", EmitDefaultValue = false)]
public string[] FilterableFields { get; set; }

/// <summary>
/// If true, search enabled.
/// </summary>
[DataMember(Name = "search", EmitDefaultValue = false)]
public bool? Search { get; set; }
}

public class ApiPreferencesCls
{
/// <summary>
/// Force the server side search.
/// </summary>
[DataMember(Name = "force_server_side_search", EmitDefaultValue = false)]
public bool? ForceServerSideSearch { get; set; }

/// <summary>
/// If true, the search result loaded partially.
/// </summary>
[DataMember(Name = "partial_load", EmitDefaultValue = false)]
public bool? PartialLoad { get; set; }

/// <summary>
/// If true, simple pagination enabled.
/// </summary>
[DataMember(Name = "simple_pagination", EmitDefaultValue = false)]
public bool? SimplePagination { get; set; }
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public class RouteDuplicateResponse
public bool? Async { get; set; }

/// <summary>
/// An array of the duplicated route IDs.-
/// An array of the duplicated route IDs.
/// </summary>
[DataMember(Name = "route_ids", EmitDefaultValue = false)]
public string[] RouteIDs { get; set; }
Expand Down
3 changes: 1 addition & 2 deletions Route4MeSDKLibrary/DataTypes/V5/Routes/RouteParameters.cs
Original file line number Diff line number Diff line change
Expand Up @@ -433,7 +433,7 @@ public class RouteParameters
public string TruckBorders { get; set; }

/// <summary>
///Truck side street adherence.
/// Truck side street adherence.
/// enum: ["OFF", "MINIMAL","MODERATE","AVERAGE","STRICT","ADHERE","STRONGLYHERE"]
/// </summary>
[DataMember(Name = "truck_side_street_adherence", EmitDefaultValue = false)]
Expand Down Expand Up @@ -628,7 +628,6 @@ public SlowdownParams()
/// </summary>
[DataMember(Name = "travel_time", EmitDefaultValue = false)]
public int? TravelTime { get; set; }


}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
namespace Route4MeSDK.DataTypes.V5
{
/// <summary>
/// The response from the endpoint R4MEInfrastructureSettingsV5.RoutesDuplicate.
/// The response from the endpoint R4MEInfrastructureSettingsV5.Routes Delete.
/// </summary>
[DataContract]
public class RoutesDeleteResponse
Expand All @@ -20,11 +20,14 @@ public class RoutesDeleteResponse
[DataMember(Name = "async", EmitDefaultValue = false)]
public bool? Async { get; set; }

/// <summary>
/// Route ID
/// </summary>
[DataMember(Name = "route_id", EmitDefaultValue = false)]
public string RouteId { get; set; }

/// <summary>
/// An array of the duplicated route IDs.-
/// An array of the duplicated route IDs.
/// </summary>
[DataMember(Name = "route_ids", EmitDefaultValue = false)]
public string[] RouteIDs { get; set; }
Expand Down
25 changes: 24 additions & 1 deletion Route4MeSDKLibrary/QueryTypes/V5/OptimizationParameters.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,22 @@

namespace Route4MeSDK.QueryTypes.V5
{

/// <summary>
/// Optimization request parameters.
/// </summary>
[DataContract]
public sealed class OptimizationParameters : QueryTypes.GenericParameters
{
/// <summary>
/// Optimization problem ID
/// </summary>
[IgnoreDataMember] // Don't serialize as JSON
[HttpQueryMemberAttribute(Name = "optimization_problem_id", EmitDefaultValue = false)]
public string OptimizationProblemID { get; set; }

/// <summary>
/// If true, the optimization will be reoptimized.
/// </summary>
[IgnoreDataMember] // Don't serialize as JSON
[HttpQueryMemberAttribute(Name = "reoptimize", EmitDefaultValue = false)]
public bool? ReOptimize { get; set; }
Expand All @@ -22,10 +30,16 @@ public sealed class OptimizationParameters : QueryTypes.GenericParameters
[HttpQueryMemberAttribute(Name = "redirect", EmitDefaultValue = false)]
public bool? Redirect { get; set; }

/// <summary>
/// If true, the directions are shown in the optimization.
/// </summary>
[IgnoreDataMember] // Don't serialize as JSON
[HttpQueryMemberAttribute(Name = "show_directions", EmitDefaultValue = false)]
public bool? ShowDirections { get; set; }

/// <summary>
/// Optimization callback URL
/// </summary>
[IgnoreDataMember] // Don't serialize as JSON
[HttpQueryMemberAttribute(Name = "optimized_callback_url", EmitDefaultValue = false)]
public string OptimizedCallbackURL { get; set; }
Expand All @@ -44,14 +58,23 @@ public sealed class OptimizationParameters : QueryTypes.GenericParameters
[HttpQueryMemberAttribute(Name = "offset", EmitDefaultValue = false)]
public uint? Offset { get; set; }

/// <summary>
/// Route start date
/// </summary>
[IgnoreDataMember]
[HttpQueryMemberAttribute(Name = "start_date", EmitDefaultValue = false)]
public string StartDate { get; set; }

/// <summary>
/// Route end date
/// </summary>
[IgnoreDataMember]
[HttpQueryMemberAttribute(Name = "end_date", EmitDefaultValue = false)]
public string EndDate { get; set; }

/// <summary>
/// Optimization query string
/// </summary>
[IgnoreDataMember]
[HttpQueryMemberAttribute(Name = "query", EmitDefaultValue = false)]
public string Query { get; set; }
Expand Down
6 changes: 6 additions & 0 deletions Route4MeSDKLibrary/QueryTypes/V5/RouteParametersQuery.cs
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,16 @@ public sealed class RouteParametersQuery : GenericParameters
[HttpQueryMemberAttribute(Name = "offset", EmitDefaultValue = false)]
public uint? Offset { get; set; }

/// <summary>
/// Start date
/// </summary>
[IgnoreDataMember]
[HttpQueryMemberAttribute(Name = "start_date", EmitDefaultValue = false)]
public string StartDate { get; set; }

/// <summary>
/// End date
/// </summary>
[IgnoreDataMember]
[HttpQueryMemberAttribute(Name = "end_date", EmitDefaultValue = false)]
public string EndDate { get; set; }
Expand Down
19 changes: 10 additions & 9 deletions Route4MeSDKLibrary/Route4MeManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -748,18 +748,19 @@ public bool MergeRoutes(MergeRoutesQuery mergeRoutesParameters, out string error
new KeyValuePair<string, string>("remove_origin", mergeRoutesParameters.RemoveOrigin.ToString()),
new KeyValuePair<string, string>("depot_lat", mergeRoutesParameters.DepotLat.ToString()),
new KeyValuePair<string, string>("depot_lng", mergeRoutesParameters.DepotLng.ToString()),
new KeyValuePair<string, string>("to_route_id", mergeRoutesParameters.DepotLng.ToString()),
new KeyValuePair<string, string>("route_destination_id", mergeRoutesParameters.DepotLng.ToString())
new KeyValuePair<string, string>("to_route_id", mergeRoutesParameters.ToRouteId.ToString()),
new KeyValuePair<string, string>("route_destination_id", mergeRoutesParameters.RouteDestinationId.ToString())
};

HttpContent httpContent = new FormUrlEncodedContent(keyValues);

StatusResponse response = GetJsonObjectFromAPI<StatusResponse>
(roParames, R4MEInfrastructureSettings.MergeRoutes,
HttpMethodType.Post, httpContent, out errorString);
using (HttpContent httpContent = new FormUrlEncodedContent(keyValues))
{
StatusResponse response = GetJsonObjectFromAPI<StatusResponse>
(roParames, R4MEInfrastructureSettings.MergeRoutes,
HttpMethodType.Post, httpContent, out errorString);

return (response != null && response.status) ? true : false;
}
return (response != null && response.status) ? true : false;
};
}

/// <summary>
/// Resequences/roptimizes a route. TO DO: this endpoint seems to be deprecated and should be disabled
Expand Down
Loading

0 comments on commit 1433437

Please sign in to comment.