Skip to content

Commit

Permalink
Release/1.7.0 (#17)
Browse files Browse the repository at this point in the history
  • Loading branch information
r-simlinger authored Aug 27, 2018
1 parent 0429039 commit 2084370
Show file tree
Hide file tree
Showing 9 changed files with 172 additions and 10 deletions.
15 changes: 14 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,16 @@ and this project adheres to [Semantic Versioning](http://semver.org/).

### Removed

## [1.7.0] - 2018-08-22

### Added

- Payment: Get a list of payment transactions

### Fixed

- Smart.Transaction: cancel returns always false, now it returns the Transaction object (with the changed status)

## [1.6.0] - 2018-06-14

### Added
Expand Down Expand Up @@ -171,4 +181,7 @@ First release
[1.3.0]: https://github.com/secucard/secucard-connect-net-sdk/compare/1.2.0...1.3.0
[1.4.0]: https://github.com/secucard/secucard-connect-net-sdk/compare/1.3.0...1.4.0
[1.4.1]: https://github.com/secucard/secucard-connect-net-sdk/compare/1.4.0...1.4.1
[1.5.0]: https://github.com/secucard/secucard-connect-net-sdk/compare/1.4.1...1.5.0
[1.5.0]: https://github.com/secucard/secucard-connect-net-sdk/compare/1.4.1...1.5.0
[1.6.0]: https://github.com/secucard/secucard-connect-net-sdk/compare/1.5.0...1.6.0
[1.7.0]: https://github.com/secucard/secucard-connect-net-sdk/compare/1.6.0...1.7.0

35 changes: 35 additions & 0 deletions lib/Secucard.Connect/Product/General/Model/User.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
namespace Secucard.Connect.Product.General.Model
{
using System.Runtime.Serialization;
using Secucard.Connect.Product.Common.Model;

[DataContract]
public class User : SecuObject
{
[DataMember(Name = "salutation")]
public string Salutation { get; set; }

[DataMember(Name = "title")]
public string Title { get; set; }

[DataMember(Name = "forename")]
public string Forename { get; set; }

[DataMember(Name = "surname")]
public string Surname { get; set; }

[DataMember(Name = "companyname")]
public string CompanyName { get; set; }

public override string ToString()
{
return "User{" +
", companyName='" + CompanyName + '\'' +
", title='" + Title + '\'' +
", salutation='" + Salutation + '\'' +
", forename='" + Forename + '\'' +
", surname='" + Surname + '\'' +
"} " + base.ToString();
}
}
}
94 changes: 94 additions & 0 deletions lib/Secucard.Connect/Product/Payment/Model/PaymentTransaction.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
namespace Secucard.Connect.Product.Payment.Model
{
using System;
using System.Runtime.Serialization;
using Secucard.Connect.Net.Util;
using Secucard.Connect.Product.Common.Model;
using Secucard.Connect.Product.General.Model;

[DataContract]
public class PaymentTransaction : SecuObject
{
[DataMember(Name = "merchant")]
public Merchant Merchant { get; set; }

[DataMember(Name = "trans_id")]
public int TransId { get; set; }

[DataMember(Name = "product_id")]
public int ProductId { get; set; }

[DataMember(Name = "product")]
public string Product { get; set; }

[DataMember(Name = "product_raw")]
public string ProductRaw { get; set; }

[DataMember(Name = "zahlungsmittel_id")]
public int ZahlungsmittelId { get; set; }

[DataMember(Name = "contract_id")]
public int ContractId { get; set; }

[DataMember(Name = "amount")]
public int Amount { get; set; }

[DataMember(Name = "currency")]
public string Currency { get; set; }

[DataMember(Name = "created")]
public string FormattedCreated
{
get { return this.Created.ToDateTimeZone(); }
set { this.Created = value.ToDateTime(); }
}

public DateTime? Created { get; set; }

[DataMember(Name = "updated")]
public string FormattedUpdated
{
get { return this.Updated.ToDateTimeZone(); }
set { this.Updated = value.ToDateTime(); }
}

public DateTime? Updated { get; set; }

[DataMember(Name = "description")]
public string Description { get; set; }

[DataMember(Name = "description_raw")]
public string DescriptionRaw { get; set; }

[DataMember(Name = "status")]
public int Status { get; set; }

[DataMember(Name = "status_text")]
public string StatusText { get; set; }

[DataMember(Name = "customer")]
public User Customer { get; set; }

public override string ToString()
{
return "PaymentTransaction{" +
"Merchant='" + this.Merchant + "', " +
"TransId='" + this.TransId + "', " +
"ProductId='" + this.ProductId + "', " +
"Product='" + this.Product + "', " +
"ProductRaw='" + this.ProductRaw + "', " +
"ZahlungsmittelId='" + this.ZahlungsmittelId + "', " +
"ContractId='" + this.ContractId + "', " +
"Amount='" + this.Amount + "', " +
"Currency='" + this.Currency + "', " +
"FormattedCreated='" + this.FormattedCreated + "', " +
"FormattedUpdated='" + this.FormattedUpdated + "', " +
"Description='" + this.Description + "', " +
"DescriptionRaw='" + this.DescriptionRaw + "', " +
"Status='" + this.Status + "', " +
"StatusText='" + this.StatusText + "', " +
"Customer='" + this.Customer + "'" +
"} " + base.ToString();
}
}
}
2 changes: 2 additions & 0 deletions lib/Secucard.Connect/Product/Payment/Payment.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,7 @@ public class Payment
public SecupayCreditcardsService Secupaycreditcards { get; set; }

public SecupayInvoicesService Secupayinvoices { get; set; }

public PaymentTransactionsService PaymentTransactions { get; set; }
}
}
16 changes: 16 additions & 0 deletions lib/Secucard.Connect/Product/Payment/PaymentTransactionsService.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
namespace Secucard.Connect.Product.Payment
{
using Secucard.Connect.Client;
using Secucard.Connect.Product.Payment.Model;

public class PaymentTransactionsService : ProductService<PaymentTransaction>
{
public static readonly ServiceMetaData<PaymentTransaction> MetaData = new ServiceMetaData<PaymentTransaction>("payment",
"transactions");

protected override ServiceMetaData<PaymentTransaction> GetMetaData()
{
return MetaData;
}
}
}
4 changes: 2 additions & 2 deletions lib/Secucard.Connect/Product/Smart/TransactionsService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,9 @@ If STOMP server communication is disabled then you have to use REST
/// </summary>
/// <param name="transactionId">Cancel the specific transaction by id</param>
/// <returns></returns>
public bool Cancel(string transactionId)
public Transaction Cancel(string transactionId)
{
return ExecuteToBool(transactionId, "cancel", null, null, null);
return Execute<Transaction>(transactionId, "cancel", null, null, null);
}

