Skip to content

Commit 27d7df3

Browse files
committed
fix: removed duplicated endpoints
1 parent 238d024 commit 27d7df3

File tree

2 files changed

+25
-5
lines changed

2 files changed

+25
-5
lines changed

route4me-csharp-sdk/Route4MeSDKLibrary/Consts.cs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -244,10 +244,6 @@ public static class R4MEInfrastructureSettingsV5
244244
public const string ContactsGetAsyncJobResult = ContactHost + "/job-tracker/result";
245245
public const string AddressBookDepots = ContactHost + "/addresses/depots";
246246

247-
public const string ContactExport = ContactHost + "/addresses/export";
248-
public const string ContactExportByAreas = ContactHost + "/addresses/export-by-areas";
249-
public const string ContactExportByAreaIds = ContactHost + "/addresses/export-by-area-ids";
250-
251247
#endregion
252248

253249
public const string AddressBarcodes = MainHost + "/address-barcodes";

route4me-csharp-sdk/Route4MeSDKLibrary/Route4MeManagerV5.cs

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -352,14 +352,38 @@ public Task<Tuple<StatusResponse, ResultResponse>> GetContactsJobStatusAsync(str
352352
HttpMethodType.Get);
353353
}
354354

355+
/// <summary>
356+
/// Asynchronously exports the addresses to the account's team file store.
357+
/// </summary>
358+
/// <param name="exportParams">Export parameters</param>
359+
/// <returns>A tuple type object containing:
360+
/// - a StatusResponse type object in case of success, null - if failure,
361+
/// - a ResultResponse type object in case of failure, null - if success</returns>
355362
public Task<Tuple<StatusResponse, ResultResponse>> ExportAddressesAsync(AddressExportParameters exportParams)
356363
{
357364
return GetJsonObjectFromAPIAsync<StatusResponse>(exportParams,
358-
R4MEInfrastructureSettingsV5.ContactExport,
365+
R4MEInfrastructureSettingsV5.ContactsExport,
359366
HttpMethodType.Post);
360367

361368
}
362369

370+
/// <summary>
371+
/// Exports the addresses to the account's team file store.
372+
/// </summary>
373+
/// <param name="exportParams">Export parameters</param>
374+
/// <param name="resultResponse">Failure response</param>
375+
/// <returns>Status of an export operation</returns>
376+
public StatusResponse ExportAddresses(AddressExportParameters exportParams, out ResultResponse resultResponse)
377+
{
378+
return GetJsonObjectFromAPI<StatusResponse>(exportParams,
379+
R4MEInfrastructureSettingsV5.ContactsExport,
380+
HttpMethodType.Post,
381+
null,
382+
false,
383+
false,
384+
out resultResponse);
385+
}
386+
363387
#endregion
364388

365389
#region Account Profile

0 commit comments

Comments
 (0)