|
1 | 1 | package com.cryptomarket.sdk.models; |
2 | 2 |
|
| 3 | +import java.util.Map; |
| 4 | + |
3 | 5 | import com.squareup.moshi.Json; |
4 | 6 |
|
5 | 7 | /** |
|
8 | 10 | public class Network { |
9 | 11 | private String code; |
10 | 12 | private String network; |
11 | | - @Json(name = "is_ens_available") |
12 | | - private Boolean ensAvailable; |
13 | 13 | private String protocol; |
14 | 14 | @Json(name = "default") |
15 | 15 | private Boolean defaultNetwork; |
@@ -41,6 +41,16 @@ public class Network { |
41 | 41 | private String cryptoPaymentIdName; |
42 | 42 | @Json(name = "crypto_explorer") |
43 | 43 | private String cryptoExplorer; |
| 44 | + @Json(name = "network_name") |
| 45 | + private String networkName; |
| 46 | + @Json(name = "is_ens_available") |
| 47 | + private Boolean ensAvailable; |
| 48 | + @Json(name = "contract_address") |
| 49 | + private String contractAddress; |
| 50 | + @Json(name = "is_multichain") |
| 51 | + private Boolean multichain; |
| 52 | + @Json(name = "asset_id") |
| 53 | + private Map<String, String> assetId; |
44 | 54 |
|
45 | 55 | /** |
46 | 56 | * Gets the network code |
@@ -378,6 +388,76 @@ public void setCryptoExplorer(String cryptoExplorer) { |
378 | 388 | this.cryptoExplorer = cryptoExplorer; |
379 | 389 | } |
380 | 390 |
|
| 391 | + /** |
| 392 | + * Gets the full network name of the network |
| 393 | + * |
| 394 | + * @return |
| 395 | + */ |
| 396 | + public String getNetworkName() { |
| 397 | + return networkName; |
| 398 | + } |
| 399 | + |
| 400 | + /** |
| 401 | + * Sets the network name |
| 402 | + * |
| 403 | + * @param networkName |
| 404 | + */ |
| 405 | + public void setNetworkName(String networkName) { |
| 406 | + this.networkName = networkName; |
| 407 | + } |
| 408 | + |
| 409 | + /** |
| 410 | + * Gets the contract address of the network |
| 411 | + * |
| 412 | + * @return |
| 413 | + */ |
| 414 | + public String getContractAddress() { |
| 415 | + return contractAddress; |
| 416 | + } |
| 417 | + |
| 418 | + /** |
| 419 | + * Sets the contract address of the network |
| 420 | + * |
| 421 | + * @param contractAddress |
| 422 | + */ |
| 423 | + public void setContractAddress(String contractAddress) { |
| 424 | + this.contractAddress = contractAddress; |
| 425 | + } |
| 426 | + |
| 427 | + /** |
| 428 | + * Get a flag indicating if the multichain is active for the network |
| 429 | + * |
| 430 | + * @return |
| 431 | + */ |
| 432 | + public Boolean getMultichain() { |
| 433 | + return multichain; |
| 434 | + } |
| 435 | + |
| 436 | + /** |
| 437 | + * Sets the multichain flag of the network |
| 438 | + * |
| 439 | + * @param multichain |
| 440 | + */ |
| 441 | + public void setMultichain(Boolean multichain) { |
| 442 | + this.multichain = multichain; |
| 443 | + } |
| 444 | + |
| 445 | + /** |
| 446 | + * Gets arbitrary data particular of the network |
| 447 | + * @return |
| 448 | + */ |
| 449 | + public Map<String, String> getAssetId() { |
| 450 | + return assetId; |
| 451 | + } |
| 452 | + |
| 453 | + /** |
| 454 | + * Sets the asset id, extra data of the network |
| 455 | + * @param assetId |
| 456 | + */ |
| 457 | + public void setAssetId(Map<String, String> assetId) { |
| 458 | + this.assetId = assetId; |
| 459 | + } |
| 460 | + |
381 | 461 | @Override |
382 | 462 | public String toString() { |
383 | 463 | return "Network [code=" + code + ", network=" + network + ", ensAvailable=" + ensAvailable + ", protocol=" |
|
0 commit comments