Skip to content

Commit f4e260f

Browse files
authored
Merge pull request #357 from immutable/feat/update-zkevm-api-2024-11-20-10-05-08
feat: update immutable zkEVM API package
2 parents 8e58151 + 53851a6 commit f4e260f

File tree

6 files changed

+259
-1
lines changed

6 files changed

+259
-1
lines changed
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Immutable.Api.ZkEvm.Model.Bid
2+
3+
## Properties
4+
5+
Name | Type | Description | Notes
6+
------------ | ------------- | ------------- | -------------
7+
**BidId** | **string** | Global Order identifier |
8+
**PriceDetails** | [**MarketPriceDetails**](MarketPriceDetails.md) | |
9+
**TokenId** | **string** | Token ID. Null for collection bids that can be fulfilled by any asset in the collection |
10+
**ContractAddress** | **string** | ETH Address of collection that the asset belongs to |
11+
**Creator** | **string** | ETH Address of listing creator |
12+
**Amount** | **string** | Amount of token included in the listing |
13+
14+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
15+

src/Packages/ZkEvmApi/Documentation~/Market.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ Market data
66
Name | Type | Description | Notes
77
------------ | ------------- | ------------- | -------------
88
**FloorListing** | [**Listing**](Listing.md) | Cheapest active listing |
9+
**TopBid** | [**Bid**](Bid.md) | Highest active big |
910
**LastTrade** | [**LastTrade**](LastTrade.md) | |
1011

1112
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
Lines changed: 163 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,163 @@
1+
/*
2+
* Immutable zkEVM API
3+
*
4+
* Immutable Multi Rollup API
5+
*
6+
* The version of the OpenAPI document: 1.0.0
7+
* Contact: [email protected]
8+
* Generated by: https://github.com/openapitools/openapi-generator.git
9+
*/
10+
11+
12+
using System;
13+
using System.Collections;
14+
using System.Collections.Generic;
15+
using System.Collections.ObjectModel;
16+
using System.Linq;
17+
using System.IO;
18+
using System.Runtime.Serialization;
19+
using System.Text;
20+
using System.Text.RegularExpressions;
21+
using Newtonsoft.Json;
22+
using Newtonsoft.Json.Converters;
23+
using Newtonsoft.Json.Linq;
24+
using OpenAPIDateConverter = Immutable.Api.ZkEvm.Client.OpenAPIDateConverter;
25+
26+
namespace Immutable.Api.ZkEvm.Model
27+
{
28+
/// <summary>
29+
/// Bid
30+
/// </summary>
31+
[DataContract(Name = "Bid")]
32+
public partial class Bid
33+
{
34+
/// <summary>
35+
/// Initializes a new instance of the <see cref="Bid" /> class.
36+
/// </summary>
37+
[JsonConstructorAttribute]
38+
protected Bid() { }
39+
/// <summary>
40+
/// Initializes a new instance of the <see cref="Bid" /> class.
41+
/// </summary>
42+
/// <param name="bidId">Global Order identifier (required).</param>
43+
/// <param name="priceDetails">priceDetails (required).</param>
44+
/// <param name="tokenId">Token ID. Null for collection bids that can be fulfilled by any asset in the collection (required).</param>
45+
/// <param name="contractAddress">ETH Address of collection that the asset belongs to (required).</param>
46+
/// <param name="creator">ETH Address of listing creator (required).</param>
47+
/// <param name="amount">Amount of token included in the listing (required).</param>
48+
public Bid(string bidId = default(string), MarketPriceDetails priceDetails = default(MarketPriceDetails), string tokenId = default(string), string contractAddress = default(string), string creator = default(string), string amount = default(string))
49+
{
50+
// to ensure "bidId" is required (not null)
51+
if (bidId == null)
52+
{
53+
throw new ArgumentNullException("bidId is a required property for Bid and cannot be null");
54+
}
55+
this.BidId = bidId;
56+
// to ensure "priceDetails" is required (not null)
57+
if (priceDetails == null)
58+
{
59+
throw new ArgumentNullException("priceDetails is a required property for Bid and cannot be null");
60+
}
61+
this.PriceDetails = priceDetails;
62+
// to ensure "tokenId" is required (not null)
63+
if (tokenId == null)
64+
{
65+
throw new ArgumentNullException("tokenId is a required property for Bid and cannot be null");
66+
}
67+
this.TokenId = tokenId;
68+
// to ensure "contractAddress" is required (not null)
69+
if (contractAddress == null)
70+
{
71+
throw new ArgumentNullException("contractAddress is a required property for Bid and cannot be null");
72+
}
73+
this.ContractAddress = contractAddress;
74+
// to ensure "creator" is required (not null)
75+
if (creator == null)
76+
{
77+
throw new ArgumentNullException("creator is a required property for Bid and cannot be null");
78+
}
79+
this.Creator = creator;
80+
// to ensure "amount" is required (not null)
81+
if (amount == null)
82+
{
83+
throw new ArgumentNullException("amount is a required property for Bid and cannot be null");
84+
}
85+
this.Amount = amount;
86+
}
87+
88+
/// <summary>
89+
/// Global Order identifier
90+
/// </summary>
91+
/// <value>Global Order identifier</value>
92+
/// <example>018792C9-4AD7-8EC4-4038-9E05C598534A</example>
93+
[DataMember(Name = "bid_id", IsRequired = true, EmitDefaultValue = true)]
94+
public string BidId { get; set; }
95+
96+
/// <summary>
97+
/// Gets or Sets PriceDetails
98+
/// </summary>
99+
[DataMember(Name = "price_details", IsRequired = true, EmitDefaultValue = true)]
100+
public MarketPriceDetails PriceDetails { get; set; }
101+
102+
/// <summary>
103+
/// Token ID. Null for collection bids that can be fulfilled by any asset in the collection
104+
/// </summary>
105+
/// <value>Token ID. Null for collection bids that can be fulfilled by any asset in the collection</value>
106+
/// <example>1</example>
107+
[DataMember(Name = "token_id", IsRequired = true, EmitDefaultValue = true)]
108+
public string TokenId { get; set; }
109+
110+
/// <summary>
111+
/// ETH Address of collection that the asset belongs to
112+
/// </summary>
113+
/// <value>ETH Address of collection that the asset belongs to</value>
114+
/// <example>0xe9b00a87700f660e46b6f5deaa1232836bcc07d3</example>
115+
[DataMember(Name = "contract_address", IsRequired = true, EmitDefaultValue = true)]
116+
public string ContractAddress { get; set; }
117+
118+
/// <summary>
119+
/// ETH Address of listing creator
120+
/// </summary>
121+
/// <value>ETH Address of listing creator</value>
122+
/// <example>0xe9b00a87700f660e46b6f5deaa1232836bcc07d3</example>
123+
[DataMember(Name = "creator", IsRequired = true, EmitDefaultValue = true)]
124+
public string Creator { get; set; }
125+
126+
/// <summary>
127+
/// Amount of token included in the listing
128+
/// </summary>
129+
/// <value>Amount of token included in the listing</value>
130+
/// <example>1</example>
131+
[DataMember(Name = "amount", IsRequired = true, EmitDefaultValue = true)]
132+
public string Amount { get; set; }
133+
134+
/// <summary>
135+
/// Returns the string presentation of the object
136+
/// </summary>
137+
/// <returns>String presentation of the object</returns>
138+
public override string ToString()
139+
{
140+
StringBuilder sb = new StringBuilder();
141+
sb.Append("class Bid {\n");
142+
sb.Append(" BidId: ").Append(BidId).Append("\n");
143+
sb.Append(" PriceDetails: ").Append(PriceDetails).Append("\n");
144+
sb.Append(" TokenId: ").Append(TokenId).Append("\n");
145+
sb.Append(" ContractAddress: ").Append(ContractAddress).Append("\n");
146+
sb.Append(" Creator: ").Append(Creator).Append("\n");
147+
sb.Append(" Amount: ").Append(Amount).Append("\n");
148+
sb.Append("}\n");
149+
return sb.ToString();
150+
}
151+
152+
/// <summary>
153+
/// Returns the JSON string presentation of the object
154+
/// </summary>
155+
/// <returns>JSON string presentation of the object</returns>
156+
public virtual string ToJson()
157+
{
158+
return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented);
159+
}
160+
161+
}
162+
163+
}

