Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #16 from robsur/master
Added new functionality for Labels
- Loading branch information
Showing
12 changed files
with
349 additions
and
2 deletions.
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,61 @@ | ||
using System.Collections.Generic; | ||
|
||
namespace FortnoxAPILibrary.Connectors { | ||
/// <remarks/> | ||
public class LabelConnector : EntityConnector<Label, Labels, Sort.By.Label> { | ||
/// <summary> | ||
/// Use with Find() to limit the search result | ||
/// </summary> | ||
[FilterProperty] | ||
public string Id { get; set; } | ||
|
||
/// <remarks/> | ||
public LabelConnector() { | ||
base.Resource = "labels"; | ||
} | ||
|
||
/// <summary> | ||
/// Gets a Label by ID | ||
/// </summary> | ||
/// <param name="labelId"></param> | ||
/// <returns></returns> | ||
public Label Get(string labelId) { | ||
return base.BaseGet(labelId); | ||
} | ||
|
||
/// <summary> | ||
/// Updates a label | ||
/// </summary> | ||
/// <param name="label"></param> | ||
/// <returns></returns> | ||
public Label Update(Label label) { | ||
return base.BaseUpdate(label, label.Id); | ||
} | ||
|
||
/// <summary> | ||
/// Create a new label | ||
/// </summary> | ||
/// <param name="label">The label entity to create</param> | ||
/// <returns>The created label.</returns> | ||
public Label Create(Label label) { | ||
return base.BaseCreate(label); | ||
} | ||
|
||
/// <summary> | ||
/// Delete a label | ||
/// </summary> | ||
/// <param name="labelid">The label id to delete</param> | ||
/// <returns>If the label was deleted. </returns> | ||
public void Delete(string labelid) { | ||
base.BaseDelete(labelid); | ||
} | ||
|
||
/// <summary> | ||
/// Gets a list of labels | ||
/// </summary> | ||
/// <returns>A list of labels</returns> | ||
public Labels Find() { | ||
return base.BaseFind(); | ||
} | ||
} | ||
} |
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
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
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,49 @@ | ||
//------------------------------------------------------------------------------ | ||
// <auto-generated> | ||
// Denna kod har genererats av ett verktyg. | ||
// Körtidsversion:2.0.50727.5466 | ||
// | ||
// Ändringar i denna fil kan orsaka fel och kommer att förloras om | ||
// koden återgenereras. | ||
// </auto-generated> | ||
//------------------------------------------------------------------------------ | ||
|
||
using System.Xml.Serialization; | ||
|
||
// | ||
// This source code was auto-generated by xsd, Version=2.0.50727.1432. | ||
// | ||
|
||
namespace FortnoxAPILibrary { | ||
/// <remarks/> | ||
public partial class Label { | ||
|
||
|
||
private string descriptionField; | ||
|
||
private string urlField = ""; | ||
|
||
|
||
/// <remarks/> | ||
public string Description { | ||
get { | ||
return this.descriptionField; | ||
} | ||
set { | ||
this.descriptionField = value; | ||
} | ||
} | ||
|
||
/// <summary>This field is Read-Only in Fortnox</summary> | ||
[System.ComponentModel.ReadOnly(true)] | ||
[System.Xml.Serialization.XmlAttributeAttribute()] | ||
public string url { | ||
get { | ||
return this.urlField; | ||
} | ||
set { | ||
this.urlField = value; | ||
} | ||
} | ||
} | ||
} |
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,126 @@ | ||
//------------------------------------------------------------------------------ | ||
// <auto-generated> | ||
// Denna kod har genererats av ett verktyg. | ||
// Körtidsversion:2.0.50727.5466 | ||
// | ||
// Ändringar i denna fil kan orsaka fel och kommer att förloras om | ||
// koden återgenereras. | ||
// </auto-generated> | ||
//------------------------------------------------------------------------------ | ||
|
||
using System.Xml.Serialization; | ||
using System.Collections.Generic; | ||
|
||
// | ||
// This source code was auto-generated by xsd, Version=2.0.50727.1432. | ||
// | ||
|
||
namespace FortnoxAPILibrary { | ||
/// <remarks/> | ||
[System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "2.0.50727.1432")] | ||
[System.SerializableAttribute()] | ||
[System.Diagnostics.DebuggerStepThroughAttribute()] | ||
[System.ComponentModel.DesignerCategoryAttribute("code")] | ||
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true)] | ||
[System.Xml.Serialization.XmlRootAttribute(Namespace = "", IsNullable = false)] | ||
public partial class Labels { | ||
|
||
private List<LabelSubset> labelSubsetField; | ||
|
||
private string totalResourcesField; | ||
|
||
private string totalPagesField; | ||
|
||
private string currentPageField; | ||
|
||
/// <remarks/> | ||
[System.Xml.Serialization.XmlElementAttribute("LabelSubset", Form = System.Xml.Schema.XmlSchemaForm.Unqualified)] | ||
public List<LabelSubset> LabelSubset { | ||
get { | ||
return this.labelSubsetField; | ||
} | ||
set { | ||
this.labelSubsetField = value; | ||
} | ||
} | ||
|
||
/// <remarks/> | ||
[System.Xml.Serialization.XmlAttributeAttribute()] | ||
public string TotalResources { | ||
get { | ||
return this.totalResourcesField; | ||
} | ||
set { | ||
this.totalResourcesField = value; | ||
} | ||
} | ||
|
||
/// <remarks/> | ||
[System.Xml.Serialization.XmlAttributeAttribute()] | ||
public string TotalPages { | ||
get { | ||
return this.totalPagesField; | ||
} | ||
set { | ||
this.totalPagesField = value; | ||
} | ||
} | ||
|
||
/// <remarks/> | ||
[System.Xml.Serialization.XmlAttributeAttribute()] | ||
public string CurrentPage { | ||
get { | ||
return this.currentPageField; | ||
} | ||
set { | ||
this.currentPageField = value; | ||
} | ||
} | ||
} | ||
|
||
/// <remarks/> | ||
[System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "2.0.50727.1432")] | ||
[System.SerializableAttribute()] | ||
[System.Diagnostics.DebuggerStepThroughAttribute()] | ||
[System.ComponentModel.DesignerCategoryAttribute("code")] | ||
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true)] | ||
public partial class LabelSubset { | ||
|
||
private string idField; | ||
|
||
private string descriptionField; | ||
|
||
private string urlField; | ||
|
||
/// <remarks/> | ||
public string Id { | ||
get { | ||
return this.idField; | ||
} | ||
set { | ||
this.idField = value; | ||
} | ||
} | ||
|
||
/// <remarks/> | ||
public string Description { | ||
get { | ||
return this.descriptionField; | ||
} | ||
set { | ||
this.descriptionField = value; | ||
} | ||
} | ||
|
||
/// <remarks/> | ||
[System.Xml.Serialization.XmlAttributeAttribute()] | ||
public string url { | ||
get { | ||
return this.urlField; | ||
} | ||
set { | ||
this.urlField = value; | ||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.