/// <summary>
Expand Down
4 changes: 2 additions & 2 deletions lib/Secucard.Connect/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,5 @@
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]

[assembly: AssemblyVersion("1.6.0.0")]
[assembly: AssemblyFileVersion("1.6.0.0")]
[assembly: AssemblyVersion("1.7.0.0")]
[assembly: AssemblyFileVersion("1.7.0.0")]
7 changes: 4 additions & 3 deletions lib/Secucard.Connect/Secucard.Connect.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@
<Compile Include="Product\Document\UploadsService.cs" />
<Compile Include="Product\Document\Model\Upload.cs" />
<Compile Include="Product\General\Event\AccountDeviceChangedEvent.cs" />
<Compile Include="Product\General\Model\User.cs" />
<Compile Include="Product\General\SkeletonsServiceStomp.cs" />
<Compile Include="Product\General\StoresService.cs" />
<Compile Include="Product\General\GeneralTransactionsService.cs" />
Expand Down Expand Up @@ -143,6 +144,8 @@
<Compile Include="Product\Loyalty\Model\MerchantCard.cs" />
<Compile Include="Product\Loyalty\Model\Program.cs" />
<Compile Include="Product\Loyalty\Model\Sale.cs" />
<Compile Include="Product\Payment\PaymentTransactionsService.cs" />
<Compile Include="Product\Payment\Model\PaymentTransaction.cs" />
<Compile Include="Product\Payment\ContractService.cs" />
<Compile Include="Product\Payment\Event\PaymentEvent.cs" />
<Compile Include="Product\Payment\Model\Basket.cs" />
Expand Down Expand Up @@ -262,9 +265,7 @@
<Compile Include="Product\Smart\Smart.cs" />
<Compile Include="Product\Service\Services.cs" />
</ItemGroup>
<ItemGroup>
<Folder Include="obj\" />
</ItemGroup>
<ItemGroup />
<ItemGroup>
<EmbeddedResource Include="Client\Config\SecucardConnect.config">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
Expand Down
5 changes: 3 additions & 2 deletions lib/Secucard.Connect/SecucardConnect.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ namespace Secucard.Connect
/// </summary>
public class SecucardConnect
{
public const string Version = "1.6.0";
public const string Version = "1.7.0";
private readonly ClientConfiguration _configuration;
private readonly ClientContext _context;
private readonly Dictionary<string, IService> _serviceDict;
Expand Down Expand Up @@ -255,7 +255,8 @@ private void WireServiceInstances()
Secupaydebits = GetService<SecupayDebitsService>(),
Secupayprepays = GetService<SecupayPrepaysService>(),
Contracts = GetService<ContractService>(),
Secupayinvoices = GetService<SecupayInvoicesService>()
Secupayinvoices = GetService<SecupayInvoicesService>(),
PaymentTransactions = GetService<PaymentTransactionsService>()
};

Loyalty = new Loyalty
Expand Down

0 comments on commit 2084370

Please sign in to comment.