| | | 1 | | namespace Services.ApiServices.StudioApi; |
| | | 2 | | |
| | | 3 | | public static class InterpartsApiUrl |
| | | 4 | | { |
| | | 5 | | public static string ExternalPricesUrl(string baseUrl, int producerId, string partCode) |
| | | 6 | | { |
| | 0 | 7 | | return |
| | 0 | 8 | | $"{baseUrl}/ExternalPrices?$filter=ProducerId eq {producerId} and PartCode eq '{partCode}'&$expand=Currency" |
| | | 9 | | } |
| | | 10 | | |
| | | 11 | | public static string PricesUrl(string baseUrl, int producerId, string partCode) |
| | | 12 | | { |
| | 0 | 13 | | return |
| | 0 | 14 | | $"{baseUrl}/Prices?$filter=ProducerId eq {producerId} and PartCode eq '{partCode}' and Actual eq true and Su |
| | | 15 | | } |
| | | 16 | | |
| | | 17 | | public static string ProducersUrl(string baseUrl) |
| | | 18 | | { |
| | 0 | 19 | | return $"{baseUrl}/Producers"; |
| | | 20 | | } |
| | | 21 | | |
| | | 22 | | public static string ProducerByIdUrl(string baseUrl, int producerId) |
| | | 23 | | { |
| | 0 | 24 | | return $"{baseUrl}/Producers({producerId})"; |
| | | 25 | | } |
| | | 26 | | |
| | | 27 | | public static string ProducerByNameExactUrl(string baseUrl, string name) |
| | | 28 | | { |
| | 0 | 29 | | return $"{baseUrl}/Producers?$filter=Name eq '{Uri.EscapeDataString(name)}' and Id eq RealId"; |
| | | 30 | | } |
| | | 31 | | |
| | | 32 | | public static string ProducerByPrefixExactUrl(string baseUrl, string prefix) |
| | | 33 | | { |
| | 0 | 34 | | return $"{baseUrl}/Producers?$filter=Prefix eq '{Uri.EscapeDataString(prefix)}' and Id eq RealId"; |
| | | 35 | | } |
| | | 36 | | |
| | | 37 | | public static string ProducersByNameUrl(string baseUrl, string name) |
| | | 38 | | { |
| | 0 | 39 | | return $"{baseUrl}/Producers?$filter=contains(Name, '{Uri.EscapeDataString(name)}') and Id eq RealId"; |
| | | 40 | | } |
| | | 41 | | |
| | | 42 | | public static string ProducersByPrefixUrl(string baseUrl, string prefix) |
| | | 43 | | { |
| | 0 | 44 | | return $"{baseUrl}/Producers?$filter=contains(Prefix, '{Uri.EscapeDataString(prefix)}') and Id eq RealId"; |
| | | 45 | | } |
| | | 46 | | |
| | | 47 | | public static string ProducerByIdWithRealIdUrl(string baseUrl, int producerId) |
| | | 48 | | { |
| | 0 | 49 | | return $"{baseUrl}/Producers?$filter=Id eq {producerId} and Id eq RealId"; |
| | | 50 | | } |
| | | 51 | | } |