/// <summary> /// Initializes a new instance of the <see cref="IssueTokenRequest" /> class. /// </summary> /// <param name="issueAddress">Address issuing the token (required).</param> /// <param name="amount">Number of tokens to issue (required).</param> /// <param name="divisibility">Number of decimal places the token should be divisble by (0-7) (required).</param> /// <param name="fee">Fee in satoshi to include in the issuance transaction min 1000000000 (10 NEBL) (required).</param> /// <param name="reissuable">whether the token should be reissuable (required).</param> /// <param name="flags">flags.</param> /// <param name="transfer">transfer (required).</param> /// <param name="metadata">metadata.</param> public IssueTokenRequest(string issueAddress = default(string), decimal?amount = default(decimal?), decimal?divisibility = default(decimal?), decimal?fee = default(decimal?), bool?reissuable = default(bool?), IssueTokenRequestFlags flags = default(IssueTokenRequestFlags), List <IssueTokenRequestTransfer> transfer = default(List <IssueTokenRequestTransfer>), IssueTokenRequestMetadata metadata = default(IssueTokenRequestMetadata)) { // to ensure "issueAddress" is required (not null) if (issueAddress == null) { throw new InvalidDataException("issueAddress is a required property for IssueTokenRequest and cannot be null"); } else { this.IssueAddress = issueAddress; } // to ensure "amount" is required (not null) if (amount == null) { throw new InvalidDataException("amount is a required property for IssueTokenRequest and cannot be null"); } else { this.Amount = amount; } // to ensure "divisibility" is required (not null) if (divisibility == null) { throw new InvalidDataException("divisibility is a required property for IssueTokenRequest and cannot be null"); } else { this.Divisibility = divisibility; } // to ensure "fee" is required (not null) if (fee == null) { throw new InvalidDataException("fee is a required property for IssueTokenRequest and cannot be null"); } else { this.Fee = fee; } // to ensure "reissuable" is required (not null) if (reissuable == null) { throw new InvalidDataException("reissuable is a required property for IssueTokenRequest and cannot be null"); } else { this.Reissuable = reissuable; } // to ensure "transfer" is required (not null) if (transfer == null) { throw new InvalidDataException("transfer is a required property for IssueTokenRequest and cannot be null"); } else { this.Transfer = transfer; } this.Flags = flags; this.Metadata = metadata; }
/// <summary> /// Initializes a new instance of the <see cref="SendTokenRequest" /> class. /// </summary> /// <param name="fee">Fee in satoshi to include in the issuance transaction min 10000 (0.0001 NEBL) (required).</param> /// <param name="from">Array of addresses to send the token from.</param> /// <param name="sendutxo">Array of UTXOs to send the token from.</param> /// <param name="to">to (required).</param> /// <param name="flags">flags.</param> /// <param name="metadata">metadata.</param> public SendTokenRequest(decimal?fee = default(decimal?), List <string> from = default(List <string>), List <string> sendutxo = default(List <string>), List <SendTokenRequestTo> to = default(List <SendTokenRequestTo>), IssueTokenRequestFlags flags = default(IssueTokenRequestFlags), IssueTokenRequestMetadata metadata = default(IssueTokenRequestMetadata)) { // to ensure "fee" is required (not null) if (fee == null) { throw new InvalidDataException("fee is a required property for SendTokenRequest and cannot be null"); } else { this.Fee = fee; } // to ensure "to" is required (not null) if (to == null) { throw new InvalidDataException("to is a required property for SendTokenRequest and cannot be null"); } else { this.To = to; } this.From = from; this.Sendutxo = sendutxo; this.Flags = flags; this.Metadata = metadata; }