src/Packages/ZkEvmApi/Runtime/Model/Bid.cs.meta

Lines changed: 11 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Packages/ZkEvmApi/Runtime/Model/Market.cs

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,15 +40,22 @@ protected Market() { }
4040
/// Initializes a new instance of the <see cref="Market" /> class.
4141
/// </summary>
4242
/// <param name="floorListing">Cheapest active listing (required).</param>
43+
/// <param name="topBid">Highest active big (required).</param>
4344
/// <param name="lastTrade">lastTrade (required).</param>
44-
public Market(Listing floorListing = default(Listing), LastTrade lastTrade = default(LastTrade))
45+
public Market(Listing floorListing = default(Listing), Bid topBid = default(Bid), LastTrade lastTrade = default(LastTrade))
4546
{
4647
// to ensure "floorListing" is required (not null)
4748
if (floorListing == null)
4849
{
4950
throw new ArgumentNullException("floorListing is a required property for Market and cannot be null");
5051
}
5152
this.FloorListing = floorListing;
53+
// to ensure "topBid" is required (not null)
54+
if (topBid == null)
55+
{
56+
throw new ArgumentNullException("topBid is a required property for Market and cannot be null");
57+
}
58+
this.TopBid = topBid;
5259
// to ensure "lastTrade" is required (not null)
5360
if (lastTrade == null)
5461
{
@@ -64,6 +71,13 @@ protected Market() { }
6471
[DataMember(Name = "floor_listing", IsRequired = true, EmitDefaultValue = true)]
6572
public Listing FloorListing { get; set; }
6673

74+
/// <summary>
75+
/// Highest active big
76+
/// </summary>
77+
/// <value>Highest active big</value>
78+
[DataMember(Name = "top_bid", IsRequired = true, EmitDefaultValue = true)]
79+
public Bid TopBid { get; set; }
80+
6781
/// <summary>
6882
/// Gets or Sets LastTrade
6983
/// </summary>
@@ -79,6 +93,7 @@ public override string ToString()
7993
StringBuilder sb = new StringBuilder();
8094
sb.Append("class Market {\n");
8195
sb.Append(" FloorListing: ").Append(FloorListing).Append("\n");
96+
sb.Append(" TopBid: ").Append(TopBid).Append("\n");
8297
sb.Append(" LastTrade: ").Append(LastTrade).Append("\n");
8398
sb.Append("}\n");
8499
return sb.ToString();

0 commit comments

Comments
 (0)