| | 1 | | using Newtonsoft.Json; |
| | 2 | | using System; |
| | 3 | | using System.Collections.Generic; |
| | 4 | | using UnityEngine; |
| | 5 | |
|
| | 6 | | namespace DCLServices.Lambdas.NamesService |
| | 7 | | { |
| | 8 | | [Serializable] |
| | 9 | | public class NamesResponse : PaginatedResponse |
| | 10 | | { |
| | 11 | | [Serializable] |
| | 12 | | public class NameEntry |
| | 13 | | { |
| | 14 | | [JsonProperty] private string name; |
| | 15 | | [JsonProperty] private string contractAddress; |
| | 16 | | [JsonProperty] private string price; |
| | 17 | |
|
| 6 | 18 | | public string Name => name; |
| 0 | 19 | | public string ContractAddress => contractAddress; |
| 0 | 20 | | public string Price => price; |
| | 21 | |
|
| 0 | 22 | | public NameEntry() |
| | 23 | | { |
| 0 | 24 | | } |
| | 25 | |
|
| 3 | 26 | | public NameEntry(string name, string contractAddress, string price) |
| | 27 | | { |
| 3 | 28 | | this.name = name; |
| 3 | 29 | | this.contractAddress = contractAddress; |
| 3 | 30 | | this.price = price; |
| 3 | 31 | | } |
| | 32 | |
|
| | 33 | | public NftInfo GetNftInfo() => |
| 0 | 34 | | new() |
| | 35 | | { |
| | 36 | | Id = contractAddress, |
| | 37 | | Category = "name", |
| | 38 | | }; |
| | 39 | | } |
| | 40 | |
|
| | 41 | | [JsonProperty] private List<NameEntry> elements; |
| | 42 | |
|
| 0 | 43 | | public IReadOnlyList<NameEntry> Elements => elements; |
| | 44 | | } |
| | 45 | | } |