You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
|
namespace Amazon.SellingPartnerApiSDK.Services
|
|
|
|
|
{
|
|
|
|
|
public static class EnvironmentManager
|
|
|
|
|
{
|
|
|
|
|
public enum Environments
|
|
|
|
|
{
|
|
|
|
|
Sandbox,
|
|
|
|
|
Production
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public static Environments Environment { get; set; } = Environments.Production;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public class ApiUrls
|
|
|
|
|
{
|
|
|
|
|
protected class ShippingApiV2Urls
|
|
|
|
|
{
|
|
|
|
|
private static readonly string _resourceBaseUrl = "/shipping/v2";
|
|
|
|
|
|
|
|
|
|
public static string GetRates => $"{_resourceBaseUrl}/shipments/rates";
|
|
|
|
|
|
|
|
|
|
public static string PurchaseShipment => $"{_resourceBaseUrl}/shipments";
|
|
|
|
|
|
|
|
|
|
public static string OneClickShipment => $"{_resourceBaseUrl}/oneClickShipment";
|
|
|
|
|
|
|
|
|
|
public static string GetTracking(string carrierId, string trackingId)
|
|
|
|
|
{
|
|
|
|
|
return $"{_resourceBaseUrl}/tracking?carrierId={carrierId}&trackingId={trackingId}";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public static string GetShipmentDocuments(string shipmentId, string packageClientReferenceId, string format)
|
|
|
|
|
{
|
|
|
|
|
return
|
|
|
|
|
$"{_resourceBaseUrl}/shipments/{shipmentId}/documents?packageClientReferenceId={packageClientReferenceId}&format={format}";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public static string CancelShipment(string shipmentId)
|
|
|
|
|
{
|
|
|
|
|
return $"{_resourceBaseUrl}/shipments/{shipmentId}/cancel";
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
protected class TokenApiUrls
|
|
|
|
|
{
|
|
|
|
|
private static readonly string _resourceBaseUrl = "/tokens/2021-03-01";
|
|
|
|
|
|
|
|
|
|
public static string RestrictedDataToken => $"{_resourceBaseUrl}/restrictedDataToken";
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|