Skip to content
This repository was archived by the owner on Apr 12, 2021. It is now read-only.

Commit fd80012

Browse files
authored
Merge pull request #312 from MJMortimer/feature/SubscribeCurrencies
Add functionality to subscribe organisation to other currencies
2 parents 36a955b + 9c867dd commit fd80012

3 files changed

Lines changed: 16 additions & 3 deletions

File tree

Xero.Api/Core/Endpoints/CurrenciesEndpoint.cs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,17 @@
1-
using Xero.Api.Common;
1+
using Xero.Api.Core.Endpoints.Base;
22
using Xero.Api.Core.Model;
3+
using Xero.Api.Core.Request;
34
using Xero.Api.Core.Response;
45
using Xero.Api.Infrastructure.Http;
56

67
namespace Xero.Api.Core.Endpoints
78
{
8-
public interface ICurrenciesEndpoint : IXeroReadEndpoint<CurrenciesEndpoint, Currency, CurrenciesResponse>
9+
public interface ICurrenciesEndpoint : IXeroCreateEndpoint<CurrenciesEndpoint, Currency, CurrenciesRequest, CurrenciesResponse>
910
{
1011

1112
}
1213

13-
public class CurrenciesEndpoint : XeroReadEndpoint<CurrenciesEndpoint, Currency, CurrenciesResponse>,
14+
public class CurrenciesEndpoint : XeroCreateEndpoint<CurrenciesEndpoint, Currency, CurrenciesRequest, CurrenciesResponse>,
1415
ICurrenciesEndpoint
1516
{
1617
internal CurrenciesEndpoint(XeroHttpClient client)
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
using System.Runtime.Serialization;
2+
using Xero.Api.Common;
3+
using Xero.Api.Core.Model;
4+
5+
namespace Xero.Api.Core.Request
6+
{
7+
[CollectionDataContract(Namespace = "", Name = "Currencies")]
8+
public class CurrenciesRequest : XeroRequest<Currency>
9+
{
10+
}
11+
}

Xero.Api/Xero.Api.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@
7575
<Compile Include="Core\Model\Types\ObjectGroupType.cs" />
7676
<Compile Include="Core\Model\Types\ObjectType.cs" />
7777
<Compile Include="Core\Model\Types\SourceType.cs" />
78+
<Compile Include="Core\Request\CurrenciesRequest.cs" />
7879
<Compile Include="Core\Request\LinkedTransactionsRequest.cs" />
7980
<Compile Include="Core\Request\OnlineInvoicesRequest.cs" />
8081
<Compile Include="Core\Request\PurchaseOrdersRequest.cs" />

0 commit comments

Comments
 (0)