/// <summary>
        /// Initializes a new instance of the <see cref="InvoicePreview" /> class.
        /// </summary>
        /// <param name="collectionMethod">collectionMethod (required).</param>
        /// <param name="currency">currency (required).</param>
        /// <param name="customer">customer (required).</param>
        /// <param name="lines">lines (required).</param>
        /// <param name="periodStart">periodStart (required).</param>
        /// <param name="periodEnd">periodEnd (required).</param>
        /// <param name="status">status (required).</param>
        /// <param name="statusTransitions">statusTransitions (required).</param>
        /// <param name="subtotal">subtotal (required).</param>
        /// <param name="total">total (required).</param>
        /// <param name="autoAdvance">autoAdvance.</param>
        /// <param name="description">description.</param>
        /// <param name="hostedInvoiceUrl">hostedInvoiceUrl.</param>
        /// <param name="subscription">subscription.</param>
        /// <param name="discount">discount.</param>
        /// <param name="totalDiscountAmounts">totalDiscountAmounts.</param>
        /// <param name="paymentMethod">The payment method that will be billed when this invoice is due..</param>
        public InvoicePreview
        (
            string collectionMethod, string currency, string customer, LineItemList lines, DateTime periodStart, DateTime periodEnd, InvoiceStatus status, InvoiceStatusTransitions statusTransitions, int subtotal, int total,                               // Required parameters
            bool autoAdvance = default, string description = default, string hostedInvoiceUrl = default, string subscription = default, Discount discount = default, List <DiscountAmount> totalDiscountAmounts = default, CardPublic paymentMethod = default // Optional parameters
        ) : base()                                                                                                                                                                                                                                            // BaseClass
        {
            // to ensure "collectionMethod" is required (not null)
            this.CollectionMethod = collectionMethod ?? throw new ArgumentNullException("collectionMethod is a required property for InvoicePreview and cannot be null");
            // to ensure "currency" is required (not null)
            this.Currency = currency ?? throw new ArgumentNullException("currency is a required property for InvoicePreview and cannot be null");
            // to ensure "customer" is required (not null)
            this.Customer = customer ?? throw new ArgumentNullException("customer is a required property for InvoicePreview and cannot be null");
            // to ensure "lines" is required (not null)
            this.Lines       = lines ?? throw new ArgumentNullException("lines is a required property for InvoicePreview and cannot be null");
            this.PeriodStart = periodStart;
            this.PeriodEnd   = periodEnd;
            this.Status      = status;
            // to ensure "statusTransitions" is required (not null)
            this.StatusTransitions    = statusTransitions ?? throw new ArgumentNullException("statusTransitions is a required property for InvoicePreview and cannot be null");
            this.Subtotal             = subtotal;
            this.Total                = total;
            this.AutoAdvance          = autoAdvance;
            this.Description          = description;
            this.HostedInvoiceUrl     = hostedInvoiceUrl;
            this.Subscription         = subscription;
            this.Discount             = discount;
            this.TotalDiscountAmounts = totalDiscountAmounts;
            this.PaymentMethod        = paymentMethod;

            // Set non-required readonly properties with defaultValue
            this.Type = "InvoicePreview";
        }
Exemple #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Invoice" /> class.
 /// </summary>
 /// <param name="collectionMethod">collectionMethod (required).</param>
 /// <param name="currency">currency (required).</param>
 /// <param name="customer">customer (required).</param>
 /// <param name="lines">lines (required).</param>
 /// <param name="periodStart">periodStart (required).</param>
 /// <param name="periodEnd">periodEnd (required).</param>
 /// <param name="status">status (required).</param>
 /// <param name="statusTransitions">statusTransitions (required).</param>
 /// <param name="subtotal">subtotal (required).</param>
 /// <param name="total">total (required).</param>
 /// <param name="autoAdvance">autoAdvance.</param>
 /// <param name="description">description.</param>
 /// <param name="hostedInvoiceUrl">hostedInvoiceUrl.</param>
 /// <param name="subscription">subscription.</param>
 /// <param name="discount">discount.</param>
 /// <param name="totalDiscountAmounts">totalDiscountAmounts.</param>
 /// <param name="paymentMethod">The payment method that will be billed when this invoice is due..</param>
 public Invoice
 (
     string collectionMethod, string currency, string customer, LineItemList lines, DateTime periodStart, DateTime periodEnd, InvoiceStatus status, InvoiceStatusTransitions statusTransitions, int subtotal, int total,                                                                                                                                                                                                                                      // Required parameters
     bool autoAdvance = default, string description = default, string hostedInvoiceUrl = default, string subscription = default, Discount discount = default, List <DiscountAmount> totalDiscountAmounts = default, CardPublic paymentMethod = default                                                                                                                                                                                                        // Optional parameters
 ) : base(collectionMethod: collectionMethod, currency: currency, customer: customer, lines: lines, periodStart: periodStart, periodEnd: periodEnd, status: status, statusTransitions: statusTransitions, subtotal: subtotal, total: total, autoAdvance: autoAdvance, description: description, hostedInvoiceUrl: hostedInvoiceUrl, subscription: subscription, discount: discount, totalDiscountAmounts: totalDiscountAmounts, paymentMethod: paymentMethod) // BaseClass
 {
     // Set non-required readonly properties with defaultValue
     this.Type = "Invoice";
 }