Skip to content

feat: update immutable zkEVM API package #357

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions src/Packages/ZkEvmApi/Documentation~/Bid.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Immutable.Api.ZkEvm.Model.Bid

## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**BidId** | **string** | Global Order identifier |
**PriceDetails** | [**MarketPriceDetails**](MarketPriceDetails.md) | |
**TokenId** | **string** | Token ID. Null for collection bids that can be fulfilled by any asset in the collection |
**ContractAddress** | **string** | ETH Address of collection that the asset belongs to |
**Creator** | **string** | ETH Address of listing creator |
**Amount** | **string** | Amount of token included in the listing |

[[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~/Market.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ Market data
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**FloorListing** | [**Listing**](Listing.md) | Cheapest active listing |
**TopBid** | [**Bid**](Bid.md) | Highest active big |
**LastTrade** | [**LastTrade**](LastTrade.md) | |

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
Expand Down
163 changes: 163 additions & 0 deletions src/Packages/ZkEvmApi/Runtime/Model/Bid.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,163 @@
/*
* Immutable zkEVM API
*
* Immutable Multi Rollup API
*
* The version of the OpenAPI document: 1.0.0
* Contact: [email protected]
* Generated by: https://github.com/openapitools/openapi-generator.git
*/


using System;
using System.Collections;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.IO;
using System.Runtime.Serialization;
using System.Text;
using System.Text.RegularExpressions;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using Newtonsoft.Json.Linq;
using OpenAPIDateConverter = Immutable.Api.ZkEvm.Client.OpenAPIDateConverter;

namespace Immutable.Api.ZkEvm.Model
{
/// <summary>
/// Bid
/// </summary>
[DataContract(Name = "Bid")]
public partial class Bid
{
/// <summary>
/// Initializes a new instance of the <see cref="Bid" /> class.
/// </summary>
[JsonConstructorAttribute]
protected Bid() { }
/// <summary>
/// Initializes a new instance of the <see cref="Bid" /> class.
/// </summary>
/// <param name="bidId">Global Order identifier (required).</param>
/// <param name="priceDetails">priceDetails (required).</param>
/// <param name="tokenId">Token ID. Null for collection bids that can be fulfilled by any asset in the collection (required).</param>
/// <param name="contractAddress">ETH Address of collection that the asset belongs to (required).</param>
/// <param name="creator">ETH Address of listing creator (required).</param>
/// <param name="amount">Amount of token included in the listing (required).</param>
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))
{
// to ensure "bidId" is required (not null)
if (bidId == null)
{
throw new ArgumentNullException("bidId is a required property for Bid and cannot be null");
}
this.BidId = bidId;
// to ensure "priceDetails" is required (not null)
if (priceDetails == null)
{
throw new ArgumentNullException("priceDetails is a required property for Bid and cannot be null");
}
this.PriceDetails = priceDetails;
// to ensure "tokenId" is required (not null)
if (tokenId == null)
{
throw new ArgumentNullException("tokenId is a required property for Bid and cannot be null");
}
this.TokenId = tokenId;
// to ensure "contractAddress" is required (not null)
if (contractAddress == null)
{
throw new ArgumentNullException("contractAddress is a required property for Bid and cannot be null");
}
this.ContractAddress = contractAddress;
// to ensure "creator" is required (not null)
if (creator == null)
{
throw new ArgumentNullException("creator is a required property for Bid and cannot be null");
}
this.Creator = creator;
// to ensure "amount" is required (not null)
if (amount == null)
{
throw new ArgumentNullException("amount is a required property for Bid and cannot be null");
}
this.Amount = amount;
}

/// <summary>
/// Global Order identifier
/// </summary>
/// <value>Global Order identifier</value>
/// <example>018792C9-4AD7-8EC4-4038-9E05C598534A</example>
[DataMember(Name = "bid_id", IsRequired = true, EmitDefaultValue = true)]
public string BidId { get; set; }

/// <summary>
/// Gets or Sets PriceDetails
/// </summary>
[DataMember(Name = "price_details", IsRequired = true, EmitDefaultValue = true)]
public MarketPriceDetails PriceDetails { get; set; }

/// <summary>
/// Token ID. Null for collection bids that can be fulfilled by any asset in the collection
/// </summary>
/// <value>Token ID. Null for collection bids that can be fulfilled by any asset in the collection</value>
/// <example>1</example>
[DataMember(Name = "token_id", IsRequired = true, EmitDefaultValue = true)]
public string TokenId { get; set; }

/// <summary>
/// ETH Address of collection that the asset belongs to
/// </summary>
/// <value>ETH Address of collection that the asset belongs to</value>
/// <example>0xe9b00a87700f660e46b6f5deaa1232836bcc07d3</example>
[DataMember(Name = "contract_address", IsRequired = true, EmitDefaultValue = true)]
public string ContractAddress { get; set; }

/// <summary>
/// ETH Address of listing creator
/// </summary>
/// <value>ETH Address of listing creator</value>
/// <example>0xe9b00a87700f660e46b6f5deaa1232836bcc07d3</example>
[DataMember(Name = "creator", IsRequired = true, EmitDefaultValue = true)]
public string Creator { get; set; }

/// <summary>
/// Amount of token included in the listing
/// </summary>
/// <value>Amount of token included in the listing</value>
/// <example>1</example>
[DataMember(Name = "amount", IsRequired = true, EmitDefaultValue = true)]
public string Amount { get; set; }

/// <summary>
/// Returns the string presentation of the object
/// </summary>
/// <returns>String presentation of the object</returns>
public override string ToString()
{
StringBuilder sb = new StringBuilder();
sb.Append("class Bid {\n");
sb.Append(" BidId: ").Append(BidId).Append("\n");
sb.Append(" PriceDetails: ").Append(PriceDetails).Append("\n");
sb.Append(" TokenId: ").Append(TokenId).Append("\n");
sb.Append(" ContractAddress: ").Append(ContractAddress).Append("\n");
sb.Append(" Creator: ").Append(Creator).Append("\n");
sb.Append(" Amount: ").Append(Amount).Append("\n");
sb.Append("}\n");
return sb.ToString();
}

/// <summary>
/// Returns the JSON string presentation of the object
/// </summary>
/// <returns>JSON string presentation of the object</returns>
public virtual string ToJson()
{
return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented);
}

}

}
11 changes: 11 additions & 0 deletions src/Packages/ZkEvmApi/Runtime/Model/Bid.cs.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 16 additions & 1 deletion src/Packages/ZkEvmApi/Runtime/Model/Market.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,22 @@ protected Market() { }
/// Initializes a new instance of the <see cref="Market" /> class.
/// </summary>
/// <param name="floorListing">Cheapest active listing (required).</param>
/// <param name="topBid">Highest active big (required).</param>
/// <param name="lastTrade">lastTrade (required).</param>
public Market(Listing floorListing = default(Listing), LastTrade lastTrade = default(LastTrade))
public Market(Listing floorListing = default(Listing), Bid topBid = default(Bid), LastTrade lastTrade = default(LastTrade))
{
// to ensure "floorListing" is required (not null)
if (floorListing == null)
{
throw new ArgumentNullException("floorListing is a required property for Market and cannot be null");
}
this.FloorListing = floorListing;
// to ensure "topBid" is required (not null)
if (topBid == null)
{
throw new ArgumentNullException("topBid is a required property for Market and cannot be null");
}
this.TopBid = topBid;
// to ensure "lastTrade" is required (not null)
if (lastTrade == null)
{
Expand All @@ -64,6 +71,13 @@ protected Market() { }
[DataMember(Name = "floor_listing", IsRequired = true, EmitDefaultValue = true)]
public Listing FloorListing { get; set; }

/// <summary>
/// Highest active big
/// </summary>
/// <value>Highest active big</value>
[DataMember(Name = "top_bid", IsRequired = true, EmitDefaultValue = true)]
public Bid TopBid { get; set; }

/// <summary>
/// Gets or Sets LastTrade
/// </summary>
Expand All @@ -79,6 +93,7 @@ public override string ToString()
StringBuilder sb = new StringBuilder();
sb.Append("class Market {\n");
sb.Append(" FloorListing: ").Append(FloorListing).Append("\n");
sb.Append(" TopBid: ").Append(TopBid).Append("\n");
sb.Append(" LastTrade: ").Append(LastTrade).Append("\n");
sb.Append("}\n");
return sb.ToString();
Expand Down
Loading
Loading