Skip to content

Commit

Permalink
Merge pull request #360 from immutable/feat/update-zkevm-api-2024-11-…
Browse files Browse the repository at this point in the history
…24-10-04-39

feat: update immutable zkEVM API package
  • Loading branch information
nattb8 authored Nov 24, 2024
2 parents 319275f + d24f80c commit 3f4f60d
Show file tree
Hide file tree
Showing 5 changed files with 682 additions and 71 deletions.
3 changes: 2 additions & 1 deletion src/Packages/ZkEvmApi/Documentation~/NFTBundle.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**NftWithStack** | [**NFTWithStack**](NFTWithStack.md) | |
**Market** | [**Market**](Market.md) | |
**Listings** | [**List<Listing>**](Listing.md) | List of open listings for the stack. |
**Listings** | [**List<Listing>**](Listing.md) | List of open listings for the NFT. |
**Bids** | [**List<Bid>**](Bid.md) | List of open bids for the NFT. |

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

1 change: 1 addition & 0 deletions src/Packages/ZkEvmApi/Documentation~/StackBundle.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ Name | Type | Description | Notes
**StackCount** | **int** | Total count of NFTs in the stack matching the filter params |
**Market** | [**Market**](Market.md) | |
**Listings** | [**List<Listing>**](Listing.md) | List of open listings for the stack. |
**Bids** | [**List<Bid>**](Bid.md) | List of open bids for the stack. |

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

23 changes: 19 additions & 4 deletions src/Packages/ZkEvmApi/Runtime/Model/NFTBundle.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,9 @@ protected NFTBundle() { }
/// </summary>
/// <param name="nftWithStack">nftWithStack (required).</param>
/// <param name="market">market (required).</param>
/// <param name="listings">List of open listings for the stack. (required).</param>
public NFTBundle(NFTWithStack nftWithStack = default(NFTWithStack), Market market = default(Market), List<Listing> listings = default(List<Listing>))
/// <param name="listings">List of open listings for the NFT. (required).</param>
/// <param name="bids">List of open bids for the NFT. (required).</param>
public NFTBundle(NFTWithStack nftWithStack = default(NFTWithStack), Market market = default(Market), List<Listing> listings = default(List<Listing>), List<Bid> bids = default(List<Bid>))
{
// to ensure "nftWithStack" is required (not null)
if (nftWithStack == null)
Expand All @@ -62,6 +63,12 @@ protected NFTBundle() { }
throw new ArgumentNullException("listings is a required property for NFTBundle and cannot be null");
}
this.Listings = listings;
// to ensure "bids" is required (not null)
if (bids == null)
{
throw new ArgumentNullException("bids is a required property for NFTBundle and cannot be null");
}
this.Bids = bids;
}

/// <summary>
Expand All @@ -77,12 +84,19 @@ protected NFTBundle() { }
public Market Market { get; set; }

/// <summary>
/// List of open listings for the stack.
/// List of open listings for the NFT.
/// </summary>
/// <value>List of open listings for the stack.</value>
/// <value>List of open listings for the NFT.</value>
[DataMember(Name = "listings", IsRequired = true, EmitDefaultValue = true)]
public List<Listing> Listings { get; set; }

/// <summary>
/// List of open bids for the NFT.
/// </summary>
/// <value>List of open bids for the NFT.</value>
[DataMember(Name = "bids", IsRequired = true, EmitDefaultValue = true)]
public List<Bid> Bids { get; set; }

/// <summary>
/// Returns the string presentation of the object
/// </summary>
Expand All @@ -94,6 +108,7 @@ public override string ToString()
sb.Append(" NftWithStack: ").Append(NftWithStack).Append("\n");
sb.Append(" Market: ").Append(Market).Append("\n");
sb.Append(" Listings: ").Append(Listings).Append("\n");
sb.Append(" Bids: ").Append(Bids).Append("\n");
sb.Append("}\n");
return sb.ToString();
}
Expand Down
17 changes: 16 additions & 1 deletion src/Packages/ZkEvmApi/Runtime/Model/StackBundle.cs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ protected StackBundle() { }
/// <param name="stackCount">Total count of NFTs in the stack matching the filter params (required).</param>
/// <param name="market">market (required).</param>
/// <param name="listings">List of open listings for the stack. (required).</param>
public StackBundle(Stack stack = default(Stack), int stackCount = default(int), Market market = default(Market), List<Listing> listings = default(List<Listing>))
/// <param name="bids">List of open bids for the stack. (required).</param>
public StackBundle(Stack stack = default(Stack), int stackCount = default(int), Market market = default(Market), List<Listing> listings = default(List<Listing>), List<Bid> bids = default(List<Bid>))
{
// to ensure "stack" is required (not null)
if (stack == null)
Expand All @@ -64,6 +65,12 @@ protected StackBundle() { }
throw new ArgumentNullException("listings is a required property for StackBundle and cannot be null");
}
this.Listings = listings;
// to ensure "bids" is required (not null)
if (bids == null)
{
throw new ArgumentNullException("bids is a required property for StackBundle and cannot be null");
}
this.Bids = bids;
}

/// <summary>
Expand Down Expand Up @@ -93,6 +100,13 @@ protected StackBundle() { }
[DataMember(Name = "listings", IsRequired = true, EmitDefaultValue = true)]
public List<Listing> Listings { get; set; }

/// <summary>
/// List of open bids for the stack.
/// </summary>
/// <value>List of open bids for the stack.</value>
[DataMember(Name = "bids", IsRequired = true, EmitDefaultValue = true)]
public List<Bid> Bids { get; set; }

/// <summary>
/// Returns the string presentation of the object
/// </summary>
Expand All @@ -105,6 +119,7 @@ public override string ToString()
sb.Append(" StackCount: ").Append(StackCount).Append("\n");
sb.Append(" Market: ").Append(Market).Append("\n");
sb.Append(" Listings: ").Append(Listings).Append("\n");
sb.Append(" Bids: ").Append(Bids).Append("\n");
sb.Append("}\n");
return sb.ToString();
}
Expand Down
Loading

0 comments on commit 3f4f60d

Please sign in to comment.