-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added EffortClassChargeID and StandardServiceRequestActivityID
- Loading branch information
1 parent
49041f5
commit 6fe1b9a
Showing
8 changed files
with
425 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
using Microsoft.VisualStudio.TestTools.UnitTesting; | ||
using System; | ||
using System.Collections.Generic; | ||
|
||
namespace Sdk4me.Tests | ||
{ | ||
[TestClass] | ||
public class TimeEntryTest | ||
{ | ||
[TestMethod] | ||
public void Get() | ||
{ | ||
Sdk4meClient client = Client.Get(); | ||
List<TimeEntry> timeEntries = client.TimeEntries.Get("*"); | ||
Console.WriteLine($"Count: {timeEntries.Count}"); | ||
Assert.IsNotNull(timeEntries); | ||
Assert.IsInstanceOfType(timeEntries, typeof(List<TimeEntry>)); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
using Newtonsoft.Json; | ||
using System; | ||
|
||
namespace Sdk4me | ||
{ | ||
/// <summary> | ||
/// A 4me <see href="https://developer.4me.com/v1/service_level_agreements/effort_class_chargeIDs/">Service Level Agreements - Effort Class Charge ID</see> object. | ||
/// </summary> | ||
public class EffortClassChargeID : BaseItem | ||
{ | ||
private string chargeID; | ||
private EffortClass effortClass; | ||
|
||
#region Created at (override) | ||
|
||
/// <summary> | ||
/// The creation date and time; which is obsolete for this object. | ||
/// </summary> | ||
[JsonProperty("created_at"), Sdk4meIgnoreInFieldSelection()] | ||
public override DateTime? CreatedAt | ||
{ | ||
get => base.CreatedAt; | ||
internal set => base.CreatedAt = null; | ||
} | ||
|
||
#endregion | ||
|
||
#region Updated at (override) | ||
|
||
/// <summary> | ||
/// The updated date and time; which is obsolete for this object. | ||
/// </summary> | ||
[JsonProperty("updated_at"), Sdk4meIgnoreInFieldSelection()] | ||
public override DateTime? UpdatedAt | ||
{ | ||
get => base.UpdatedAt; | ||
internal set => base.UpdatedAt = null; | ||
} | ||
|
||
#endregion | ||
|
||
#region ChargeID | ||
|
||
/// <summary> | ||
/// The Charge ID is the unique identifier by which an effort class that is linked to a time entry when an activity was performed through the coverage of the SLA is known in the billing system of the service provider. | ||
/// </summary> | ||
[JsonProperty("chargeID")] | ||
public string ChargeID | ||
{ | ||
get => chargeID; | ||
set => chargeID = SetValue("chargeID", chargeID, value); | ||
} | ||
|
||
#endregion | ||
|
||
#region Effort class ID | ||
|
||
/// <summary> | ||
/// The effort class related to the effort class charge ID. | ||
/// </summary> | ||
[JsonProperty("effort_class")] | ||
public EffortClass EffortClass | ||
{ | ||
get => effortClass; | ||
set => effortClass = SetValue("effort_class_id", effortClass, value); | ||
} | ||
|
||
[JsonProperty("effort_class_id"), Sdk4meIgnoreInFieldSelection()] | ||
internal long? EffortClassID => effortClass?.ID; | ||
|
||
#endregion | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
73 changes: 73 additions & 0 deletions
73
Source/Sdk4me/Entities/StandardServiceRequestActivityID.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
using Newtonsoft.Json; | ||
using System; | ||
|
||
namespace Sdk4me | ||
{ | ||
/// <summary> | ||
/// A 4me <see href="https://developer.4me.com/v1/service_level_agreements/standard_service_request_activityIDs/">Service Level Agreements - Standard Service Request Activity ID</see> object. | ||
/// </summary> | ||
public class StandardServiceRequestActivityID : BaseItem | ||
{ | ||
private string activityID; | ||
private StandardServiceRequest standardServiceRequest; | ||
|
||
#region Created at (override) | ||
|
||
/// <summary> | ||
/// The creation date and time; which is obsolete for this object. | ||
/// </summary> | ||
[JsonProperty("created_at"), Sdk4meIgnoreInFieldSelection()] | ||
public override DateTime? CreatedAt | ||
{ | ||
get => base.CreatedAt; | ||
internal set => base.CreatedAt = null; | ||
} | ||
|
||
#endregion | ||
|
||
#region Updated at (override) | ||
|
||
/// <summary> | ||
/// The updated date and time; which is obsolete for this object. | ||
/// </summary> | ||
[JsonProperty("updated_at"), Sdk4meIgnoreInFieldSelection()] | ||
public override DateTime? UpdatedAt | ||
{ | ||
get => base.UpdatedAt; | ||
internal set => base.UpdatedAt = null; | ||
} | ||
|
||
#endregion | ||
|
||
#region ActivityID | ||
|
||
/// <summary> | ||
/// The Activity ID is the unique identifier by which an activity that is performed in the context of a service offering is known in the billing system of the service provider. | ||
/// </summary> | ||
[JsonProperty("activityID")] | ||
public string ActivityID | ||
{ | ||
get => activityID; | ||
set => activityID = SetValue("activityID", activityID, value); | ||
} | ||
|
||
#endregion | ||
|
||
#region Standard service request | ||
|
||
/// <summary> | ||
/// The standard service request related to the standard service request activity ID. | ||
/// </summary> | ||
[JsonProperty("standard_service_request")] | ||
public StandardServiceRequest StandardServiceRequest | ||
{ | ||
get => standardServiceRequest; | ||
set => standardServiceRequest = SetValue("standard_service_request_id", standardServiceRequest, value); | ||
} | ||
|
||
[JsonProperty("standard_service_request_id"), Sdk4meIgnoreInFieldSelection()] | ||
internal long? StandardServiceRequestID => standardServiceRequest?.ID; | ||
|
||
#endregion | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.