/// <summary> /// Initializes a new instance of the <see cref="CreateCustomerInvoice" /> class. /// </summary> /// <param name="_Ref">Optional reference to avoid double creations. Only one invoice can be created per reference..</param> /// <param name="OrderLines">Orderlines for the invoice (required).</param> /// <param name="ManualTransfer">Optional manual tranfer. If given the invoice will be settled using the manual transfer transaction..</param> /// <param name="PaymentMethod">Payment method id to use for invoice. Must be provided if no manual transfer is given..</param> public CreateCustomerInvoice(string _Ref = null, List <CreateOrderLine> OrderLines = null, ManualSettleTransfer ManualTransfer = null, string PaymentMethod = null) { // to ensure "OrderLines" is required (not null) if (OrderLines == null) { throw new InvalidDataException("OrderLines is a required property for CreateCustomerInvoice and cannot be null"); } else { this.OrderLines = OrderLines; } this._Ref = _Ref; this.ManualTransfer = ManualTransfer; this.PaymentMethod = PaymentMethod; }
/// <summary> /// Initializes a new instance of the <see cref="CreateSubscriptionInvoice" /> class. /// </summary> /// <param name="_Ref">Optional reference to avoid double creations. Only one invoice can be created per reference..</param> /// <param name="Instant">Create and process transaction instantly and only create invoice for successful transaction (default false) (default to false).</param> /// <param name="Due">Optional due date and time on the form yyyy-MM-dd, yyyyMMdd, yyyy-MM-ddTHH:mm and yyyy-MM-ddTHH:mm:ss from which the invoice is eligible to be collected.</param> /// <param name="PlanManual">Create manually for plan by adding plan product as orderline (default false) (default to false).</param> /// <param name="CollectAdditionalCosts">Collect pending additional costs and transfer to invoice (default true) (default to false).</param> /// <param name="CollectCredit">Collect pending credit and transfer to invoice (default true) (default to false).</param> /// <param name="ApplyDiscounts">Apply potential discounts for the subscription to the invoice order lines (default true) (default to false).</param> /// <param name="OrderLines">Optional orderlines for the invoice.</param> /// <param name="ManualTransfer">Optional manual tranfer. If given the invoice will be settled using the manual transfer transaction..</param> public CreateSubscriptionInvoice(string _Ref = null, bool?Instant = null, string Due = null, bool?PlanManual = null, bool?CollectAdditionalCosts = null, bool?CollectCredit = null, bool?ApplyDiscounts = null, List <CreateOrderLine> OrderLines = null, ManualSettleTransfer ManualTransfer = null) { this._Ref = _Ref; // use default value if no "Instant" provided if (Instant == null) { this.Instant = false; } else { this.Instant = Instant; } this.Due = Due; // use default value if no "PlanManual" provided if (PlanManual == null) { this.PlanManual = false; } else { this.PlanManual = PlanManual; } // use default value if no "CollectAdditionalCosts" provided if (CollectAdditionalCosts == null) { this.CollectAdditionalCosts = false; } else { this.CollectAdditionalCosts = CollectAdditionalCosts; } // use default value if no "CollectCredit" provided if (CollectCredit == null) { this.CollectCredit = false; } else { this.CollectCredit = CollectCredit; } // use default value if no "ApplyDiscounts" provided if (ApplyDiscounts == null) { this.ApplyDiscounts = false; } else { this.ApplyDiscounts = ApplyDiscounts; } this.OrderLines = OrderLines; this.ManualTransfer = ManualTransfer; }