Skip to content

Commit

Permalink
Merge pull request #75 from viagogo/SAPI-200-RelistTransactions
Browse files Browse the repository at this point in the history
Sapi 200 relist transactions
  • Loading branch information
dylan-mcnamara-sh authored Aug 7, 2023
2 parents 9f7ff1c + 4300e2d commit c39477f
Show file tree
Hide file tree
Showing 5 changed files with 45 additions and 16 deletions.
16 changes: 9 additions & 7 deletions Version.props
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
<Project>
<PropertyGroup>
<VersionPrefix>4.0.0-rc-2</VersionPrefix>
<PackageReleaseNotes>
### New in 4.0.0-rc-2
* Fix create listing request.
</PackageReleaseNotes>
</PropertyGroup>
<PropertyGroup>
<VersionPrefix>4.0.0-rc-3</VersionPrefix>
<PackageReleaseNotes>
### New in 4.0.0-rc-3
* Add RelistTransaction to SellerListing Post and Get Apis
### New in 4.0.0-rc-2
* Fix create listing request.
</PackageReleaseNotes>
</PropertyGroup>
</Project>
16 changes: 11 additions & 5 deletions src/GogoKit/Models/Request/NewSellerListing.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
using System;
using GogoKit.Models.Response;
using GogoKit.Models.Response;
using System;
using System.Collections.Generic;
using System.Runtime.Serialization;

Expand All @@ -19,7 +19,7 @@ public class NewSellerListing

[DataMember(Name = "face_value")]
public Money FaceValue { get; set; }

[DataMember(Name = "ticket_price")]
public Money TicketPrice { get; set; }

Expand All @@ -34,10 +34,10 @@ public class NewSellerListing

[DataMember(Name = "listing_note_ids")]
public IList<int> ListingNoteIds { get; set; }

[DataMember(Name = "notes")]
public string Notes { get; set; }

[DataMember(Name = "ticket_location_address_id")]
public int? TicketLocationAddressId { get; set; }

Expand All @@ -55,5 +55,11 @@ public class NewSellerListing

[DataMember(Name = "barcodes")]
public BarcodeUpload[] Barcodes { get; set; }

/// <summary>
/// Used when relisting tickets previously purchased in the marketplace.
/// </summary>
[DataMember(Name = "relist_transaction_id")]
public int? RelistTransactionId { get; set; }
}
}
4 changes: 2 additions & 2 deletions src/GogoKit/Models/Response/Listing.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using System.Runtime.Serialization;
using HalKit.Json;
using HalKit.Json;
using HalKit.Models.Response;
using System.Runtime.Serialization;

namespace GogoKit.Models.Response
{
Expand Down
14 changes: 14 additions & 0 deletions src/GogoKit/Models/Response/RelistTransaction.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
using System.Runtime.Serialization;

namespace GogoKit.Models.Response
{
[DataContract(Name = "relist_transaction")]
public class RelistTransaction
{
/// <summary>
/// The Id of the transaction that this listing is created from
/// </summary>
[DataMember(Name = "id")]
public int? Id { get; set; }
}
}
11 changes: 9 additions & 2 deletions src/GogoKit/Models/Response/SellerListing.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
using System;
using GogoKit.Models.Request;
using HalKit.Json;
using HalKit.Models.Response;
using System;
using System.Collections.Generic;
using System.Runtime.Serialization;
using GogoKit.Models.Request;

namespace GogoKit.Models.Response
{
Expand Down Expand Up @@ -78,6 +78,13 @@ public class SellerListing : EmbeddedSellerListing
[Embedded("listing_notes")]
public IList<ListingNote> ListingNotes { get; set; }

/// <summary>
/// The model for the transaction that this listing was created from
/// </summary>
[DataMember(Name = "relist_transaction")]
[Embedded("relist_transaction")]
public RelistTransaction RelistTransaction { get; set; }

/// <summary>
/// You can GET the href of this link to retrieve the <see cref="ListingConstraints"/>
/// resource for updating a <see cref="SellerListing"/>.
Expand Down

0 comments on commit c39477f

Please sign in to comment.