Try your search with a different keyword or use * as a wildcard.
//----------------------
//
// Generated using the NSwag toolchain v14.0.7.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0)) (http://NSwag.org)
//
//----------------------
#pragma warning disable 108 // Disable "CS0108 '{derivedDto}.ToJson()' hides inherited member '{dtoBase}.ToJson()'. Use the new keyword if hiding was intended."
#pragma warning disable 114 // Disable "CS0114 '{derivedDto}.RaisePropertyChanged(String)' hides inherited member 'dtoBase.RaisePropertyChanged(String)'. To make the current member override that implementation, add the override keyword. Otherwise add the new keyword."
#pragma warning disable 472 // Disable "CS0472 The result of the expression is always 'false' since a value of type 'Int32' is never equal to 'null' of type 'Int32?'
#pragma warning disable 612 // Disable "CS0612 '...' is obsolete"
#pragma warning disable 1573 // Disable "CS1573 Parameter '...' has no matching param tag in the XML comment for ...
#pragma warning disable 1591 // Disable "CS1591 Missing XML comment for publicly visible type or member ..."
#pragma warning disable 8073 // Disable "CS8073 The result of the expression is always 'false' since a value of type 'T' is never equal to 'null' of type 'T?'"
#pragma warning disable 3016 // Disable "CS3016 Arrays as attribute arguments is not CLS-compliant"
#pragma warning disable 8603 // Disable "CS8603 Possible null reference return"
#pragma warning disable 8604 // Disable "CS8604 Possible null reference argument for parameter"
#pragma warning disable 8625 // Disable "CS8625 Cannot convert null literal to non-nullable reference type"
#pragma warning disable CS8765 // Nullability of type of parameter doesn't match overridden member (possibly because of nullability attributes).
namespace Nop.Plugin.Shipping.UPS.API.Rates
{
using System = global::System;
[System.CodeDom.Compiler.GeneratedCode("NSwag", "14.0.7.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")]
public partial class RateClient
{
#pragma warning disable 8618
private string _baseUrl;
#pragma warning restore 8618
private System.Net.Http.HttpClient _httpClient;
private static System.Lazy _settings = new System.Lazy(CreateSerializerSettings, true);
#pragma warning disable CS8618 // Non-nullable field must contain a non-null value when exiting constructor. Consider declaring as nullable.
public RateClient(System.Net.Http.HttpClient httpClient)
#pragma warning restore CS8618 // Non-nullable field must contain a non-null value when exiting constructor. Consider declaring as nullable.
{
BaseUrl = "https://wwwcie.ups.com/api";
_httpClient = httpClient;
}
private static Newtonsoft.Json.JsonSerializerSettings CreateSerializerSettings()
{
var settings = new Newtonsoft.Json.JsonSerializerSettings();
UpdateJsonSerializerSettings(settings);
return settings;
}
public string BaseUrl
{
get { return _baseUrl; }
set
{
_baseUrl = value;
if (!string.IsNullOrEmpty(_baseUrl) && !_baseUrl.EndsWith("/"))
_baseUrl += '/';
}
}
protected Newtonsoft.Json.JsonSerializerSettings JsonSerializerSettings { get { return _settings.Value; } }
static partial void UpdateJsonSerializerSettings(Newtonsoft.Json.JsonSerializerSettings settings);
partial void PrepareRequest(System.Net.Http.HttpClient client, System.Net.Http.HttpRequestMessage request, string url);
partial void PrepareRequest(System.Net.Http.HttpClient client, System.Net.Http.HttpRequestMessage request, System.Text.StringBuilder urlBuilder);
partial void ProcessResponse(System.Net.Http.HttpClient client, System.Net.Http.HttpResponseMessage response);
///
/// Rating
///
///
/// The Rating API is used when rating or shopping a shipment.
///
/// An identifier unique to the request. Length 32
/// An identifier of the client/source application that is making the request.Length 512
/// Valid Values: timeintransit = The server rates with transit time information combined with requestoption in URL.Rate is the only valid request option for Ground Freight Pricing requests. Length 15
/// Indicates Rate API to display the new release features in Rate API response based on Rate release. See the New section for the latest Rate release.
///
///
Valid values:
///
- v2403
/// Valid Values:
///
- Rate = The server rates (The default Request option is Rate if a Request Option is not provided).
///
- Shop = The server validates the shipment, and returns rates for all UPS products from the ShipFrom to the ShipTo addresses.
///
- Ratetimeintransit = The server rates with transit time information
///
- Shoptimeintransit = The server validates the shipment, and returns rates and transit times for all UPS products from the ShipFrom to the ShipTo addresses.
///
///
Rate is the only valid request option for UPS Ground Freight Pricing requests.
/// Generate sample code for popular API requests by selecting an example below. To view a full sample request and response, first click "Authorize" and enter your application credentials, then populate the required parameters above and click "Try it out".
/// successful operation
/// A server side error occurred.
public virtual System.Threading.Tasks.Task RateAsync(string transId, string transactionSrc, string additionalinfo, string version, string requestoption, RATERequestWrapper body)
{
return RateAsync(transId, transactionSrc, additionalinfo, version, requestoption, body, System.Threading.CancellationToken.None);
}
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
///
/// Rating
///
///
/// The Rating API is used when rating or shopping a shipment.
///
/// An identifier unique to the request. Length 32
/// An identifier of the client/source application that is making the request.Length 512
/// Valid Values: timeintransit = The server rates with transit time information combined with requestoption in URL.Rate is the only valid request option for Ground Freight Pricing requests. Length 15
/// Indicates Rate API to display the new release features in Rate API response based on Rate release. See the New section for the latest Rate release.
///
///
Valid values:
///
- v2403
/// Valid Values:
///
- Rate = The server rates (The default Request option is Rate if a Request Option is not provided).
///
- Shop = The server validates the shipment, and returns rates for all UPS products from the ShipFrom to the ShipTo addresses.
///
- Ratetimeintransit = The server rates with transit time information
///
- Shoptimeintransit = The server validates the shipment, and returns rates and transit times for all UPS products from the ShipFrom to the ShipTo addresses.
///
///
Rate is the only valid request option for UPS Ground Freight Pricing requests.
/// Generate sample code for popular API requests by selecting an example below. To view a full sample request and response, first click "Authorize" and enter your application credentials, then populate the required parameters above and click "Try it out".
/// successful operation
/// A server side error occurred.
public virtual async System.Threading.Tasks.Task RateAsync(string transId, string transactionSrc, string additionalinfo, string version, string requestoption, RATERequestWrapper body, System.Threading.CancellationToken cancellationToken)
{
if (version == null)
throw new System.ArgumentNullException("version");
if (requestoption == null)
throw new System.ArgumentNullException("requestoption");
if (body == null)
throw new System.ArgumentNullException("body");
var client_ = _httpClient;
var disposeClient_ = false;
try
{
using (var request_ = new System.Net.Http.HttpRequestMessage())
{
if (transId != null)
request_.Headers.TryAddWithoutValidation("transId", ConvertToString(transId, System.Globalization.CultureInfo.InvariantCulture));
if (transactionSrc != null)
request_.Headers.TryAddWithoutValidation("transactionSrc", ConvertToString(transactionSrc, System.Globalization.CultureInfo.InvariantCulture));
var json_ = Newtonsoft.Json.JsonConvert.SerializeObject(body, _settings.Value);
var content_ = new System.Net.Http.StringContent(json_);
content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json");
request_.Content = content_;
request_.Method = new System.Net.Http.HttpMethod("POST");
request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json"));
var urlBuilder_ = new System.Text.StringBuilder();
if (!string.IsNullOrEmpty(_baseUrl))
urlBuilder_.Append(_baseUrl);
// Operation Path: "rating/{version}/{requestoption}"
urlBuilder_.Append("rating/");
urlBuilder_.Append(System.Uri.EscapeDataString(ConvertToString(version, System.Globalization.CultureInfo.InvariantCulture)));
urlBuilder_.Append('/');
urlBuilder_.Append(System.Uri.EscapeDataString(ConvertToString(requestoption, System.Globalization.CultureInfo.InvariantCulture)));
urlBuilder_.Append('?');
if (additionalinfo != null)
{
urlBuilder_.Append(System.Uri.EscapeDataString("additionalinfo")).Append('=').Append(System.Uri.EscapeDataString(ConvertToString(additionalinfo, System.Globalization.CultureInfo.InvariantCulture))).Append('&');
}
urlBuilder_.Length--;
PrepareRequest(client_, request_, urlBuilder_);
var url_ = urlBuilder_.ToString();
request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute);
PrepareRequest(client_, request_, url_);
var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false);
var disposeResponse_ = true;
try
{
var headers_ = new System.Collections.Generic.Dictionary>();
foreach (var item_ in response_.Headers)
headers_[item_.Key] = item_.Value;
if (response_.Content != null && response_.Content.Headers != null)
{
foreach (var item_ in response_.Content.Headers)
headers_[item_.Key] = item_.Value;
}
ProcessResponse(client_, response_);
var status_ = (int)response_.StatusCode;
if (status_ == 200)
{
var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false);
if (objectResponse_.Object == null)
{
throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null);
}
return objectResponse_.Object;
}
else
if (status_ == 400)
{
var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false);
if (objectResponse_.Object == null)
{
throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null);
}
throw new ApiException("Invalid Request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null);
}
else
if (status_ == 401)
{
var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false);
if (objectResponse_.Object == null)
{
throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null);
}
throw new ApiException("Unauthorized Request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null);
}
else
if (status_ == 403)
{
var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false);
if (objectResponse_.Object == null)
{
throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null);
}
throw new ApiException("Blocked Merchant", status_, objectResponse_.Text, headers_, objectResponse_.Object, null);
}
else
if (status_ == 429)
{
var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false);
if (objectResponse_.Object == null)
{
throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null);
}
throw new ApiException("Rate Limit Exceeded", status_, objectResponse_.Text, headers_, objectResponse_.Object, null);
}
else
{
var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false);
throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null);
}
}
finally
{
if (disposeResponse_)
response_.Dispose();
}
}
}
finally
{
if (disposeClient_)
client_.Dispose();
}
}
///
/// Rating
///
///
/// The Rating API is used when rating or shopping a shipment.
///
/// An identifier unique to the request. Length 32
/// An identifier of the client/source application that is making the request.Length 512
/// Valid Values: timeintransit = The server rates with transit time information combined with requestoption in URL.Rate is the only valid request option for Ground Freight Pricing requests. Length 15
/// Indicates Rate API to display the new release features in Rate API response based on Rate release. See the New section for the latest Rate release.
///
///
Valid values:
///
- v1
///
- v1601
///
- v1607
///
- 1701
///
- 1707
///
- v2108
///
- v2205
/// Valid Values:
///
- Rate = The server rates (The default Request option is Rate if a Request Option is not provided).
///
- Shop = The server validates the shipment, and returns rates for all UPS products from the ShipFrom to the ShipTo addresses.
///
- Ratetimeintransit = The server rates with transit time information
///
- Shoptimeintransit = The server validates the shipment, and returns rates and transit times for all UPS products from the ShipFrom to the ShipTo addresses.
///
///
Rate is the only valid request option for UPS Ground Freight Pricing requests.
/// Generate sample code for popular API requests by selecting an example below. To view a full sample request and response, first click "Authorize" and enter your application credentials, then populate the required parameters above and click "Try it out".
/// successful operation
/// A server side error occurred.
[System.Obsolete]
public virtual System.Threading.Tasks.Task Deprecated_RateAsync(string transId, string transactionSrc, string additionalinfo, string deprecatedVersion, string requestoption, RATERequestWrapper body)
{
return Deprecated_RateAsync(transId, transactionSrc, additionalinfo, deprecatedVersion, requestoption, body, System.Threading.CancellationToken.None);
}
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
///
/// Rating
///
///
/// The Rating API is used when rating or shopping a shipment.
///
/// An identifier unique to the request. Length 32
/// An identifier of the client/source application that is making the request.Length 512
/// Valid Values: timeintransit = The server rates with transit time information combined with requestoption in URL.Rate is the only valid request option for Ground Freight Pricing requests. Length 15
/// Indicates Rate API to display the new release features in Rate API response based on Rate release. See the New section for the latest Rate release.
///
///
Valid values:
///
- v1
///
- v1601
///
- v1607
///
- 1701
///
- 1707
///
- v2108
///
- v2205
/// Valid Values:
///
- Rate = The server rates (The default Request option is Rate if a Request Option is not provided).
///
- Shop = The server validates the shipment, and returns rates for all UPS products from the ShipFrom to the ShipTo addresses.
///
- Ratetimeintransit = The server rates with transit time information
///
- Shoptimeintransit = The server validates the shipment, and returns rates and transit times for all UPS products from the ShipFrom to the ShipTo addresses.
///
///
Rate is the only valid request option for UPS Ground Freight Pricing requests.
/// Generate sample code for popular API requests by selecting an example below. To view a full sample request and response, first click "Authorize" and enter your application credentials, then populate the required parameters above and click "Try it out".
/// successful operation
/// A server side error occurred.
[System.Obsolete]
public virtual async System.Threading.Tasks.Task Deprecated_RateAsync(string transId, string transactionSrc, string additionalinfo, string deprecatedVersion, string requestoption, RATERequestWrapper body, System.Threading.CancellationToken cancellationToken)
{
if (deprecatedVersion == null)
throw new System.ArgumentNullException("deprecatedVersion");
if (requestoption == null)
throw new System.ArgumentNullException("requestoption");
if (body == null)
throw new System.ArgumentNullException("body");
var client_ = _httpClient;
var disposeClient_ = false;
try
{
using (var request_ = new System.Net.Http.HttpRequestMessage())
{
if (transId != null)
request_.Headers.TryAddWithoutValidation("transId", ConvertToString(transId, System.Globalization.CultureInfo.InvariantCulture));
if (transactionSrc != null)
request_.Headers.TryAddWithoutValidation("transactionSrc", ConvertToString(transactionSrc, System.Globalization.CultureInfo.InvariantCulture));
var json_ = Newtonsoft.Json.JsonConvert.SerializeObject(body, _settings.Value);
var content_ = new System.Net.Http.StringContent(json_);
content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json");
request_.Content = content_;
request_.Method = new System.Net.Http.HttpMethod("POST");
request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json"));
var urlBuilder_ = new System.Text.StringBuilder();
if (!string.IsNullOrEmpty(_baseUrl))
urlBuilder_.Append(_baseUrl);
// Operation Path: "rating/{deprecatedVersion}/{requestoption}"
urlBuilder_.Append("rating/");
urlBuilder_.Append(System.Uri.EscapeDataString(ConvertToString(deprecatedVersion, System.Globalization.CultureInfo.InvariantCulture)));
urlBuilder_.Append('/');
urlBuilder_.Append(System.Uri.EscapeDataString(ConvertToString(requestoption, System.Globalization.CultureInfo.InvariantCulture)));
urlBuilder_.Append('?');
if (additionalinfo != null)
{
urlBuilder_.Append(System.Uri.EscapeDataString("additionalinfo")).Append('=').Append(System.Uri.EscapeDataString(ConvertToString(additionalinfo, System.Globalization.CultureInfo.InvariantCulture))).Append('&');
}
urlBuilder_.Length--;
PrepareRequest(client_, request_, urlBuilder_);
var url_ = urlBuilder_.ToString();
request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute);
PrepareRequest(client_, request_, url_);
var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false);
var disposeResponse_ = true;
try
{
var headers_ = new System.Collections.Generic.Dictionary>();
foreach (var item_ in response_.Headers)
headers_[item_.Key] = item_.Value;
if (response_.Content != null && response_.Content.Headers != null)
{
foreach (var item_ in response_.Content.Headers)
headers_[item_.Key] = item_.Value;
}
ProcessResponse(client_, response_);
var status_ = (int)response_.StatusCode;
if (status_ == 200)
{
var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false);
if (objectResponse_.Object == null)
{
throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null);
}
return objectResponse_.Object;
}
else
if (status_ == 400)
{
var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false);
if (objectResponse_.Object == null)
{
throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null);
}
throw new ApiException("Invalid Request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null);
}
else
if (status_ == 401)
{
var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false);
if (objectResponse_.Object == null)
{
throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null);
}
throw new ApiException("Unauthorized Request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null);
}
else
if (status_ == 403)
{
var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false);
if (objectResponse_.Object == null)
{
throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null);
}
throw new ApiException("Blocked Merchant", status_, objectResponse_.Text, headers_, objectResponse_.Object, null);
}
else
if (status_ == 429)
{
var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false);
if (objectResponse_.Object == null)
{
throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null);
}
throw new ApiException("Rate Limit Exceeded", status_, objectResponse_.Text, headers_, objectResponse_.Object, null);
}
else
{
var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false);
throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null);
}
}
finally
{
if (disposeResponse_)
response_.Dispose();
}
}
}
finally
{
if (disposeClient_)
client_.Dispose();
}
}
protected struct ObjectResponseResult
{
public ObjectResponseResult(T responseObject, string responseText)
{
this.Object = responseObject;
this.Text = responseText;
}
public T Object { get; }
public string Text { get; }
}
public bool ReadResponseAsString { get; set; }
protected virtual async System.Threading.Tasks.Task> ReadObjectResponseAsync(System.Net.Http.HttpResponseMessage response, System.Collections.Generic.IReadOnlyDictionary> headers, System.Threading.CancellationToken cancellationToken)
{
if (response == null || response.Content == null)
{
return new ObjectResponseResult(default(T), string.Empty);
}
if (ReadResponseAsString)
{
var responseText = await response.Content.ReadAsStringAsync().ConfigureAwait(false);
try
{
var typedBody = Newtonsoft.Json.JsonConvert.DeserializeObject(responseText, JsonSerializerSettings);
return new ObjectResponseResult(typedBody, responseText);
}
catch (Newtonsoft.Json.JsonException exception)
{
var message = "Could not deserialize the response body string as " + typeof(T).FullName + ".";
throw new ApiException(message, (int)response.StatusCode, responseText, headers, exception);
}
}
else
{
try
{
using (var responseStream = await response.Content.ReadAsStreamAsync().ConfigureAwait(false))
using (var streamReader = new System.IO.StreamReader(responseStream))
using (var jsonTextReader = new Newtonsoft.Json.JsonTextReader(streamReader))
{
var serializer = Newtonsoft.Json.JsonSerializer.Create(JsonSerializerSettings);
var typedBody = serializer.Deserialize(jsonTextReader);
return new ObjectResponseResult(typedBody, string.Empty);
}
}
catch (Newtonsoft.Json.JsonException exception)
{
var message = "Could not deserialize the response body stream as " + typeof(T).FullName + ".";
throw new ApiException(message, (int)response.StatusCode, string.Empty, headers, exception);
}
}
}
private string ConvertToString(object value, System.Globalization.CultureInfo cultureInfo)
{
if (value == null)
{
return "";
}
if (value is System.Enum)
{
var name = System.Enum.GetName(value.GetType(), value);
if (name != null)
{
var field = System.Reflection.IntrospectionExtensions.GetTypeInfo(value.GetType()).GetDeclaredField(name);
if (field != null)
{
var attribute = System.Reflection.CustomAttributeExtensions.GetCustomAttribute(field, typeof(System.Runtime.Serialization.EnumMemberAttribute))
as System.Runtime.Serialization.EnumMemberAttribute;
if (attribute != null)
{
return attribute.Value != null ? attribute.Value : name;
}
}
var converted = System.Convert.ToString(System.Convert.ChangeType(value, System.Enum.GetUnderlyingType(value.GetType()), cultureInfo));
return converted == null ? string.Empty : converted;
}
}
else if (value is bool)
{
return System.Convert.ToString((bool)value, cultureInfo).ToLowerInvariant();
}
else if (value is byte[])
{
return System.Convert.ToBase64String((byte[])value);
}
else if (value is string[])
{
return string.Join(",", (string[])value);
}
else if (value.GetType().IsArray)
{
var valueArray = (System.Array)value;
var valueTextArray = new string[valueArray.Length];
for (var i = 0; i < valueArray.Length; i++)
{
valueTextArray[i] = ConvertToString(valueArray.GetValue(i), cultureInfo);
}
return string.Join(",", valueTextArray);
}
var result = System.Convert.ToString(value, cultureInfo);
return result == null ? "" : result;
}
}
///
/// N/A
///
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.7.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")]
public partial class RATERequestWrapper
{
[Newtonsoft.Json.JsonProperty("RateRequest", Required = Newtonsoft.Json.Required.Always)]
[System.ComponentModel.DataAnnotations.Required]
public RateRequest RateRequest { get; set; } = new RateRequest();
private System.Collections.Generic.IDictionary _additionalProperties;
[Newtonsoft.Json.JsonExtensionData]
public System.Collections.Generic.IDictionary AdditionalProperties
{
get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary()); }
set { _additionalProperties = value; }
}
}
///
/// N/A
///
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.7.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")]
public partial class RATEResponseWrapper
{
[Newtonsoft.Json.JsonProperty("RateResponse", Required = Newtonsoft.Json.Required.Always)]
[System.ComponentModel.DataAnnotations.Required]
public RateResponse RateResponse { get; set; } = new RateResponse();
private System.Collections.Generic.IDictionary _additionalProperties;
[Newtonsoft.Json.JsonExtensionData]
public System.Collections.Generic.IDictionary AdditionalProperties
{
get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary()); }
set { _additionalProperties = value; }
}
}
///
/// Rate Request container.
///
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.7.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")]
public partial class RateRequest
{
[Newtonsoft.Json.JsonProperty("Request", Required = Newtonsoft.Json.Required.Always)]
[System.ComponentModel.DataAnnotations.Required]
public RateRequest_Request Request { get; set; } = new RateRequest_Request();
[Newtonsoft.Json.JsonProperty("PickupType", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public RateRequest_PickupType PickupType { get; set; }
[Newtonsoft.Json.JsonProperty("CustomerClassification", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public RateRequest_CustomerClassification CustomerClassification { get; set; }
[Newtonsoft.Json.JsonProperty("Shipment", Required = Newtonsoft.Json.Required.Always)]
[System.ComponentModel.DataAnnotations.Required]
public RateRequest_Shipment Shipment { get; set; } = new RateRequest_Shipment();
private System.Collections.Generic.IDictionary _additionalProperties;
[Newtonsoft.Json.JsonExtensionData]
public System.Collections.Generic.IDictionary AdditionalProperties
{
get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary()); }
set { _additionalProperties = value; }
}
}
///
/// Request container. N/A
///
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.7.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")]
public partial class RateRequest_Request
{
///
/// Used to define the request type. Valid Values:
///
- Rate = The server rates (The default Request option is Rate if a Request Option is not provided).
///
- Shop = The server validates the shipment, and returns rates for all UPS products from the ShipFrom to the ShipTo addresses.
///
- Ratetimeintransit = The server rates with transit time information
///
- Shoptimeintransit = The server validates the shipment, and returns rates and transit times for all UPS products from the ShipFrom to the ShipTo addresses.
///
///
Rate is the only valid request option for UPS Ground Freight Pricing requests.
///
///
[Newtonsoft.Json.JsonProperty("RequestOption", Required = Newtonsoft.Json.Required.Always)]
[System.ComponentModel.DataAnnotations.Required]
[System.ComponentModel.DataAnnotations.StringLength(15, MinimumLength = 1)]
public string RequestOption { get; set; }
///
/// Indicates Rate API to display the new release features in Rate API response based on Rate release. See the What's New section for the latest Rate release. Supported values: 1601, 1607, 1701, 1707, 2108, 2205
///
[Newtonsoft.Json.JsonProperty("SubVersion", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
[System.ComponentModel.DataAnnotations.StringLength(4, MinimumLength = 4)]
public string SubVersion { get; set; }
[Newtonsoft.Json.JsonProperty("TransactionReference", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public Request_TransactionReference TransactionReference { get; set; }
private System.Collections.Generic.IDictionary _additionalProperties;
[Newtonsoft.Json.JsonExtensionData]
public System.Collections.Generic.IDictionary AdditionalProperties
{
get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary()); }
set { _additionalProperties = value; }
}
}
///
/// TransactionReference identifies transactions between client and server.
///
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.7.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")]
public partial class Request_TransactionReference
{
///
/// May be used to synchronize request/response pairs. Information in the request element is echoed back in the response.
///
[Newtonsoft.Json.JsonProperty("CustomerContext", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
[System.ComponentModel.DataAnnotations.StringLength(512, MinimumLength = 1)]
public string CustomerContext { get; set; }
private System.Collections.Generic.IDictionary _additionalProperties;
[Newtonsoft.Json.JsonExtensionData]
public System.Collections.Generic.IDictionary AdditionalProperties
{
get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary()); }
set { _additionalProperties = value; }
}
}
///
/// Pickup Type container tag.
///
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.7.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")]
public partial class RateRequest_PickupType
{
///
/// Pickup Type Code. Valid values: 01 - Daily Pickup (Default - used when an invalid pickup type code is provided)03 - Customer Counter06 - One Time Pickup19 - Letter Center20 - Air Service CenterLength is not validated. When negotiated rates are requested, 07 (onCallAir) will be ignored.Refer to the Rate Types Table in the Appendix for rate type based on Pickup Type and Customer Classification Code.
///
[Newtonsoft.Json.JsonProperty("Code", Required = Newtonsoft.Json.Required.Always)]
[System.ComponentModel.DataAnnotations.Required]
[System.ComponentModel.DataAnnotations.StringLength(2, MinimumLength = 2)]
public string Code { get; set; }
///
/// Pickup Type Description. Ignored if provided in the Request.
///
[Newtonsoft.Json.JsonProperty("Description", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
[System.ComponentModel.DataAnnotations.StringLength(35, MinimumLength = 1)]
public string Description { get; set; }
private System.Collections.Generic.IDictionary _additionalProperties;
[Newtonsoft.Json.JsonExtensionData]
public System.Collections.Generic.IDictionary AdditionalProperties
{
get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary()); }
set { _additionalProperties = value; }
}
}
///
/// Customer classification container. Valid if ShipFrom country or territory is "US"
///
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.7.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")]
public partial class RateRequest_CustomerClassification
{
///
/// Customer classification code. Valid values:00 - Rates Associated with Shipper Number01 - Daily Rates04 - Retail Rates05 - Regional Rates06 - General List Rates53 - Standard List RatesLength is not validated.If customer classification code is not a valid value please refer to Rate Types Table on page 11.
///
[Newtonsoft.Json.JsonProperty("Code", Required = Newtonsoft.Json.Required.Always)]
[System.ComponentModel.DataAnnotations.Required]
[System.ComponentModel.DataAnnotations.StringLength(2, MinimumLength = 2)]
public string Code { get; set; }
///
/// Customer classification description of the code above. Ignored if provided in the Request. Length is not validated.
///
[Newtonsoft.Json.JsonProperty("Description", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
[System.ComponentModel.DataAnnotations.StringLength(35, MinimumLength = 1)]
public string Description { get; set; }
private System.Collections.Generic.IDictionary _additionalProperties;
[Newtonsoft.Json.JsonExtensionData]
public System.Collections.Generic.IDictionary AdditionalProperties
{
get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary()); }
set { _additionalProperties = value; }
}
}
///
/// Container for Shipment Information.
///
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.7.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")]
public partial class RateRequest_Shipment
{
///
/// The time that the request was made from the originating system. UTC time down to milliseconds. Example - 2016-07-14T12:01:33.999 Applicable only for HazMat request and with subversion greater than or equal to 1701.
///
[Newtonsoft.Json.JsonProperty("OriginRecordTransactionTimestamp", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public string OriginRecordTransactionTimestamp { get; set; }
[Newtonsoft.Json.JsonProperty("Shipper", Required = Newtonsoft.Json.Required.Always)]
[System.ComponentModel.DataAnnotations.Required]
public Shipment_Shipper Shipper { get; set; } = new Shipment_Shipper();
[Newtonsoft.Json.JsonProperty("ShipTo", Required = Newtonsoft.Json.Required.Always)]
[System.ComponentModel.DataAnnotations.Required]
public Shipment_ShipTo ShipTo { get; set; } = new Shipment_ShipTo();
[Newtonsoft.Json.JsonProperty("ShipFrom", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public Shipment_ShipFrom ShipFrom { get; set; }
[Newtonsoft.Json.JsonProperty("AlternateDeliveryAddress", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public Shipment_AlternateDeliveryAddress AlternateDeliveryAddress { get; set; }
[Newtonsoft.Json.JsonProperty("ShipmentIndicationType", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public System.Collections.Generic.ICollection ShipmentIndicationType { get; set; }
[Newtonsoft.Json.JsonProperty("PaymentDetails", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public Shipment_PaymentDetails PaymentDetails { get; set; }
[Newtonsoft.Json.JsonProperty("FRSPaymentInformation", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public Shipment_FRSPaymentInformation FRSPaymentInformation { get; set; }
[Newtonsoft.Json.JsonProperty("FreightShipmentInformation", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public Shipment_FreightShipmentInformation FreightShipmentInformation { get; set; }
///
/// Goods Not In Free Circulation indicator. This is an empty tag, any value inside is ignored. This indicator is invalid for a package type of UPS Letter and DocumentsOnly.
///
[Newtonsoft.Json.JsonProperty("GoodsNotInFreeCirculationIndicator", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public string GoodsNotInFreeCirculationIndicator { get; set; }
[Newtonsoft.Json.JsonProperty("Service", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public Shipment_Service Service { get; set; }
///
/// Total number of pieces in all pallets. Required for UPS Worldwide Express Freight and UPS Worldwide Express Freight Midday shipments.
///
[Newtonsoft.Json.JsonProperty("NumOfPieces", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public string NumOfPieces { get; set; }
[Newtonsoft.Json.JsonProperty("ShipmentTotalWeight", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public Shipment_ShipmentTotalWeight ShipmentTotalWeight { get; set; }
///
/// Valid values are Document and Non-document. If the indicator is present then the value is Document else Non-Document. Note: Not applicable for FRS rating requests. Empty Tag.
///
[Newtonsoft.Json.JsonProperty("DocumentsOnlyIndicator", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public string DocumentsOnlyIndicator { get; set; }
[Newtonsoft.Json.JsonProperty("Package", Required = Newtonsoft.Json.Required.Always)]
[System.ComponentModel.DataAnnotations.Required]
public System.Collections.Generic.ICollection Package { get; set; } = new System.Collections.ObjectModel.Collection();
[Newtonsoft.Json.JsonProperty("ShipmentServiceOptions", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public Shipment_ShipmentServiceOptions ShipmentServiceOptions { get; set; }
[Newtonsoft.Json.JsonProperty("ShipmentRatingOptions", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public Shipment_ShipmentRatingOptions ShipmentRatingOptions { get; set; }
[Newtonsoft.Json.JsonProperty("InvoiceLineTotal", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public Shipment_InvoiceLineTotal InvoiceLineTotal { get; set; }
///
/// Presence/Absence Indicator. Any value inside is ignored. RatingMethodRequestedIndicator is an indicator. If present, Billable Weight Calculation method and Rating Method information would be returned in response.
///
[Newtonsoft.Json.JsonProperty("RatingMethodRequestedIndicator", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public string RatingMethodRequestedIndicator { get; set; }
///
/// Presence/Absence Indicator. Any value inside is ignored. TaxInformationIndicator is an indicator. The Tax related information includes any type of Taxes, corresponding Monetary Values, Total Charges with Taxes and disclaimers (if applicable) would be returned in response. If present, any taxes that may be applicable to a shipment would be returned in response. If this indicator is requested with NegotiatedRatesIndicator, Tax related information, if applicable, would be returned only for Negotiated Rates and not for Published Rates.
///
[Newtonsoft.Json.JsonProperty("TaxInformationIndicator", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public string TaxInformationIndicator { get; set; }
[Newtonsoft.Json.JsonProperty("PromotionalDiscountInformation", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public Shipment_PromotionalDiscountInformation PromotionalDiscountInformation { get; set; }
[Newtonsoft.Json.JsonProperty("DeliveryTimeInformation", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public Shipment_DeliveryTimeInformation DeliveryTimeInformation { get; set; }
///
/// Presence/Absence Indicator. Any value inside is ignored. MasterCartonIndicator is an indicator and presence implies that shipment is Master Carton type. If present, the shipment will be rated as a Master Carton Type. If this indicator is requested with NegotiatedRatesIndicator, rates would be returned only for Negotiated Rates and not for Published Rates.
///
[Newtonsoft.Json.JsonProperty("MasterCartonIndicator", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public string MasterCartonIndicator { get; set; }
///
/// Presence/Absence Indicator. Any value inside is ignored. WWEShipmentIndicator is an indicator and presence implies that WWE service details requested for RequestOption=Shop or RequestOption=Shoptimeintransit RequestOption=Shop or RequestOption=Shoptimeintransit
///
[Newtonsoft.Json.JsonProperty("WWEShipmentIndicator", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public string WWEShipmentIndicator { get; set; }
private System.Collections.Generic.IDictionary _additionalProperties;
[Newtonsoft.Json.JsonExtensionData]
public System.Collections.Generic.IDictionary AdditionalProperties
{
get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary()); }
set { _additionalProperties = value; }
}
}
///
/// Shipper container. Information associated with the UPS account number.
///
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.7.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")]
public partial class Shipment_Shipper
{
///
/// Shipper's name or company name. Length is not validated.
///
[Newtonsoft.Json.JsonProperty("Name", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
[System.ComponentModel.DataAnnotations.StringLength(35, MinimumLength = 1)]
public string Name { get; set; }
///
/// Shipper's attention name. Length is not validated.
///
[Newtonsoft.Json.JsonProperty("AttentionName", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
[System.ComponentModel.DataAnnotations.StringLength(35, MinimumLength = 1)]
public string AttentionName { get; set; }
///
/// Shipper's UPS account number. A valid account number is required to receive negotiated rates. Optional otherwise. Cannot be present when requesting UserLevelDiscount.
///
[Newtonsoft.Json.JsonProperty("ShipperNumber", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
[System.ComponentModel.DataAnnotations.StringLength(6, MinimumLength = 6)]
public string ShipperNumber { get; set; }
[Newtonsoft.Json.JsonProperty("Address", Required = Newtonsoft.Json.Required.Always)]
[System.ComponentModel.DataAnnotations.Required]
public Shipper_Address Address { get; set; } = new Shipper_Address();
private System.Collections.Generic.IDictionary _additionalProperties;
[Newtonsoft.Json.JsonExtensionData]
public System.Collections.Generic.IDictionary AdditionalProperties
{
get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary()); }
set { _additionalProperties = value; }
}
}
///
/// Address Container. If the ShipFrom container is not present then this address will be used as the ShipFrom. If this address is used as the ShipFrom, the shipment will be rated from this origin address.
///
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.7.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")]
public partial class Shipper_Address
{
///
/// Shipper's street address including name and number (when applicable). Maximum Occurrence should be three. Length is not validated.
///
[Newtonsoft.Json.JsonProperty("AddressLine", Required = Newtonsoft.Json.Required.Always)]
[System.ComponentModel.DataAnnotations.Required]
public System.Collections.Generic.ICollection AddressLine { get; set; } = new System.Collections.ObjectModel.Collection();
///
/// Shipper's city. Required if country or territory does not utilize postal codes. Length is not validated.
///
[Newtonsoft.Json.JsonProperty("City", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
[System.ComponentModel.DataAnnotations.StringLength(30, MinimumLength = 1)]
public string City { get; set; }
///
/// Shipper's state code. Length is not validated.
///
[Newtonsoft.Json.JsonProperty("StateProvinceCode", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
[System.ComponentModel.DataAnnotations.StringLength(2, MinimumLength = 2)]
public string StateProvinceCode { get; set; }
///
/// Shipper's postal code. Length is not validated.
///
[Newtonsoft.Json.JsonProperty("PostalCode", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
[System.ComponentModel.DataAnnotations.StringLength(9, MinimumLength = 1)]
public string PostalCode { get; set; }
///
/// Country or Territory code. Refer to the Supported Country or Territory Tables located in Appendix.
///
[Newtonsoft.Json.JsonProperty("CountryCode", Required = Newtonsoft.Json.Required.Always)]
[System.ComponentModel.DataAnnotations.Required]
[System.ComponentModel.DataAnnotations.StringLength(2, MinimumLength = 2)]
public string CountryCode { get; set; }
private System.Collections.Generic.IDictionary _additionalProperties;
[Newtonsoft.Json.JsonExtensionData]
public System.Collections.Generic.IDictionary AdditionalProperties
{
get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary()); }
set { _additionalProperties = value; }
}
}
///
/// Ship To Container
///
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.7.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")]
public partial class Shipment_ShipTo
{
///
/// Destination attention name or company name. Length is not validated.
///
[Newtonsoft.Json.JsonProperty("Name", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
[System.ComponentModel.DataAnnotations.StringLength(35, MinimumLength = 1)]
public string Name { get; set; }
///
/// Destination attention name. Length is not validated.
///
[Newtonsoft.Json.JsonProperty("AttentionName", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
[System.ComponentModel.DataAnnotations.StringLength(35, MinimumLength = 1)]
public string AttentionName { get; set; }
[Newtonsoft.Json.JsonProperty("Address", Required = Newtonsoft.Json.Required.Always)]
[System.ComponentModel.DataAnnotations.Required]
public ShipTo_Address Address { get; set; } = new ShipTo_Address();
private System.Collections.Generic.IDictionary _additionalProperties;
[Newtonsoft.Json.JsonExtensionData]
public System.Collections.Generic.IDictionary AdditionalProperties
{
get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary()); }
set { _additionalProperties = value; }
}
}
///
/// Address Container.
///
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.7.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")]
public partial class ShipTo_Address
{
///
/// Destination street address including name and number (when applicable). Max Occurrence can be 3. Length is not validated.
///
[Newtonsoft.Json.JsonProperty("AddressLine", Required = Newtonsoft.Json.Required.Always)]
[System.ComponentModel.DataAnnotations.Required]
public System.Collections.Generic.ICollection AddressLine { get; set; } = new System.Collections.ObjectModel.Collection();
///
/// Destination city. Required if country or territory does not utilize postal codes. Length is not validated.
///
[Newtonsoft.Json.JsonProperty("City", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
[System.ComponentModel.DataAnnotations.StringLength(30, MinimumLength = 1)]
public string City { get; set; }
///
/// Destination state code.
///
[Newtonsoft.Json.JsonProperty("StateProvinceCode", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
[System.ComponentModel.DataAnnotations.StringLength(2, MinimumLength = 2)]
public string StateProvinceCode { get; set; }
///
/// Destination postal code. Required if country or territory utilizes postal codes (i.e. US and PR).
///
[Newtonsoft.Json.JsonProperty("PostalCode", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
[System.ComponentModel.DataAnnotations.StringLength(9, MinimumLength = 1)]
public string PostalCode { get; set; }
///
/// Destination country or territory code. Refer to the Supported Country or Territory Tables located in the Appendix.
///
[Newtonsoft.Json.JsonProperty("CountryCode", Required = Newtonsoft.Json.Required.Always)]
[System.ComponentModel.DataAnnotations.Required]
[System.ComponentModel.DataAnnotations.StringLength(2, MinimumLength = 2)]
public string CountryCode { get; set; }
///
/// Residential Address flag. This field is a flag to indicate if the destination is a residential location. True if ResidentialAddressIndicator tag exists; false otherwise. This element does not require a value and if one is entered it will be ignored.
///
///
Note: When requesting TimeInTransit information, this indicator must be passed to determine if Three Day Select or Ground shipment is eligible for Saturday Delivery at no charge. If this indicator is not present, address will be considered as commercial. Empty Tag.
///
///
[Newtonsoft.Json.JsonProperty("ResidentialAddressIndicator", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public string ResidentialAddressIndicator { get; set; }
private System.Collections.Generic.IDictionary _additionalProperties;
[Newtonsoft.Json.JsonExtensionData]
public System.Collections.Generic.IDictionary AdditionalProperties
{
get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary()); }
set { _additionalProperties = value; }
}
}
///
/// Ship From Container.
///
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.7.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")]
public partial class Shipment_ShipFrom
{
///
/// Origin attention name or company name. Length is not validated.
///
[Newtonsoft.Json.JsonProperty("Name", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
[System.ComponentModel.DataAnnotations.StringLength(35, MinimumLength = 1)]
public string Name { get; set; }
///
/// Origin attention name. Length is not validated.
///
[Newtonsoft.Json.JsonProperty("AttentionName", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
[System.ComponentModel.DataAnnotations.StringLength(35, MinimumLength = 1)]
public string AttentionName { get; set; }
[Newtonsoft.Json.JsonProperty("Address", Required = Newtonsoft.Json.Required.Always)]
[System.ComponentModel.DataAnnotations.Required]
public ShipFrom_Address Address { get; set; } = new ShipFrom_Address();
private System.Collections.Generic.IDictionary _additionalProperties;
[Newtonsoft.Json.JsonExtensionData]
public System.Collections.Generic.IDictionary AdditionalProperties
{
get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary()); }
set { _additionalProperties = value; }
}
}
///
/// Address container for Ship From. Address Container
///
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.7.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")]
public partial class ShipFrom_Address
{
///
/// The origin street address including name and number (when applicable). Length is not validated.
///
[Newtonsoft.Json.JsonProperty("AddressLine", Required = Newtonsoft.Json.Required.Always)]
[System.ComponentModel.DataAnnotations.Required]
public System.Collections.Generic.ICollection AddressLine { get; set; } = new System.Collections.ObjectModel.Collection();
///
/// Origin city. Required if country or territory does not utilize postal codes. Length is not validated.
///
[Newtonsoft.Json.JsonProperty("City", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
[System.ComponentModel.DataAnnotations.StringLength(30, MinimumLength = 1)]
public string City { get; set; }
///
/// Origin state code. A StateProvinceCode and valid account number are required when requesting negotiated rates. Otherwise the StateProvinceCode is optional.
///
///
If the TaxInformationIndicator flag is present in the request, a StateProvinceCode must be entered for tax charges to be accurately calculated in the response.
///
///
[Newtonsoft.Json.JsonProperty("StateProvinceCode", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
[System.ComponentModel.DataAnnotations.StringLength(2, MinimumLength = 2)]
public string StateProvinceCode { get; set; }
///
/// Origin postal code. Required if country or territory utilizes postal codes (e.g. US and PR).
///
[Newtonsoft.Json.JsonProperty("PostalCode", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
[System.ComponentModel.DataAnnotations.StringLength(9, MinimumLength = 1)]
public string PostalCode { get; set; }
///
/// Origin country or territory code. Refer to the Supported Country or Territory Tables located in the Appendix. Required, but defaults to US.
///
[Newtonsoft.Json.JsonProperty("CountryCode", Required = Newtonsoft.Json.Required.Always)]
[System.ComponentModel.DataAnnotations.Required]
[System.ComponentModel.DataAnnotations.StringLength(2, MinimumLength = 2)]
public string CountryCode { get; set; }
private System.Collections.Generic.IDictionary _additionalProperties;
[Newtonsoft.Json.JsonExtensionData]
public System.Collections.Generic.IDictionary AdditionalProperties
{
get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary()); }
set { _additionalProperties = value; }
}
}
///
/// Alternate Delivery Address container. Applies for deliveries to UPS Access Point™ locations.
///
///
Required for the following ShipmentIndicationType values:
///
- 01 - Hold for Pickup at UPS Access Point™
///
- 02 - UPS Access Point™ Delivery
///
///
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.7.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")]
public partial class Shipment_AlternateDeliveryAddress
{
///
/// UPS Access Point location name.
///
[Newtonsoft.Json.JsonProperty("Name", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public string Name { get; set; }
[Newtonsoft.Json.JsonProperty("Address", Required = Newtonsoft.Json.Required.Always)]
[System.ComponentModel.DataAnnotations.Required]
public AlternateDeliveryAddress_Address Address { get; set; } = new AlternateDeliveryAddress_Address();
private System.Collections.Generic.IDictionary _additionalProperties;
[Newtonsoft.Json.JsonExtensionData]
public System.Collections.Generic.IDictionary AdditionalProperties
{
get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary()); }
set { _additionalProperties = value; }
}
}
///
/// Address container for Alternate Delivery Address.
///
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.7.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")]
public partial class AlternateDeliveryAddress_Address
{
///
/// The UPS Access Point's street address, including name and number (when applicable). Length is not validated.
///
[Newtonsoft.Json.JsonProperty("AddressLine", Required = Newtonsoft.Json.Required.Always)]
[System.ComponentModel.DataAnnotations.Required]
public System.Collections.Generic.ICollection AddressLine { get; set; } = new System.Collections.ObjectModel.Collection();
///
/// UPS Access Point city.
///
[Newtonsoft.Json.JsonProperty("City", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
[System.ComponentModel.DataAnnotations.StringLength(30, MinimumLength = 1)]
public string City { get; set; }
///
/// UPS Access Point State or Province code.
///
[Newtonsoft.Json.JsonProperty("StateProvinceCode", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
[System.ComponentModel.DataAnnotations.StringLength(2, MinimumLength = 2)]
public string StateProvinceCode { get; set; }
///
/// UPS Access Point Postal code.
///
[Newtonsoft.Json.JsonProperty("PostalCode", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
[System.ComponentModel.DataAnnotations.StringLength(9, MinimumLength = 1)]
public string PostalCode { get; set; }
///
/// UPS Access Point country or territory code.
///
[Newtonsoft.Json.JsonProperty("CountryCode", Required = Newtonsoft.Json.Required.Always)]
[System.ComponentModel.DataAnnotations.Required]
[System.ComponentModel.DataAnnotations.StringLength(2, MinimumLength = 2)]
public string CountryCode { get; set; }
///
/// Presence/Absence Indicator. Any value inside is ignored.This field is a flag to indicate if the Alternate Delivery location is a residential location. True if ResidentialAddressIndicator tag exists. For future use.
///
[Newtonsoft.Json.JsonProperty("ResidentialAddressIndicator", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public string ResidentialAddressIndicator { get; set; }
///
/// Presence/Absence Indicator. Any value inside is ignored.
///
///
This field is a flag to indicate if the Alternate Delivery location is a PO box location.
///
///
True if POBoxIndicator tag exists; false otherwise. Not valid with Shipment Indication Types:
///
- 01 - Hold for Pickup at UPS Access Point
///
- 02 - UPS Access Point™ Delivery
///
///
[Newtonsoft.Json.JsonProperty("POBoxIndicator", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public string POBoxIndicator { get; set; }
private System.Collections.Generic.IDictionary _additionalProperties;
[Newtonsoft.Json.JsonExtensionData]
public System.Collections.Generic.IDictionary AdditionalProperties
{
get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary()); }
set { _additionalProperties = value; }
}
}
///
/// Container to hold shipment indication type.
///
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.7.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")]
public partial class Shipment_ShipmentIndicationType
{
///
/// Code for Shipment Indication Type.
///
///
Valid values:
///
- 01 - Hold for Pickup at UPS Access Point
///
- 02 - UPS Access Point™ Delivery
///
///
[Newtonsoft.Json.JsonProperty("Code", Required = Newtonsoft.Json.Required.Always)]
[System.ComponentModel.DataAnnotations.Required]
[System.ComponentModel.DataAnnotations.StringLength(2, MinimumLength = 2)]
public string Code { get; set; }
///
/// Description for Shipment Indication Type. Length is not Validated.
///
[Newtonsoft.Json.JsonProperty("Description", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
[System.ComponentModel.DataAnnotations.StringLength(50, MinimumLength = 1)]
public string Description { get; set; }
private System.Collections.Generic.IDictionary _additionalProperties;
[Newtonsoft.Json.JsonExtensionData]
public System.Collections.Generic.IDictionary AdditionalProperties
{
get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary()); }
set { _additionalProperties = value; }
}
}
///
/// Payment details container for detailed shipment charges. The two shipment charges that are available for specification are Transportation charges and Duties and Taxes. This container is used for Who Pays What functionality.
///
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.7.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")]
public partial class Shipment_PaymentDetails
{
[Newtonsoft.Json.JsonProperty("ShipmentCharge", Required = Newtonsoft.Json.Required.Always)]
[System.ComponentModel.DataAnnotations.Required]
public System.Collections.Generic.ICollection ShipmentCharge { get; set; } = new System.Collections.ObjectModel.Collection();
///
/// Split Duty VAT Indicator. The presence indicates the payer specified for Transportation Charges will pay transportation charges and any duties that apply to the shipment. The payer specified for Duties and Taxes will pay the VAT (Value-Added Tax) only. Empty Tag. The payment method for Transportation charges must be UPS account. The UPS account must be a daily pickup account or an occasional account.
///
[Newtonsoft.Json.JsonProperty("SplitDutyVATIndicator", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public string SplitDutyVATIndicator { get; set; }
private System.Collections.Generic.IDictionary _additionalProperties;
[Newtonsoft.Json.JsonExtensionData]
public System.Collections.Generic.IDictionary AdditionalProperties
{
get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary()); }
set { _additionalProperties = value; }
}
}
///
/// Shipment charge container. If Duty and Tax charges are applicable to a shipment and a payer is not specified, the default payer of Duty and Tax charges is Bill to Receiver. There will be no default payer of Duty and Tax charges for DDU and DDP service.
///
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.7.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")]
public partial class PaymentDetails_ShipmentCharge
{
///
/// Values are 01 = Transportation, 02 = Duties and Taxes
///
[Newtonsoft.Json.JsonProperty("Type", Required = Newtonsoft.Json.Required.Always)]
[System.ComponentModel.DataAnnotations.Required]
[System.ComponentModel.DataAnnotations.StringLength(2, MinimumLength = 2)]
public string Type { get; set; }
[Newtonsoft.Json.JsonProperty("BillShipper", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public ShipmentCharge_BillShipper BillShipper { get; set; }
[Newtonsoft.Json.JsonProperty("BillReceiver", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public ShipmentCharge_BillReceiver BillReceiver { get; set; }
[Newtonsoft.Json.JsonProperty("BillThirdParty", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public ShipmentCharge_BillThirdParty BillThirdParty { get; set; }
///
/// Consignee Billing payment option indicator. The presence indicates consignee billing option is selected. The absence indicates one of the other payment options is selected. Empty Tag. This element or its sibling element, BillShipper, BillReceiver or BillThirdParty, must be present but no more than one can be present. This billing option is valid for a shipment charge type of Transportation only. Only applies to US/PR and PR/US shipment origins and destination.
///
[Newtonsoft.Json.JsonProperty("ConsigneeBilledIndicator", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public string ConsigneeBilledIndicator { get; set; }
private System.Collections.Generic.IDictionary _additionalProperties;
[Newtonsoft.Json.JsonExtensionData]
public System.Collections.Generic.IDictionary AdditionalProperties
{
get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary()); }
set { _additionalProperties = value; }
}
}
///
/// Container for the BillShipper billing option. This element or its sibling element, BillReceiver, BillThirdParty or ConsigneeBilledIndicator, must be present but no more than one can be present.
///
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.7.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")]
public partial class ShipmentCharge_BillShipper
{
///
/// UPS account number Must be the same UPS account number as the one provided in Shipper/ShipperNumber.
///
[Newtonsoft.Json.JsonProperty("AccountNumber", Required = Newtonsoft.Json.Required.Always)]
[System.ComponentModel.DataAnnotations.Required]
[System.ComponentModel.DataAnnotations.StringLength(6, MinimumLength = 6)]
public string AccountNumber { get; set; }
private System.Collections.Generic.IDictionary _additionalProperties;
[Newtonsoft.Json.JsonExtensionData]
public System.Collections.Generic.IDictionary AdditionalProperties
{
get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary()); }
set { _additionalProperties = value; }
}
}
///
/// Container for the BillReceiver billing option. This element or its sibling element, BillShipper, BillThirdParty or Consignee Billed, must be present but no more than one can be present. For a return shipment, Bill Receiver is invalid for Transportation charges.
///
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.7.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")]
public partial class ShipmentCharge_BillReceiver
{
///
/// The UPS account number. The account must be a valid UPS account number that is active. For US, PR and CA accounts, the account must be a daily pickup account, an occasional account, a customer B.I.N account, or a dropper shipper account. All other accounts must be either a daily pickup account, an occasional account, a drop shipper account, or a non-shipping account.
///
[Newtonsoft.Json.JsonProperty("AccountNumber", Required = Newtonsoft.Json.Required.Always)]
[System.ComponentModel.DataAnnotations.Required]
[System.ComponentModel.DataAnnotations.StringLength(6, MinimumLength = 6)]
public string AccountNumber { get; set; }
[Newtonsoft.Json.JsonProperty("Address", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public BillReceiver_Address Address { get; set; }
private System.Collections.Generic.IDictionary _additionalProperties;
[Newtonsoft.Json.JsonExtensionData]
public System.Collections.Generic.IDictionary AdditionalProperties
{
get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary()); }
set { _additionalProperties = value; }
}
}
///
/// Container for additional information for the bill receiver's UPS accounts address.
///
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.7.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")]
public partial class BillReceiver_Address
{
///
/// The postal code for the UPS account's pickup address. The pickup postal code was entered in the UPS system when the account was set-up.
///
[Newtonsoft.Json.JsonProperty("PostalCode", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
[System.ComponentModel.DataAnnotations.StringLength(9, MinimumLength = 1)]
public string PostalCode { get; set; }
private System.Collections.Generic.IDictionary _additionalProperties;
[Newtonsoft.Json.JsonExtensionData]
public System.Collections.Generic.IDictionary AdditionalProperties
{
get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary()); }
set { _additionalProperties = value; }
}
}
///
/// Container for the third party billing option. This element or its sibling element, BillShipper, BillReceiver or Consignee Billed, must be present but no more than one can be present.
///
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.7.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")]
public partial class ShipmentCharge_BillThirdParty
{
///
/// The UPS account number of the third party shipper. The account must be a valid UPS account number that is active. For US, PR and CA accounts, the account must be either a daily pickup account, an occasional account, or a customer B.I.N account, or a drop shipper account. All other accounts must be either a daily pickup account, an occasional account, a drop shipper account, or a non-shipping account.
///
[Newtonsoft.Json.JsonProperty("AccountNumber", Required = Newtonsoft.Json.Required.Always)]
[System.ComponentModel.DataAnnotations.Required]
[System.ComponentModel.DataAnnotations.StringLength(6, MinimumLength = 6)]
public string AccountNumber { get; set; }
[Newtonsoft.Json.JsonProperty("Address", Required = Newtonsoft.Json.Required.Always)]
[System.ComponentModel.DataAnnotations.Required]
public BillThirdParty_Address Address { get; set; } = new BillThirdParty_Address();
private System.Collections.Generic.IDictionary _additionalProperties;
[Newtonsoft.Json.JsonExtensionData]
public System.Collections.Generic.IDictionary AdditionalProperties
{
get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary()); }
set { _additionalProperties = value; }
}
}
///
/// Container for additional information for the third party UPS accounts address.
///
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.7.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")]
public partial class BillThirdParty_Address
{
///
/// The origin street address including name and number (when applicable).
///
[Newtonsoft.Json.JsonProperty("AddressLine", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public System.Collections.Generic.ICollection AddressLine { get; set; }
///
/// Origin city.
///
[Newtonsoft.Json.JsonProperty("City", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
[System.ComponentModel.DataAnnotations.StringLength(30, MinimumLength = 1)]
public string City { get; set; }
///
/// Origin state code.
///
[Newtonsoft.Json.JsonProperty("StateProvinceCode", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
[System.ComponentModel.DataAnnotations.StringLength(2, MinimumLength = 2)]
public string StateProvinceCode { get; set; }
///
/// Origin postal code. The postal code must be the same as the UPS account pickup address postal code. Required for United States and Canadian UPS accounts and/or if the UPS account pickup address has a postal code. If the UPS account's pickup country or territory is US or Puerto Rico, the postal code is 5 or 9 digits. The character '-' may be used to separate the first five digits and the last four digits. If the UPS account's pickup country or territory is CA, the postal code is 6 alphanumeric characters whose format is A#A#A# where A is an uppercase letter and # is a digit.
///
[Newtonsoft.Json.JsonProperty("PostalCode", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
[System.ComponentModel.DataAnnotations.StringLength(9, MinimumLength = 1)]
public string PostalCode { get; set; }
///
/// Origin country or territory code. Refer to the Supported Country or Territory Tables located in the Appendix.
///
[Newtonsoft.Json.JsonProperty("CountryCode", Required = Newtonsoft.Json.Required.Always)]
[System.ComponentModel.DataAnnotations.Required]
[System.ComponentModel.DataAnnotations.StringLength(2, MinimumLength = 2)]
public string CountryCode { get; set; }
private System.Collections.Generic.IDictionary _additionalProperties;
[Newtonsoft.Json.JsonExtensionData]
public System.Collections.Generic.IDictionary AdditionalProperties
{
get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary()); }
set { _additionalProperties = value; }
}
}
///
/// UPS Ground Freight Pricing (GFP) Payment Information container. Required only for GFP and when the FRSIndicator is present.
///
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.7.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")]
public partial class Shipment_FRSPaymentInformation
{
[Newtonsoft.Json.JsonProperty("Type", Required = Newtonsoft.Json.Required.Always)]
[System.ComponentModel.DataAnnotations.Required]
public FRSPaymentInformation_Type Type { get; set; } = new FRSPaymentInformation_Type();
///
/// UPS Account Number.
///
[Newtonsoft.Json.JsonProperty("AccountNumber", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
[System.ComponentModel.DataAnnotations.StringLength(6, MinimumLength = 6)]
public string AccountNumber { get; set; }
[Newtonsoft.Json.JsonProperty("Address", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public FRSPaymentInformation_Address Address { get; set; }
private System.Collections.Generic.IDictionary _additionalProperties;
[Newtonsoft.Json.JsonExtensionData]
public System.Collections.Generic.IDictionary AdditionalProperties
{
get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary()); }
set { _additionalProperties = value; }
}
}
///
/// GFP Payment Information Type container. GFP only.
///
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.7.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")]
public partial class FRSPaymentInformation_Type
{
///
/// Payer Type code for FRS Rate request. Valid Values are: 01 = Prepaid 02 = FreightCollect 03 = BillThirdParty
///
[Newtonsoft.Json.JsonProperty("Code", Required = Newtonsoft.Json.Required.Always)]
[System.ComponentModel.DataAnnotations.Required]
[System.ComponentModel.DataAnnotations.StringLength(3, MinimumLength = 3)]
public string Code { get; set; }
///
/// Text description of the code representing the GFP payment type.
///
[Newtonsoft.Json.JsonProperty("Description", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
[System.ComponentModel.DataAnnotations.StringLength(35, MinimumLength = 1)]
public string Description { get; set; }
private System.Collections.Generic.IDictionary _additionalProperties;
[Newtonsoft.Json.JsonExtensionData]
public System.Collections.Generic.IDictionary AdditionalProperties
{
get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary()); }
set { _additionalProperties = value; }
}
}
///
/// Payer Address Container. Address container may be present for FRS Payment Information type = 02 and required when the FRS Payment Information type = 03.
///
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.7.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")]
public partial class FRSPaymentInformation_Address
{
///
/// Postal Code for UPS accounts billing address. Postal Code may be present when the FRS Payment Information type = 02 and type = 03.
///
[Newtonsoft.Json.JsonProperty("PostalCode", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
[System.ComponentModel.DataAnnotations.StringLength(9, MinimumLength = 1)]
public string PostalCode { get; set; }
///
/// Country or Territory code for the UPS accounts & billing address. Country or Territory Code is required when the FRS Payment Information type = 02 and type= 03.
///
[Newtonsoft.Json.JsonProperty("CountryCode", Required = Newtonsoft.Json.Required.Always)]
[System.ComponentModel.DataAnnotations.Required]
[System.ComponentModel.DataAnnotations.StringLength(2, MinimumLength = 2)]
public string CountryCode { get; set; }
private System.Collections.Generic.IDictionary _additionalProperties;
[Newtonsoft.Json.JsonExtensionData]
public System.Collections.Generic.IDictionary AdditionalProperties
{
get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary()); }
set { _additionalProperties = value; }
}
}
///
/// Container to hold Freight Shipment information.
///
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.7.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")]
public partial class Shipment_FreightShipmentInformation
{
[Newtonsoft.Json.JsonProperty("FreightDensityInfo", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public FreightShipmentInformation_FreightDensityInfo FreightDensityInfo { get; set; }
///
/// The presence of the tag indicates that the rate request is density based.For Density Based Rating (DBR), the customer must have DBR Contract Service.
///
[Newtonsoft.Json.JsonProperty("DensityEligibleIndicator", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public string DensityEligibleIndicator { get; set; }
private System.Collections.Generic.IDictionary _additionalProperties;
[Newtonsoft.Json.JsonExtensionData]
public System.Collections.Generic.IDictionary AdditionalProperties
{
get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary()); }
set { _additionalProperties = value; }
}
}
///
/// Freight Density Info container. Required if DensityEligibleIndicator is present.
///
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.7.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")]
public partial class FreightShipmentInformation_FreightDensityInfo
{
///
/// The presence of the AdjustedHeightIndicator allows UPS to do height reduction adjustment for density based rate request.
///
[Newtonsoft.Json.JsonProperty("AdjustedHeightIndicator", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public string AdjustedHeightIndicator { get; set; }
[Newtonsoft.Json.JsonProperty("AdjustedHeight", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public FreightDensityInfo_AdjustedHeight AdjustedHeight { get; set; }
[Newtonsoft.Json.JsonProperty("HandlingUnits", Required = Newtonsoft.Json.Required.Always)]
[System.ComponentModel.DataAnnotations.Required]
public System.Collections.Generic.ICollection HandlingUnits { get; set; } = new System.Collections.ObjectModel.Collection();
private System.Collections.Generic.IDictionary _additionalProperties;
[Newtonsoft.Json.JsonExtensionData]
public System.Collections.Generic.IDictionary AdditionalProperties
{
get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary()); }
set { _additionalProperties = value; }
}
}
///
/// Container to hold Adjusted Height information. Required if AdjustedHeightIndicator is present.
///
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.7.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")]
public partial class FreightDensityInfo_AdjustedHeight
{
///
/// Adjusted Height value for the handling unit.
///
[Newtonsoft.Json.JsonProperty("Value", Required = Newtonsoft.Json.Required.Always)]
[System.ComponentModel.DataAnnotations.Required]
[System.ComponentModel.DataAnnotations.StringLength(19, MinimumLength = 1)]
public string Value { get; set; }
[Newtonsoft.Json.JsonProperty("UnitOfMeasurement", Required = Newtonsoft.Json.Required.Always)]
[System.ComponentModel.DataAnnotations.Required]
public AdjustedHeight_UnitOfMeasurement UnitOfMeasurement { get; set; } = new AdjustedHeight_UnitOfMeasurement();
private System.Collections.Generic.IDictionary _additionalProperties;
[Newtonsoft.Json.JsonExtensionData]
public System.Collections.Generic.IDictionary AdditionalProperties
{
get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary()); }
set { _additionalProperties = value; }
}
}
///
/// Unit of Measurement container for the Adjusted height.
///
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.7.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")]
public partial class AdjustedHeight_UnitOfMeasurement
{
///
/// Code associated with Unit of Measurement for the Adjusted height. Valid value is IN Unit of measurement code for Adjusted height is validated only when Handling unit type is SKD = Skid or PLT = Pallet.
///
[Newtonsoft.Json.JsonProperty("Code", Required = Newtonsoft.Json.Required.Always)]
[System.ComponentModel.DataAnnotations.Required]
[System.ComponentModel.DataAnnotations.StringLength(2, MinimumLength = 1)]
public string Code { get; set; }
///
/// Description for Code associated with Unit of Measurement for the Adjusted height.
///
[Newtonsoft.Json.JsonProperty("Description", Required = Newtonsoft.Json.Required.Always)]
[System.ComponentModel.DataAnnotations.Required]
[System.ComponentModel.DataAnnotations.StringLength(35, MinimumLength = 1)]
public string Description { get; set; }
private System.Collections.Generic.IDictionary _additionalProperties;
[Newtonsoft.Json.JsonExtensionData]
public System.Collections.Generic.IDictionary AdditionalProperties
{
get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary()); }
set { _additionalProperties = value; }
}
}
///
/// Handling Unit for Density based rating container.
///
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.7.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")]
public partial class FreightDensityInfo_HandlingUnits
{
///
/// Handling Unit Quantity for Density based rating.
///
[Newtonsoft.Json.JsonProperty("Quantity", Required = Newtonsoft.Json.Required.Always)]
[System.ComponentModel.DataAnnotations.Required]
[System.ComponentModel.DataAnnotations.StringLength(8, MinimumLength = 8)]
public string Quantity { get; set; }
[Newtonsoft.Json.JsonProperty("Type", Required = Newtonsoft.Json.Required.Always)]
[System.ComponentModel.DataAnnotations.Required]
public HandlingUnits_Type Type { get; set; } = new HandlingUnits_Type();
[Newtonsoft.Json.JsonProperty("Dimensions", Required = Newtonsoft.Json.Required.Always)]
[System.ComponentModel.DataAnnotations.Required]
public HandlingUnits_Dimensions Dimensions { get; set; } = new HandlingUnits_Dimensions();
private System.Collections.Generic.IDictionary _additionalProperties;
[Newtonsoft.Json.JsonExtensionData]
public System.Collections.Generic.IDictionary AdditionalProperties
{
get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary()); }
set { _additionalProperties = value; }
}
}
///
/// Handling Unit Type for Density based rating.
///
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.7.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")]
public partial class HandlingUnits_Type
{
///
/// The code associated with Handling Unit Type. Valid values: SKD = Skid CBY = CarboyPLT = PalletTOT = TotesLOO = LooseOTH = Other
///
[Newtonsoft.Json.JsonProperty("Code", Required = Newtonsoft.Json.Required.Always)]
[System.ComponentModel.DataAnnotations.Required]
[System.ComponentModel.DataAnnotations.StringLength(3, MinimumLength = 3)]
public string Code { get; set; }
///
/// A description of the code for the Handling Unit type.
///
[Newtonsoft.Json.JsonProperty("Description", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
[System.ComponentModel.DataAnnotations.StringLength(35, MinimumLength = 1)]
public string Description { get; set; }
private System.Collections.Generic.IDictionary _additionalProperties;
[Newtonsoft.Json.JsonExtensionData]
public System.Collections.Generic.IDictionary AdditionalProperties
{
get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary()); }
set { _additionalProperties = value; }
}
}
///
/// Dimension of the HandlingUnit container for density based pricing.
///
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.7.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")]
public partial class HandlingUnits_Dimensions
{
[Newtonsoft.Json.JsonProperty("UnitOfMeasurement", Required = Newtonsoft.Json.Required.Always)]
[System.ComponentModel.DataAnnotations.Required]
public HandlingUnits_UnitOfMeasurement UnitOfMeasurement { get; set; } = new HandlingUnits_UnitOfMeasurement();
///
/// The length of the line item used to determine dimensional weight.
///
[Newtonsoft.Json.JsonProperty("Length", Required = Newtonsoft.Json.Required.Always)]
[System.ComponentModel.DataAnnotations.Required]
[System.ComponentModel.DataAnnotations.StringLength(19, MinimumLength = 1)]
public string Length { get; set; }
///
/// The width of the line item used to determine dimensional weight.
///
[Newtonsoft.Json.JsonProperty("Width", Required = Newtonsoft.Json.Required.Always)]
[System.ComponentModel.DataAnnotations.Required]
[System.ComponentModel.DataAnnotations.StringLength(19, MinimumLength = 1)]
public string Width { get; set; }
///
/// The height of the line item used to determine dimensional weight.
///
[Newtonsoft.Json.JsonProperty("Height", Required = Newtonsoft.Json.Required.Always)]
[System.ComponentModel.DataAnnotations.Required]
[System.ComponentModel.DataAnnotations.StringLength(19, MinimumLength = 1)]
public string Height { get; set; }
private System.Collections.Generic.IDictionary _additionalProperties;
[Newtonsoft.Json.JsonExtensionData]
public System.Collections.Generic.IDictionary AdditionalProperties
{
get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary()); }
set { _additionalProperties = value; }
}
}
///
/// UnitOfMeasurement container.
///
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.7.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")]
public partial class HandlingUnits_UnitOfMeasurement
{
///
/// Code for UnitOfMeasurement for the line item dimension. Valid value - IN = Inches
///
[Newtonsoft.Json.JsonProperty("Code", Required = Newtonsoft.Json.Required.Always)]
[System.ComponentModel.DataAnnotations.Required]
[System.ComponentModel.DataAnnotations.StringLength(2, MinimumLength = 1)]
public string Code { get; set; }
///
/// Description for UnitOfMeasurement for the line item dimension.
///
[Newtonsoft.Json.JsonProperty("Description", Required = Newtonsoft.Json.Required.Always)]
[System.ComponentModel.DataAnnotations.Required]
[System.ComponentModel.DataAnnotations.StringLength(35, MinimumLength = 1)]
public string Description { get; set; }
private System.Collections.Generic.IDictionary _additionalProperties;
[Newtonsoft.Json.JsonExtensionData]
public System.Collections.Generic.IDictionary AdditionalProperties
{
get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary()); }
set { _additionalProperties = value; }
}
}
///
/// UnitOfMeasurement container.
///
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.7.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")]
public partial class Dimensions_UnitOfMeasurement
{
///
/// Package dimensions unit of measurement code.
///
///
Valid values:
///
- IN
///
- CM
///
///
[Newtonsoft.Json.JsonProperty("Code", Required = Newtonsoft.Json.Required.Always)]
[System.ComponentModel.DataAnnotations.Required]
[System.ComponentModel.DataAnnotations.StringLength(2, MinimumLength = 1)]
public string Code { get; set; }
///
/// Text description of the code representing the UnitOfMeasurement associated with the package. This element is not validated.
///
[Newtonsoft.Json.JsonProperty("Description", Required = Newtonsoft.Json.Required.Always)]
[System.ComponentModel.DataAnnotations.Required]
[System.ComponentModel.DataAnnotations.StringLength(35, MinimumLength = 1)]
public string Description { get; set; }
private System.Collections.Generic.IDictionary _additionalProperties;
[Newtonsoft.Json.JsonExtensionData]
public System.Collections.Generic.IDictionary AdditionalProperties
{
get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary()); }
set { _additionalProperties = value; }
}
}
///
/// Service Container. Only valid with RequestOption = Rate for both Small package and GFP Rating requests.
///
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.7.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")]
public partial class Shipment_Service
{
///
/// The code for the UPS Service associated with the shipment.
///
///
NOTE: For a complete listing of values, refer to Service Codes in the Appendix
///
///
Valid domestic values:
///
- 01 = Next Day Air
///
- 02 = 2nd Day Air
///
- 03 = Ground
///
- 12 = 3 Day Select
///
- 13 = Next Day Air Saver
///
- 14 = UPS Next Day Air Early
///
- 59 = 2nd Day Air A.M.
///
- 75 = UPS Heavy Goods
///
///
Valid international values:
///
- 07 = Worldwide Express
///
- 08 = Worldwide Expedited
///
- 11= Standard
///
- 54 = Worldwide Express Plus
///
- 65 = Saver
///
- 96 = UPS Worldwide Express Freight
///
- 71 = UPS Worldwide Express Freight Midday
///
///
Required for Rating and ignored for Shopping.
///
///
[Newtonsoft.Json.JsonProperty("Code", Required = Newtonsoft.Json.Required.Always)]
[System.ComponentModel.DataAnnotations.Required]
[System.ComponentModel.DataAnnotations.StringLength(3, MinimumLength = 3)]
public string Code { get; set; }
///
/// A text description of the UPS Service associated with the shipment. Length is not validated.
///
[Newtonsoft.Json.JsonProperty("Description", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
[System.ComponentModel.DataAnnotations.StringLength(35, MinimumLength = 1)]
public string Description { get; set; }
private System.Collections.Generic.IDictionary _additionalProperties;
[Newtonsoft.Json.JsonExtensionData]
public System.Collections.Generic.IDictionary AdditionalProperties
{
get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary()); }
set { _additionalProperties = value; }
}
}
///
/// Shipment Total Weight Container. This container is only applicable for "ratetimeintransit" and "shoptimeintransit" request options. Required for all international shipments when retreiving time in transit information, including letters and documents shipments.
///
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.7.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")]
public partial class Shipment_ShipmentTotalWeight
{
[Newtonsoft.Json.JsonProperty("UnitOfMeasurement", Required = Newtonsoft.Json.Required.Always)]
[System.ComponentModel.DataAnnotations.Required]
public ShipmentTotalWeight_UnitOfMeasurement UnitOfMeasurement { get; set; } = new ShipmentTotalWeight_UnitOfMeasurement();
///
/// Non-zero total weight of all packages in the shipment.
///
[Newtonsoft.Json.JsonProperty("Weight", Required = Newtonsoft.Json.Required.Always)]
[System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)]
public string Weight { get; set; }
private System.Collections.Generic.IDictionary _additionalProperties;
[Newtonsoft.Json.JsonExtensionData]
public System.Collections.Generic.IDictionary AdditionalProperties
{
get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary()); }
set { _additionalProperties = value; }
}
}
///
/// UnitOfMeasurement Container.
///
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.7.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")]
public partial class ShipmentTotalWeight_UnitOfMeasurement
{
///
/// Code representing the unit of measure associated with the package weight.
///
///
Valid values:
///
- LBS = Pounds
///
- KGS = Kilograms.
///
///
[Newtonsoft.Json.JsonProperty("Code", Required = Newtonsoft.Json.Required.Always)]
[System.ComponentModel.DataAnnotations.Required]
[System.ComponentModel.DataAnnotations.StringLength(3, MinimumLength = 1)]
public string Code { get; set; }
///
/// Text description of the code representing the unit of measure associated with the shipment weight.
///
[Newtonsoft.Json.JsonProperty("Description", Required = Newtonsoft.Json.Required.Always)]
[System.ComponentModel.DataAnnotations.Required]
[System.ComponentModel.DataAnnotations.StringLength(35, MinimumLength = 1)]
public string Description { get; set; }
private System.Collections.Generic.IDictionary _additionalProperties;
[Newtonsoft.Json.JsonExtensionData]
public System.Collections.Generic.IDictionary AdditionalProperties
{
get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary()); }
set { _additionalProperties = value; }
}
}
///
/// Package Container. Only one Package allowed for Simple Rate
///
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.7.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")]
public partial class Shipment_Package
{
[Newtonsoft.Json.JsonProperty("PackagingType", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public Package_PackagingType PackagingType { get; set; }
[Newtonsoft.Json.JsonProperty("Dimensions", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public Package_Dimensions Dimensions { get; set; }
[Newtonsoft.Json.JsonProperty("DimWeight", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public Package_DimWeight DimWeight { get; set; }
[Newtonsoft.Json.JsonProperty("PackageWeight", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public Package_PackageWeight PackageWeight { get; set; }
[Newtonsoft.Json.JsonProperty("Commodity", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public Package_Commodity Commodity { get; set; }
///
/// This element does not require a value and if one is entered it will be ignored. If present, it indicates the shipment will be categorized as a Large Package.
///
[Newtonsoft.Json.JsonProperty("LargePackageIndicator", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public string LargePackageIndicator { get; set; }
[Newtonsoft.Json.JsonProperty("PackageServiceOptions", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public Package_PackageServiceOptions PackageServiceOptions { get; set; }
///
/// A flag indicating if the packages require additional handling. True if AdditionalHandlingIndicator tag exists; false otherwise. Additional Handling indicator indicates it's a non-corrugated package. Empty Tag.
///
[Newtonsoft.Json.JsonProperty("AdditionalHandlingIndicator", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public string AdditionalHandlingIndicator { get; set; }
[Newtonsoft.Json.JsonProperty("SimpleRate", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public Package_SimpleRate SimpleRate { get; set; }
[Newtonsoft.Json.JsonProperty("UPSPremier", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public Package_UPSPremier UPSPremier { get; set; }
///
/// Presence/Absence Indicator. Any value inside is ignored. It indicates if packge is oversized. Applicable for UPS Worldwide Economy DDU service
///
[Newtonsoft.Json.JsonProperty("OversizeIndicator", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public string OversizeIndicator { get; set; }
///
/// Presence/Absence Indicator. Any value inside is ignored. It indicates if packge is qualified for minimum billable weight. Applicable for UPS Worldwide Economy DDU service
///
[Newtonsoft.Json.JsonProperty("MinimumBillableWeightIndicator", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public string MinimumBillableWeightIndicator { get; set; }
private System.Collections.Generic.IDictionary _additionalProperties;
[Newtonsoft.Json.JsonExtensionData]
public System.Collections.Generic.IDictionary AdditionalProperties
{
get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary()); }
set { _additionalProperties = value; }
}
}
///
/// Packaging Type Container.
///
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.7.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")]
public partial class Package_PackagingType
{
///
/// The code for the UPS packaging type associated with the package. Valid values:
///
- 00 - UNKNOWN
///
- 01 - UPS Letter
///
- 02 - Package
///
- 03 - Tube
///
- 04 - Pak
///
- 21 - Express Box
///
- 24 - 25KG Box
///
- 25 - 10KG Box
///
- 30 - Pallet
///
- 2a - Small Express Box
///
- 2b - Medium Express Box
///
- 2c - Large Express Box.
///
///
For FRS rating requests the only valid value is customer supplied packaging “02”.
///
///
[Newtonsoft.Json.JsonProperty("Code", Required = Newtonsoft.Json.Required.Always)]
[System.ComponentModel.DataAnnotations.Required]
[System.ComponentModel.DataAnnotations.StringLength(2, MinimumLength = 2)]
public string Code { get; set; }
///
/// A text description of the code for the UPS packaging type associated with the shipment. Length is not validated.
///
[Newtonsoft.Json.JsonProperty("Description", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
[System.ComponentModel.DataAnnotations.StringLength(35, MinimumLength = 1)]
public string Description { get; set; }
private System.Collections.Generic.IDictionary _additionalProperties;
[Newtonsoft.Json.JsonExtensionData]
public System.Collections.Generic.IDictionary AdditionalProperties
{
get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary()); }
set { _additionalProperties = value; }
}
}
///
/// Dimensions Container. This container is not applicable for GFP Rating request. Required for Heavy Goods service. Package Dimension will be ignored for Simple Rate
///
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.7.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")]
public partial class Package_Dimensions
{
[Newtonsoft.Json.JsonProperty("UnitOfMeasurement", Required = Newtonsoft.Json.Required.Always)]
[System.ComponentModel.DataAnnotations.Required]
public Dimensions_UnitOfMeasurement UnitOfMeasurement { get; set; } = new Dimensions_UnitOfMeasurement();
///
/// Length of the package used to determine dimensional weight. Required for GB to GB and Poland to Poland shipments.
///
///
6 digits in length with 2 digits of significance after the decimal point.
///
///
[Newtonsoft.Json.JsonProperty("Length", Required = Newtonsoft.Json.Required.Always)]
[System.ComponentModel.DataAnnotations.Required]
[System.ComponentModel.DataAnnotations.StringLength(9, MinimumLength = 1)]
public string Length { get; set; }
///
/// Width of the package used to determine dimensional weight. Required for GB to GB and Poland to Poland shipments.
///
///
6 digits in length with 2 digits of significance after the decimal point.
///
///
[Newtonsoft.Json.JsonProperty("Width", Required = Newtonsoft.Json.Required.Always)]
[System.ComponentModel.DataAnnotations.Required]
[System.ComponentModel.DataAnnotations.StringLength(9, MinimumLength = 1)]
public string Width { get; set; }
///
/// Height of the package used to determine dimensional weight. Required for GB to GB and Poland to Poland shipments.
///
///
6 digits in length with 2 digits of significance after the decimal point.
///
///
[Newtonsoft.Json.JsonProperty("Height", Required = Newtonsoft.Json.Required.Always)]
[System.ComponentModel.DataAnnotations.Required]
[System.ComponentModel.DataAnnotations.StringLength(9, MinimumLength = 1)]
public string Height { get; set; }
private System.Collections.Generic.IDictionary _additionalProperties;
[Newtonsoft.Json.JsonExtensionData]
public System.Collections.Generic.IDictionary AdditionalProperties
{
get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary()); }
set { _additionalProperties = value; }
}
}
///
/// Package Dimensional Weight container. Values in this container are ignored when package dimensions are provided. Please visit ups.com for instructions on calculating this value. Only used for non-US/CA/PR shipments.
///
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.7.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")]
public partial class Package_DimWeight
{
[Newtonsoft.Json.JsonProperty("UnitOfMeasurement", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public DimWeight_UnitOfMeasurement UnitOfMeasurement { get; set; }
///
/// Dimensional weight of the package. Decimal values are not accepted, however there is one implied decimal place for values in this field (i.e. 115 = 11.5).
///
[Newtonsoft.Json.JsonProperty("Weight", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
[System.ComponentModel.DataAnnotations.StringLength(6, MinimumLength = 6)]
public string Weight { get; set; }
private System.Collections.Generic.IDictionary _additionalProperties;
[Newtonsoft.Json.JsonExtensionData]
public System.Collections.Generic.IDictionary AdditionalProperties
{
get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary()); }
set { _additionalProperties = value; }
}
}
///
/// UnitOfMeasurement Container.
///
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.7.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")]
public partial class DimWeight_UnitOfMeasurement
{
///
/// Code representing the unit of measure associated with the package weight.
///
///
Valid values:
///
- LBS - Pounds
///
- KGS - Kilograms.
///
///
[Newtonsoft.Json.JsonProperty("Code", Required = Newtonsoft.Json.Required.Always)]
[System.ComponentModel.DataAnnotations.Required]
[System.ComponentModel.DataAnnotations.StringLength(3, MinimumLength = 1)]
public string Code { get; set; }
///
/// Text description of the code representing the unit of measure associated with the package weight. Length and value are not validated.
///
[Newtonsoft.Json.JsonProperty("Description", Required = Newtonsoft.Json.Required.Always)]
[System.ComponentModel.DataAnnotations.Required]
[System.ComponentModel.DataAnnotations.StringLength(35, MinimumLength = 1)]
public string Description { get; set; }
private System.Collections.Generic.IDictionary _additionalProperties;
[Newtonsoft.Json.JsonExtensionData]
public System.Collections.Generic.IDictionary AdditionalProperties
{
get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary()); }
set { _additionalProperties = value; }
}
}
///
/// Package Weight Container. Required for an GFP Rating request. Otherwise optional. Required for Heavy Goods service. Package Weight will be ignored for Simple Rate
///
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.7.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")]
public partial class Package_PackageWeight
{
[Newtonsoft.Json.JsonProperty("UnitOfMeasurement", Required = Newtonsoft.Json.Required.Always)]
[System.ComponentModel.DataAnnotations.Required]
public PackageWeight_UnitOfMeasurement UnitOfMeasurement { get; set; } = new PackageWeight_UnitOfMeasurement();
///
/// Actual package weight. Weight accepted for letters/envelopes.
///
[Newtonsoft.Json.JsonProperty("Weight", Required = Newtonsoft.Json.Required.Always)]
[System.ComponentModel.DataAnnotations.Required]
[System.ComponentModel.DataAnnotations.StringLength(6, MinimumLength = 6)]
public string Weight { get; set; }
private System.Collections.Generic.IDictionary _additionalProperties;
[Newtonsoft.Json.JsonExtensionData]
public System.Collections.Generic.IDictionary AdditionalProperties
{
get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary()); }
set { _additionalProperties = value; }
}
}
///
/// UnitOfMeasurement Container.
///
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.7.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")]
public partial class PackageWeight_UnitOfMeasurement
{
///
/// Code representing the unit of measure associated with the package weight.
///
///
Unit of Measurement "OZS" is the only valid UOM for Worldwide Economy DDU Shipments.
///
///
Valid values:
///
- LBS - Pounds (default)
///
- KGS - Kilograms
///
- OZS - Ounces
///
///
[Newtonsoft.Json.JsonProperty("Code", Required = Newtonsoft.Json.Required.Always)]
[System.ComponentModel.DataAnnotations.Required]
[System.ComponentModel.DataAnnotations.StringLength(3, MinimumLength = 1)]
public string Code { get; set; }
///
/// Text description of the code representing the unit of measure associated with the package weight. Length and value are not validated.
///
[Newtonsoft.Json.JsonProperty("Description", Required = Newtonsoft.Json.Required.Always)]
[System.ComponentModel.DataAnnotations.Required]
[System.ComponentModel.DataAnnotations.StringLength(35, MinimumLength = 1)]
public string Description { get; set; }
private System.Collections.Generic.IDictionary _additionalProperties;
[Newtonsoft.Json.JsonExtensionData]
public System.Collections.Generic.IDictionary AdditionalProperties
{
get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary()); }
set { _additionalProperties = value; }
}
}
///
/// Commodity Container. Required only for GFP rating when FRSShipmentIndicator is requested.
///
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.7.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")]
public partial class Package_Commodity
{
///
/// Freight Classification. Freight class partially determines the freight rate for the article. See Appendix of the Rating Ground Freight Web Services Developers Guide for list of Freight classes. For GFP Only.
///
[Newtonsoft.Json.JsonProperty("FreightClass", Required = Newtonsoft.Json.Required.Always)]
[System.ComponentModel.DataAnnotations.Required]
[System.ComponentModel.DataAnnotations.StringLength(10, MinimumLength = 10)]
public string FreightClass { get; set; }
[Newtonsoft.Json.JsonProperty("NMFC", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public Commodity_NMFC NMFC { get; set; }
private System.Collections.Generic.IDictionary _additionalProperties;
[Newtonsoft.Json.JsonExtensionData]
public System.Collections.Generic.IDictionary AdditionalProperties
{
get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary()); }
set { _additionalProperties = value; }
}
}
///
/// NMFC Commodity container. For GFP Only.
///
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.7.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")]
public partial class Commodity_NMFC
{
///
/// Value of NMFC Prime. Contact your service representative if you need information concerning NMFC Codes. Required if NMFC Container is present. For GFP Only.
///
[Newtonsoft.Json.JsonProperty("PrimeCode", Required = Newtonsoft.Json.Required.Always)]
[System.ComponentModel.DataAnnotations.Required]
[System.ComponentModel.DataAnnotations.StringLength(6, MinimumLength = 4)]
public string PrimeCode { get; set; }
///
/// Value of NMFC Sub. Contact your service representative if you need information concerning NMFC Codes. Needs to be provided when the SubCode associated with the PrimeCode is other than 00. API defaults the sub value to 00 if not provided. If provided the Sub Code should be associated with the PrimeCode of the NMFC.
///
[Newtonsoft.Json.JsonProperty("SubCode", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
[System.ComponentModel.DataAnnotations.StringLength(2, MinimumLength = 2)]
public string SubCode { get; set; }
private System.Collections.Generic.IDictionary _additionalProperties;
[Newtonsoft.Json.JsonExtensionData]
public System.Collections.Generic.IDictionary AdditionalProperties
{
get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary()); }
set { _additionalProperties = value; }
}
}
///
/// PackageServiceOptions container.
///
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.7.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")]
public partial class Package_PackageServiceOptions
{
[Newtonsoft.Json.JsonProperty("DeliveryConfirmation", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public PackageServiceOptions_DeliveryConfirmation DeliveryConfirmation { get; set; }
[Newtonsoft.Json.JsonProperty("AccessPointCOD", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public PackageServiceOptions_AccessPointCOD AccessPointCOD { get; set; }
[Newtonsoft.Json.JsonProperty("COD", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public PackageServiceOptions_COD COD { get; set; }
[Newtonsoft.Json.JsonProperty("DeclaredValue", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public PackageServiceOptions_DeclaredValue DeclaredValue { get; set; }
[Newtonsoft.Json.JsonProperty("ShipperDeclaredValue", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public PackageServiceOptions_ShipperDeclaredValue ShipperDeclaredValue { get; set; }
///
/// The presence indicates that the package may be released by driver without a signature from the consignee. Empty Tag. Only available for US50/PR to US50/PR packages without return service.
///
[Newtonsoft.Json.JsonProperty("ShipperReleaseIndicator", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public string ShipperReleaseIndicator { get; set; }
///
/// Any value associated with this element will be ignored. If present, the package is rated for UPS Proactive Response and proactive package tracking.Contractual accessorial for health care companies to allow package monitoring throughout the UPS system. Shippers account needs to have valid contract for UPS Proactive Response.
///
[Newtonsoft.Json.JsonProperty("ProactiveIndicator", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public string ProactiveIndicator { get; set; }
///
/// Presence/Absence Indicator. Any value is ignored. If present, indicates that the package contains an item that needs refrigeration. Shippers account needs to have a valid contract for Refrigeration.
///
[Newtonsoft.Json.JsonProperty("RefrigerationIndicator", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public string RefrigerationIndicator { get; set; }
[Newtonsoft.Json.JsonProperty("Insurance", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public PackageServiceOptions_Insurance Insurance { get; set; }
///
/// The UPSPremiumCareIndicator indicates special handling is required for shipment having controlled substances. Empty Tag means indicator is present.
///
///
Valid only for Canada to Canada movements.
///
///
Available for the following Return Services:
///
- Returns Exchange (available with a contract)
///
- Print Return Label
///
- Print and Mail
///
- Electronic Return Label
///
- Return Service Three Attempt
///
///
May be requested with following UPS services:
///
- UPS Express® Early
///
- UPS Express
///
- UPS Express Saver
///
- UPS Standard.
///
///
Not available for packages with the following:
///
- Delivery Confirmation - Signature Required
///
- Delivery Confirmation - Adult Signature Required.
///
///
[Newtonsoft.Json.JsonProperty("UPSPremiumCareIndicator", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public string UPSPremiumCareIndicator { get; set; }
[Newtonsoft.Json.JsonProperty("HazMat", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public PackageServiceOptions_HazMat HazMat { get; set; }
[Newtonsoft.Json.JsonProperty("DryIce", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public PackageServiceOptions_DryIce DryIce { get; set; }
private System.Collections.Generic.IDictionary _additionalProperties;
[Newtonsoft.Json.JsonExtensionData]
public System.Collections.Generic.IDictionary AdditionalProperties
{
get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary()); }
set { _additionalProperties = value; }
}
}
///
/// Delivery Confirmation Container. For a list of valid origin/destination countries or territories please refer to appendix. DeliveryConfirmation and COD are mutually exclusive.
///
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.7.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")]
public partial class PackageServiceOptions_DeliveryConfirmation
{
///
/// Type of delivery confirmation. Valid values: 1 - Unsupported 2 - Delivery Confirmation Signature Required 3 - Delivery Confirmation Adult Signature Required
///
[Newtonsoft.Json.JsonProperty("DCISType", Required = Newtonsoft.Json.Required.Always)]
[System.ComponentModel.DataAnnotations.Required]
[System.ComponentModel.DataAnnotations.StringLength(1, MinimumLength = 1)]
public string DCISType { get; set; }
private System.Collections.Generic.IDictionary _additionalProperties;
[Newtonsoft.Json.JsonExtensionData]
public System.Collections.Generic.IDictionary AdditionalProperties
{
get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary()); }
set { _additionalProperties = value; }
}
}
///
/// Access Point COD indicates Package COD is requested for a shipment. Valid only for : 01 - Hold For Pickup At UPS Access Point, Shipment Indication type. Package Access Point COD is valid only for shipment without return service from US/PR to US/PR and CA to CA. Not valid with (Package) COD.
///
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.7.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")]
public partial class PackageServiceOptions_AccessPointCOD
{
///
/// Access Point COD Currency Code. Required if Access Point COD container is present. UPS does not support all international currency codes. Refer to the appendix for a list of valid codes.
///
[Newtonsoft.Json.JsonProperty("CurrencyCode", Required = Newtonsoft.Json.Required.Always)]
[System.ComponentModel.DataAnnotations.Required]
[System.ComponentModel.DataAnnotations.StringLength(3, MinimumLength = 3)]
public string CurrencyCode { get; set; }
///
/// Access Point COD Monetary Value. Required if Access Point COD container is present.
///
///
8 digits prior to the decimal place and 2 after.
///
///
[Newtonsoft.Json.JsonProperty("MonetaryValue", Required = Newtonsoft.Json.Required.Always)]
[System.ComponentModel.DataAnnotations.Required]
[System.ComponentModel.DataAnnotations.StringLength(11, MinimumLength = 2)]
public string MonetaryValue { get; set; }
private System.Collections.Generic.IDictionary _additionalProperties;
[Newtonsoft.Json.JsonExtensionData]
public System.Collections.Generic.IDictionary AdditionalProperties
{
get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary()); }
set { _additionalProperties = value; }
}
}
///
/// COD Container. Indicates COD is requested. Valid for the following country or territory combinations: US/PR to US/PRCA to CACA to USNot allowed for CA to US for packages that are designated as Letters or Envelopes.
///
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.7.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")]
public partial class PackageServiceOptions_COD
{
///
/// Indicates the type of funds that will be used for the C.O.D. payment. For valid values, refer to Rating and Shipping COD Supported Countries or Territories in the Appendix.
///
[Newtonsoft.Json.JsonProperty("CODFundsCode", Required = Newtonsoft.Json.Required.Always)]
[System.ComponentModel.DataAnnotations.Required]
[System.ComponentModel.DataAnnotations.StringLength(1, MinimumLength = 1)]
public string CODFundsCode { get; set; }
[Newtonsoft.Json.JsonProperty("CODAmount", Required = Newtonsoft.Json.Required.Always)]
[System.ComponentModel.DataAnnotations.Required]
public COD_CODAmount CODAmount { get; set; } = new COD_CODAmount();
private System.Collections.Generic.IDictionary _additionalProperties;
[Newtonsoft.Json.JsonExtensionData]
public System.Collections.Generic.IDictionary AdditionalProperties
{
get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary()); }
set { _additionalProperties = value; }
}
}
///
/// CODAmount Container.
///
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.7.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")]
public partial class COD_CODAmount
{
///
/// Currency Code. Required if a value for the COD amount exists in the MonetaryValue tag. Must match one of the IATA currency codes. UPS does not support all international currency codes. Refer to Currency Codes in the Appendix for a list of valid codes.
///
[Newtonsoft.Json.JsonProperty("CurrencyCode", Required = Newtonsoft.Json.Required.Always)]
[System.ComponentModel.DataAnnotations.Required]
[System.ComponentModel.DataAnnotations.StringLength(3, MinimumLength = 3)]
public string CurrencyCode { get; set; }
///
/// The COD value for the package. Required if COD option is present. The maximum amount allowed is 50,000 USD.
///
[Newtonsoft.Json.JsonProperty("MonetaryValue", Required = Newtonsoft.Json.Required.Always)]
[System.ComponentModel.DataAnnotations.Required]
[System.ComponentModel.DataAnnotations.StringLength(8, MinimumLength = 8)]
public string MonetaryValue { get; set; }
private System.Collections.Generic.IDictionary _additionalProperties;
[Newtonsoft.Json.JsonExtensionData]
public System.Collections.Generic.IDictionary AdditionalProperties
{
get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary()); }
set { _additionalProperties = value; }
}
}
///
/// Declared Value Container.
///
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.7.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")]
public partial class PackageServiceOptions_DeclaredValue
{
///
/// The IATA currency code associated with the declared value amount for the package. Required if a value for the package declared value amount exists in the MonetaryValue tag. Must match one of the IATA currency codes. Length is not validated. UPS does not support all international currency codes. Refer to Currency Codes in the Appendix for a list of valid codes.
///
[Newtonsoft.Json.JsonProperty("CurrencyCode", Required = Newtonsoft.Json.Required.Always)]
[System.ComponentModel.DataAnnotations.Required]
[System.ComponentModel.DataAnnotations.StringLength(3, MinimumLength = 3)]
public string CurrencyCode { get; set; }
///
/// The monetary value for the declared value amount associated with the package. Max value of 5,000 USD for Local and 50,000 USD for Remote. Absolute maximum value is 21474836.47
///
[Newtonsoft.Json.JsonProperty("MonetaryValue", Required = Newtonsoft.Json.Required.Always)]
[System.ComponentModel.DataAnnotations.Required]
[System.ComponentModel.DataAnnotations.StringLength(8, MinimumLength = 8)]
public string MonetaryValue { get; set; }
private System.Collections.Generic.IDictionary _additionalProperties;
[Newtonsoft.Json.JsonExtensionData]
public System.Collections.Generic.IDictionary AdditionalProperties
{
get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary()); }
set { _additionalProperties = value; }
}
}
///
/// Shipper Paid Declared Value Charge at Package level. Valid for UPS World Wide Express Freight shipments.
///
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.7.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")]
public partial class PackageServiceOptions_ShipperDeclaredValue
{
///
/// The IATA currency code associated with the amount for the package. UPS does not support all international currency codes. Refer to the appendix for a list of valid codes.
///
[Newtonsoft.Json.JsonProperty("CurrencyCode", Required = Newtonsoft.Json.Required.Always)]
[System.ComponentModel.DataAnnotations.Required]
[System.ComponentModel.DataAnnotations.StringLength(3, MinimumLength = 3)]
public string CurrencyCode { get; set; }
///
/// The monetary value for the amount associated with the package.
///
[Newtonsoft.Json.JsonProperty("MonetaryValue", Required = Newtonsoft.Json.Required.Always)]
[System.ComponentModel.DataAnnotations.Required]
[System.ComponentModel.DataAnnotations.StringLength(19, MinimumLength = 1)]
public string MonetaryValue { get; set; }
private System.Collections.Generic.IDictionary _additionalProperties;
[Newtonsoft.Json.JsonExtensionData]
public System.Collections.Generic.IDictionary AdditionalProperties
{
get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary()); }
set { _additionalProperties = value; }
}
}
///
/// Insurance Accesorial. Only one type of insurance can exist at a time on the shipment. Valid for UPS World Wide Express Freight shipments.
///
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.7.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")]
public partial class PackageServiceOptions_Insurance
{
[Newtonsoft.Json.JsonProperty("BasicFlexibleParcelIndicator", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public Insurance_BasicFlexibleParcelIndicator BasicFlexibleParcelIndicator { get; set; }
[Newtonsoft.Json.JsonProperty("ExtendedFlexibleParcelIndicator", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public Insurance_ExtendedFlexibleParcelIndicator ExtendedFlexibleParcelIndicator { get; set; }
[Newtonsoft.Json.JsonProperty("TimeInTransitFlexibleParcelIndicator", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public Insurance_TimeInTransitFlexibleParcelIndicator TimeInTransitFlexibleParcelIndicator { get; set; }
private System.Collections.Generic.IDictionary _additionalProperties;
[Newtonsoft.Json.JsonExtensionData]
public System.Collections.Generic.IDictionary AdditionalProperties
{
get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary()); }
set { _additionalProperties = value; }
}
}
///
/// Container to hold Basic Flexible Parcel Indicator information. Valid for UPS World Wide Express Freight shipments.
///
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.7.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")]
public partial class Insurance_BasicFlexibleParcelIndicator
{
///
/// The IATA currency code associated with the amount for the package. UPS does not support all international currency codes. Refer to the appendix for a list of valid codes. Valid for UPS World Wide Express Freight shipments.
///
[Newtonsoft.Json.JsonProperty("CurrencyCode", Required = Newtonsoft.Json.Required.Always)]
[System.ComponentModel.DataAnnotations.Required]
[System.ComponentModel.DataAnnotations.StringLength(3, MinimumLength = 3)]
public string CurrencyCode { get; set; }
///
/// The monetary value associated with the package. Valid for UPS World Wide Express Freight shipments.
///
[Newtonsoft.Json.JsonProperty("MonetaryValue", Required = Newtonsoft.Json.Required.Always)]
[System.ComponentModel.DataAnnotations.Required]
[System.ComponentModel.DataAnnotations.StringLength(8, MinimumLength = 8)]
public string MonetaryValue { get; set; }
private System.Collections.Generic.IDictionary _additionalProperties;
[Newtonsoft.Json.JsonExtensionData]
public System.Collections.Generic.IDictionary AdditionalProperties
{
get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary()); }
set { _additionalProperties = value; }
}
}
///
/// Container for Extended Flexible Parcel Indicator Valid for UPS World Wide Express Freight shipments.
///
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.7.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")]
public partial class Insurance_ExtendedFlexibleParcelIndicator
{
///
/// The IATA currency code associated with the amount for the package. UPS does not support all international currency codes. Refer to the appendix for a list of valid codes. Valid for UPS World Wide Express Freight shipments.
///
[Newtonsoft.Json.JsonProperty("CurrencyCode", Required = Newtonsoft.Json.Required.Always)]
[System.ComponentModel.DataAnnotations.Required]
[System.ComponentModel.DataAnnotations.StringLength(3, MinimumLength = 3)]
public string CurrencyCode { get; set; }
///
/// The monetary value associated with the package. Valid for UPS World Wide Express Freight shipments.
///
[Newtonsoft.Json.JsonProperty("MonetaryValue", Required = Newtonsoft.Json.Required.Always)]
[System.ComponentModel.DataAnnotations.Required]
[System.ComponentModel.DataAnnotations.StringLength(8, MinimumLength = 8)]
public string MonetaryValue { get; set; }
private System.Collections.Generic.IDictionary _additionalProperties;
[Newtonsoft.Json.JsonExtensionData]
public System.Collections.Generic.IDictionary AdditionalProperties
{
get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary()); }
set { _additionalProperties = value; }
}
}
///
/// Container to hold Time In Transit Flexible Parcel Indicator information. Valid for UPS World Wide Express Freight shipments.
///
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.7.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")]
public partial class Insurance_TimeInTransitFlexibleParcelIndicator
{
///
/// The IATA currency code associated with the amount for the package. UPS does not support all international currency codes. Refer to the appendix for a list of valid codes. Valid for UPS World Wide Express Freight shipments.
///
[Newtonsoft.Json.JsonProperty("CurrencyCode", Required = Newtonsoft.Json.Required.Always)]
[System.ComponentModel.DataAnnotations.Required]
[System.ComponentModel.DataAnnotations.StringLength(3, MinimumLength = 3)]
public string CurrencyCode { get; set; }
///
/// The monetary value associated with the package. Valid for UPS World Wide Express Freight shipments.
///
[Newtonsoft.Json.JsonProperty("MonetaryValue", Required = Newtonsoft.Json.Required.Always)]
[System.ComponentModel.DataAnnotations.Required]
[System.ComponentModel.DataAnnotations.StringLength(8, MinimumLength = 8)]
public string MonetaryValue { get; set; }
private System.Collections.Generic.IDictionary _additionalProperties;
[Newtonsoft.Json.JsonExtensionData]
public System.Collections.Generic.IDictionary AdditionalProperties
{
get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary()); }
set { _additionalProperties = value; }
}
}
///
/// Container to hold HazMat information. Applies only if SubVersion is greater than or equal to 1701.
///
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.7.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")]
public partial class PackageServiceOptions_HazMat
{
///
/// Identifies the package containing Dangerous Goods. Required if SubVersion is greater than or equal to 1701.
///
[Newtonsoft.Json.JsonProperty("PackageIdentifier", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
[System.ComponentModel.DataAnnotations.StringLength(5, MinimumLength = 1)]
public string PackageIdentifier { get; set; }
///
/// QValue is required when a HazMat shipment specifies AllPackedInOneIndicator and the regulation set for that shipment is IATA. Applies only if SubVersion is greater than or equal to 1701. Valid values are : 0.1; 0.2; 0.3; 0.4; 0.5; 0.6; 0.7; 0.8; 0.9; 1.0
///
[Newtonsoft.Json.JsonProperty("QValue", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
[System.ComponentModel.DataAnnotations.StringLength(3, MinimumLength = 3)]
public string QValue { get; set; }
///
/// Presence/Absence Indicator. Any value is ignored. Presence indicates that shipment is overpack. Applies only if SubVersion is greater than or equal to 1701.
///
[Newtonsoft.Json.JsonProperty("OverPackedIndicator", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public string OverPackedIndicator { get; set; }
///
/// Presence/Absence Indicator. Any value is ignored. Indicates the hazmat shipment/package is all packed in one. Applies only if SubVersion is greater than or equal to 1701.
///
[Newtonsoft.Json.JsonProperty("AllPackedInOneIndicator", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public string AllPackedInOneIndicator { get; set; }
[Newtonsoft.Json.JsonProperty("HazMatChemicalRecord", Required = Newtonsoft.Json.Required.Always)]
[System.ComponentModel.DataAnnotations.Required]
public System.Collections.Generic.ICollection HazMatChemicalRecord { get; set; } = new System.Collections.ObjectModel.Collection();
private System.Collections.Generic.IDictionary _additionalProperties;
[Newtonsoft.Json.JsonExtensionData]
public System.Collections.Generic.IDictionary AdditionalProperties
{
get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary()); }
set { _additionalProperties = value; }
}
}
///
/// Container to hold HazMat Chemical Records.
///
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.7.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")]
public partial class HazMat_HazMatChemicalRecord
{
///
/// Identifies the Chemcial Record. Required if SubVersion is greater than or equal to 1701.
///
[Newtonsoft.Json.JsonProperty("ChemicalRecordIdentifier", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
[System.ComponentModel.DataAnnotations.StringLength(3, MinimumLength = 1)]
public string ChemicalRecordIdentifier { get; set; }
///
/// This is the hazard class associated to the specified commodity. Required if CommodityRegulatedLevelCode is 'LQ' or 'FR' Applies only if SubVersion is greater than or equal to 1701.
///
[Newtonsoft.Json.JsonProperty("ClassDivisionNumber", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
[System.ComponentModel.DataAnnotations.StringLength(7, MinimumLength = 1)]
public string ClassDivisionNumber { get; set; }
///
/// This is the ID number (UN/NA/ID) for the specified commodity. Required if CommodityRegulatedLevelCode = LR, LQ or FR and if the field applies to the material by regulation. UN/NA/ID Identification Number assigned to the specified regulated good. (Include the UN/NA/ID as part of the entry). Applies only if SubVersion is greater than or equal to 1701.
///
[Newtonsoft.Json.JsonProperty("IDNumber", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
[System.ComponentModel.DataAnnotations.StringLength(6, MinimumLength = 1)]
public string IDNumber { get; set; }
///
/// The method of transport by which a shipment is approved to move and the regulations associated with that method. Only required when the CommodityRegulatedLevelCode is FR or LQ.Valid values: 01 - Highway02 - Ground03 - Passenger Aircraft04 - Cargo Aircraft Only Applies only if SubVersion is greater than or equal to 1701. For multiple ChemicalRecords per package having different TransportationMode, TransportationMode of first ChemicalRecord would be considered for validating and rating the package. All TransportationMode except for '04' are general service offering. If any chemical record contains '04' as TransportationMode, ShipperNumber needs to be authorized to use '04' as TransportationMode.
///
[Newtonsoft.Json.JsonProperty("TransportationMode", Required = Newtonsoft.Json.Required.Always)]
[System.ComponentModel.DataAnnotations.Required]
[System.ComponentModel.DataAnnotations.StringLength(2, MinimumLength = 2)]
public string TransportationMode { get; set; }
///
/// The Regulatory set associated with every regulated shipment. It must be the same across the shipment. Valid values: ADR - For Europe to Europe Ground Movement CFR - For HazMat regulated by US Dept. of Transportation within the U.S. or ground shipments to Canada, IATA - For Worldwide Air movement TDG - For Canada to Canada ground movement or Canada to U.S. standard movement Applies only if SubVersion is greater than or equal to 1701. For multiple ChemicalRecords per package or multiple packages containing different RegulationSet, RegulationSet of first ChemicalRecord would be considered for validating and rating the entire shipment.
///
[Newtonsoft.Json.JsonProperty("RegulationSet", Required = Newtonsoft.Json.Required.Always)]
[System.ComponentModel.DataAnnotations.Required]
[System.ComponentModel.DataAnnotations.StringLength(4, MinimumLength = 3)]
public string RegulationSet { get; set; }
///
/// 24 Hour Emergency Phone Number of the shipper. Valid values for this field are (0) through (9) with trailing blanks. For numbers within the U.S., the layout is '1', area code, 7-digit number. For all other countries or territories the layout is country or territory code, area code, number. Applies only if SubVersion is greater than or equal to 1701.
///
[Newtonsoft.Json.JsonProperty("EmergencyPhone", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
[System.ComponentModel.DataAnnotations.StringLength(25, MinimumLength = 1)]
public string EmergencyPhone { get; set; }
///
/// The emergency information, contact name and/or contact number, required to be communicated when a call is placed to the EmergencyPhoneNumber. The information is required if there is a value in the EmergencyPhoneNumber field above and the shipment is with a US50 or PR origin and/or destination and the RegulationSet is IATA. Applies only if SubVersion is greater than or equal to 1701.
///
[Newtonsoft.Json.JsonProperty("EmergencyContact", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
[System.ComponentModel.DataAnnotations.StringLength(35, MinimumLength = 1)]
public string EmergencyContact { get; set; }
///
/// Required if CommodityRegulatedLevelCode = LQ or FR and if the field applies to the material by regulation. If reportable quantity is met, 'RQ' should be entered. Applies only if SubVersion is greater than or equal to 1701.
///
[Newtonsoft.Json.JsonProperty("ReportableQuantity", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
[System.ComponentModel.DataAnnotations.StringLength(2, MinimumLength = 1)]
public string ReportableQuantity { get; set; }
///
/// Required if CommodityRegulatedLevelCode = LQ or FR and if the field applies to the material by regulation. Secondary hazardous characteristics of a package. (There can be more than one – separate each with a comma). Applies only if SubVersion is greater than or equal to 1701.
///
[Newtonsoft.Json.JsonProperty("SubRiskClass", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
[System.ComponentModel.DataAnnotations.StringLength(100, MinimumLength = 1)]
public string SubRiskClass { get; set; }
///
/// This is the packing group category associated to the specified commodity. Required if CommodityRegulatedLevelCode = LQ or FR and if the field applies to the material by regulation. Must be shown in Roman Numerals.Valid values are:I, II,III,blank. Applies only if SubVersion is greater than or equal to 1701.
///
[Newtonsoft.Json.JsonProperty("PackagingGroupType", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
[System.ComponentModel.DataAnnotations.StringLength(10, MinimumLength = 1)]
public string PackagingGroupType { get; set; }
///
/// Required if CommodityRegulatedLevelCode = LQ or FR. The numerical value of the mass capacity of the regulated good. Applies only if SubVersion is greater than or equal to 1701.
///
[Newtonsoft.Json.JsonProperty("Quantity", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
[System.ComponentModel.DataAnnotations.StringLength(15, MinimumLength = 15)]
public string Quantity { get; set; }
///
/// Required if CommodityRegulatedLevelCode = LQ or FR. The unit of measure used for the mass capacity of the regulated good. For Example: ml, L, g, mg, kg, cylinder, pound, pint, quart, gallon, ounce etc. Applies only if SubVersion is greater than or equal to 1701.
///
[Newtonsoft.Json.JsonProperty("UOM", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
[System.ComponentModel.DataAnnotations.StringLength(10, MinimumLength = 1)]
public string UOM { get; set; }
///
/// The packing instructions related to the chemical record. Required if CommodityRegulatedLevelCode = LQ or FR and if the field applies to the material by regulation. Applies only if SubVersion is greater than or equal to 1701.
///
[Newtonsoft.Json.JsonProperty("PackagingInstructionCode", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
[System.ComponentModel.DataAnnotations.StringLength(353, MinimumLength = 1)]
public string PackagingInstructionCode { get; set; }
///
/// The Proper Shipping Name assigned by ADR, CFR or IATA. Required if CommodityRegulatedLevelCode = LR, LQ or FR. Applies only if SubVersion is greater than or equal to 1701.
///
[Newtonsoft.Json.JsonProperty("ProperShippingName", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
[System.ComponentModel.DataAnnotations.StringLength(250, MinimumLength = 1)]
public string ProperShippingName { get; set; }
///
/// The technical name (when required) for the specified commodity. Required if CommodityRegulatedLevelCode = LQ or FR and if the field applies to the material by regulation. Applies only if SubVersion is greater than or equal to 1701.
///
[Newtonsoft.Json.JsonProperty("TechnicalName", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
[System.ComponentModel.DataAnnotations.StringLength(300, MinimumLength = 1)]
public string TechnicalName { get; set; }
///
/// Additional remarks or special provision information. Required if CommodityRegulatedLevelCode = LQ or FR and if the field applies to the material by regulation.
///
///
Additional information that may be required by regulation about a hazardous material, such as, "Limited Quantity", DOT-SP numbers, EX numbers. Applies only if SubVersion is greater than or equal to 1701.
///
///
[Newtonsoft.Json.JsonProperty("AdditionalDescription", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
[System.ComponentModel.DataAnnotations.StringLength(75, MinimumLength = 1)]
public string AdditionalDescription { get; set; }
///
/// The package type code identifying the type of packaging used for the commodity. (Ex: Fiberboard Box). Required if CommodityRegulatedLevelCode = LQ or FR. Applies only if SubVersion is greater than or equal to 1701.
///
[Newtonsoft.Json.JsonProperty("PackagingType", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
[System.ComponentModel.DataAnnotations.StringLength(255, MinimumLength = 1)]
public string PackagingType { get; set; }
///
/// Defines the type of label that is required on the package for the commodity. Not applicable if CommodityRegulatedLevelCode = LR or EQ. Applies only if SubVersion is greater than or equal to 1701.
///
[Newtonsoft.Json.JsonProperty("HazardLabelRequired", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
[System.ComponentModel.DataAnnotations.StringLength(50, MinimumLength = 1)]
public string HazardLabelRequired { get; set; }
///
/// The number of pieces of the specific commodity. Required if CommodityRegulatedLevelCode = LQ or FR.Valid values are 1 to 999. Applies only if SubVersion is greater than or equal to 1701.
///
[Newtonsoft.Json.JsonProperty("PackagingTypeQuantity", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
[System.ComponentModel.DataAnnotations.StringLength(3, MinimumLength = 1)]
public string PackagingTypeQuantity { get; set; }
///
/// Indicates the type of commodity - Fully Regulated (FR), Limited Quantity (LQ), Excepted Quantity (EQ), Lightly Regulated (LR). Default value is FR.Valid values are LR, FR, LQ, EQ. Applies only if SubVersion is greater than or equal to 1701.
///
[Newtonsoft.Json.JsonProperty("CommodityRegulatedLevelCode", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
[System.ComponentModel.DataAnnotations.StringLength(2, MinimumLength = 2)]
public string CommodityRegulatedLevelCode { get; set; }
///
/// Transport Category.Valid values are 0 to 4. Applies only if SubVersion is greater than or equal to 1701.
///
[Newtonsoft.Json.JsonProperty("TransportCategory", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
[System.ComponentModel.DataAnnotations.StringLength(1, MinimumLength = 1)]
public string TransportCategory { get; set; }
///
/// Defines what is restricted to pass through a tunnel. Applies only if SubVersion is greater than or equal to 1701.
///
[Newtonsoft.Json.JsonProperty("TunnelRestrictionCode", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
[System.ComponentModel.DataAnnotations.StringLength(10, MinimumLength = 1)]
public string TunnelRestrictionCode { get; set; }
private System.Collections.Generic.IDictionary _additionalProperties;
[Newtonsoft.Json.JsonExtensionData]
public System.Collections.Generic.IDictionary AdditionalProperties
{
get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary()); }
set { _additionalProperties = value; }
}
}
///
/// Container to hold Dry Ice information. Lane check will happen based on postal code/ city.
///
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.7.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")]
public partial class PackageServiceOptions_DryIce
{
///
/// Regulation set for DryIce Shipment. Valid values: CFR = For HazMat regulated by US Dept of Transportation within the U.S. or ground shipments to Canada,IATA = For Worldwide Air movement. The following values are valid: CFR and IATA.
///
[Newtonsoft.Json.JsonProperty("RegulationSet", Required = Newtonsoft.Json.Required.Always)]
[System.ComponentModel.DataAnnotations.Required]
[System.ComponentModel.DataAnnotations.StringLength(4, MinimumLength = 3)]
public string RegulationSet { get; set; }
[Newtonsoft.Json.JsonProperty("DryIceWeight", Required = Newtonsoft.Json.Required.Always)]
[System.ComponentModel.DataAnnotations.Required]
public DryIce_DryIceWeight DryIceWeight { get; set; } = new DryIce_DryIceWeight();
///
/// Presence/Absence Indicator. Any value inside is ignored. Relevant only in CFR regulation set. If present it is used to designate the Dry Ice is for any medical use and rates are adjusted for DryIce weight more than 2.5 KGS or 5.5 LBS.
///
[Newtonsoft.Json.JsonProperty("MedicalUseIndicator", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public string MedicalUseIndicator { get; set; }
///
/// Presence/Absence Indicator. Any value inside is ignored. Indicates a Dry Ice audit will be performed per the Regulation Set requirements. Empty tag means indicator is present.
///
[Newtonsoft.Json.JsonProperty("AuditRequired", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public string AuditRequired { get; set; }
private System.Collections.Generic.IDictionary _additionalProperties;
[Newtonsoft.Json.JsonExtensionData]
public System.Collections.Generic.IDictionary AdditionalProperties
{
get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary()); }
set { _additionalProperties = value; }
}
}
///
/// Container for Weight information for Dry Ice.
///
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.7.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")]
public partial class DryIce_DryIceWeight
{
[Newtonsoft.Json.JsonProperty("UnitOfMeasurement", Required = Newtonsoft.Json.Required.Always)]
[System.ComponentModel.DataAnnotations.Required]
public DryIceWeight_UnitOfMeasurement UnitOfMeasurement { get; set; } = new DryIceWeight_UnitOfMeasurement();
///
/// Weight for Dry Ice. Cannot be more than package weight. Should be more than 0.0. Valid characters are 0-9 and "." (Decimal point). Limit to 1 digit after the decimal. The maximum length of the field is 5 including "." and can hold up to 1 decimal place.
///
[Newtonsoft.Json.JsonProperty("Weight", Required = Newtonsoft.Json.Required.Always)]
[System.ComponentModel.DataAnnotations.Required]
[System.ComponentModel.DataAnnotations.StringLength(5, MinimumLength = 1)]
public string Weight { get; set; }
private System.Collections.Generic.IDictionary _additionalProperties;
[Newtonsoft.Json.JsonExtensionData]
public System.Collections.Generic.IDictionary AdditionalProperties
{
get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary()); }
set { _additionalProperties = value; }
}
}
///
/// Container for Unit Of Measurement for Dry Ice.
///
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.7.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")]
public partial class DryIceWeight_UnitOfMeasurement
{
///
/// DryIce weight unit of measurement code. Valid values:
///
- 00 - KG (Metric Unit of Measurements) or KGS
///
- 01 - LB (English Unit of Measurements) or LBS
///
///
[Newtonsoft.Json.JsonProperty("Code", Required = Newtonsoft.Json.Required.Always)]
[System.ComponentModel.DataAnnotations.Required]
[System.ComponentModel.DataAnnotations.StringLength(2, MinimumLength = 1)]
public string Code { get; set; }
///
/// Text description of the code representing the unit of measure associated with the package.
///
[Newtonsoft.Json.JsonProperty("Description", Required = Newtonsoft.Json.Required.Always)]
[System.ComponentModel.DataAnnotations.Required]
[System.ComponentModel.DataAnnotations.StringLength(20, MinimumLength = 1)]
public string Description { get; set; }
private System.Collections.Generic.IDictionary _additionalProperties;
[Newtonsoft.Json.JsonExtensionData]
public System.Collections.Generic.IDictionary AdditionalProperties
{
get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary()); }
set { _additionalProperties = value; }
}
}
///
/// SimpleRate Container
///
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.7.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")]
public partial class Package_SimpleRate
{
///
/// Simple Rate Package Size Valid values: XS - Extra Small S - Small M - Medium L - Large XL - Extra Large
///
[Newtonsoft.Json.JsonProperty("Code", Required = Newtonsoft.Json.Required.Always)]
[System.ComponentModel.DataAnnotations.Required]
[System.ComponentModel.DataAnnotations.StringLength(2, MinimumLength = 2)]
public string Code { get; set; }
///
/// Simple Rate Package Size Description
///
[Newtonsoft.Json.JsonProperty("Description", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
[System.ComponentModel.DataAnnotations.StringLength(35, MinimumLength = 1)]
public string Description { get; set; }
private System.Collections.Generic.IDictionary _additionalProperties;
[Newtonsoft.Json.JsonExtensionData]
public System.Collections.Generic.IDictionary AdditionalProperties
{
get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary()); }
set { _additionalProperties = value; }
}
}
///
/// UPS Premier
///
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.7.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")]
public partial class Package_UPSPremier
{
///
/// UPS Premier Category Valid values are 01,02,03 UPS Premier Silver - 01 UPS Premier Gold - 02 UPS Premier Platinum - 03
///
[Newtonsoft.Json.JsonProperty("Category", Required = Newtonsoft.Json.Required.Always)]
[System.ComponentModel.DataAnnotations.Required]
[System.ComponentModel.DataAnnotations.StringLength(2, MinimumLength = 2)]
public string Category { get; set; }
private System.Collections.Generic.IDictionary _additionalProperties;
[Newtonsoft.Json.JsonExtensionData]
public System.Collections.Generic.IDictionary AdditionalProperties
{
get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary()); }
set { _additionalProperties = value; }
}
}
///