/// <summary>
 /// Initializes a new instance of the <see cref="POSTAccountType" /> class.
 /// </summary>
 /// <param name="AccountNumber">A unique account number, up to 50 characters that do not begin with the default account number prefix.  If no account number is specified, one is generated. .</param>
 /// <param name="ApplyCreditBalance">Applies a credit balance to an invoice.   If the value is &#x60;true&#x60;, the credit balance is applied to the invoice. If the value is &#x60;false&#x60;, no action is taken.  Prerequisite: &#x60;invoice&#x60; must be &#x60;true&#x60;.   **Note:** If you are using the field &#x60;invoiceCollect&#x60; rather than the field &#x60;invoice&#x60;, the &#x60;invoiceCollect&#x60; value must be &#x60;true&#x60;.  To view the credit balance adjustment, retrieve the details of the invoice using the Get Invoices method. .</param>
 /// <param name="AutoPay">Specifies whether future payments are to be automatically billed when they are due. Possible values are: &#x60;true&#x60;, &#x60;false&#x60;. .</param>
 /// <param name="Batch">The alias name given to a batch. A string of 50 characters or less. .</param>
 /// <param name="BillCycleDay">The account&#39;s bill cycle day (BCD), when bill runs generate invoices for the account.  Specify any day of the month (1-31, where 31 &#x3D; end-of-month), or 0 for auto-set.  Required if no subscription will be created.   Optional if a subscription is created and defaults to the day-of-the-month of the subscription&#39;s &#x60;contractEffectiveDate&#x60;. .</param>
 /// <param name="BillToContact">BillToContact.</param>
 /// <param name="Collect">Collects an automatic payment for a subscription. The collection generated in this operation is only for this subscription, not for the entire customer account.  If the value is &#x60;true&#x60;, the automatic payment is collected. If the value is &#x60;false&#x60;, no action is taken.  The default value is &#x60;true&#x60;.  Prerequisite: invoice must be &#x60;true&#x60;.   **Note:** This field is in Zuora REST API version control. Supported minor versions are 196.0 or later. To use this field in the method, you must set the &#x60;zuora-version&#x60; parameter to the minor version number in the request header. See [Zuora REST API Versions](https://knowledgecenter.zuora.com/DC_Developers/REST_API/A_REST_basics) for more information. .</param>
 /// <param name="CommunicationProfileId">The ID of a [communication profile](https://knowledgecenter.zuora.com/DC_Developers/SOAP_API/E1_SOAP_API_Object_Reference/Communication_Profile).  .</param>
 /// <param name="CreditCard">CreditCard.</param>
 /// <param name="CrmId">CRM account ID for the account, up to 100 characters. .</param>
 /// <param name="Currency">A currency as defined in [Billing Settings in the Zuora UI](https://knowledgecenter.zuora.com/CB_Billing/Billing_Settings/Customize_Currencies).  (required).</param>
 /// <param name="CustomFieldC">Any custom fields defined for this object. .</param>
 /// <param name="HpmCreditCardPaymentMethodId">The ID of the HPM credit card payment method associated with this account. You must provide either this field or the &#x60;creditCard&#x60; structure, but not both.  **Note:** Non-credit card payment methods are not supported. .</param>
 /// <param name="Invoice">Creates an invoice for a subscription. The invoice generated in this operation is only for this subscription, not for the entire customer account.  If the value is &#x60;true&#x60;, an invoice is created. If the value is &#x60;false&#x60;, no action is taken.  The default value is &#x60;true&#x60;.   **Note:** This field is in Zuora REST API version control. Supported minor versions are 196.0 or later. To use this field in the method, you must set the &#x60;zuora-version&#x60; parameter to the minor version number in the request header. See [Zuora REST API Versions](https://knowledgecenter.zuora.com/DC_Developers/REST_API/A_REST_basics) for more information. .</param>
 /// <param name="InvoiceCollect">**Note:** This field has been replaced by the &#x60;invoice&#x60; field and the &#x60;collect&#x60; field. &#x60;invoiceCollect&#x60; is available only for backward compatibility.  If &#x60;true&#x60; (default), and a subscription is created, an invoice is generated at account creation time and payment is immediately collected using the account&#39;s default payment method.  This field is in Zuora REST API version control. Supported minor versions are 186.0, 187.0, 188.0, 189.0, and 196.0. See [Zuora REST API Versions](https://knowledgecenter.zuora.com/DC_Developers/REST_API/A_REST_basics) for more information. .</param>
 /// <param name="InvoiceTargetDate">If &#x60;invoiceCollect&#x60; is true, the target date for the invoice (that is, the date through which charges should be calculated). In &#x60;yyyy-mm-dd&#x60; format; defaults to the current date. .</param>
 /// <param name="InvoiceTemplateId">Invoice template ID, configured in [Billing Settings in the Zuora UI](https://knowledgecenter.zuora.com/CB_Billing/IA_Invoices/Creating_a_Custom_Invoice_Template). .</param>
 /// <param name="Name">Account name, up to 255 characters.  (required).</param>
 /// <param name="Notes">A string of up to 65,535 characters. .</param>
 /// <param name="PaymentGateway">The name of the payment gateway instance. If null or left unassigned, the Account will use the Default Gateway. .</param>
 /// <param name="PaymentTerm">Payment terms for this account. Possible values are: &#x60;Due Upon Receipt&#x60;, &#x60;Net 30&#x60;, &#x60;Net 60&#x60;, &#x60;Net 90&#x60;. .</param>
 /// <param name="SoldToContact">SoldToContact.</param>
 /// <param name="Subscription">Subscription.</param>
 /// <param name="Tagging">dummy.</param>
 /// <param name="TaxInfo">TaxInfo.</param>
 public POSTAccountType(string AccountNumber = null, bool?ApplyCreditBalance = null, bool?AutoPay = null, string Batch = null, long?BillCycleDay = null, POSTAccountTypeBillToContact BillToContact = null, string Collect = null, string CommunicationProfileId = null, POSTAccountTypeCreditCard CreditCard = null, string CrmId = null, string Currency = null, string CustomFieldC = null, string HpmCreditCardPaymentMethodId = null, string Invoice = null, bool?InvoiceCollect = null, DateTime?InvoiceTargetDate = null, string InvoiceTemplateId = null, string Name = null, string Notes = null, string PaymentGateway = null, string PaymentTerm = null, POSTAccountTypeSoldToContact SoldToContact = null, POSTAccountTypeSubscription Subscription = null, string Tagging = null, POSTAccountTypeTaxInfo TaxInfo = null)
 {
     // to ensure "Currency" is required (not null)
     if (Currency == null)
     {
         throw new InvalidDataException("Currency is a required property for POSTAccountType and cannot be null");
     }
     else
     {
         this.Currency = Currency;
     }
     // to ensure "Name" is required (not null)
     if (Name == null)
     {
         throw new InvalidDataException("Name is a required property for POSTAccountType and cannot be null");
     }
     else
     {
         this.Name = Name;
     }
     this.AccountNumber      = AccountNumber;
     this.ApplyCreditBalance = ApplyCreditBalance;
     this.AutoPay            = AutoPay;
     this.Batch                        = Batch;
     this.BillCycleDay                 = BillCycleDay;
     this.BillToContact                = BillToContact;
     this.Collect                      = Collect;
     this.CommunicationProfileId       = CommunicationProfileId;
     this.CreditCard                   = CreditCard;
     this.CrmId                        = CrmId;
     this.CustomFieldC                 = CustomFieldC;
     this.HpmCreditCardPaymentMethodId = HpmCreditCardPaymentMethodId;
     this.Invoice                      = Invoice;
     this.InvoiceCollect               = InvoiceCollect;
     this.InvoiceTargetDate            = InvoiceTargetDate;
     this.InvoiceTemplateId            = InvoiceTemplateId;
     this.Notes                        = Notes;
     this.PaymentGateway               = PaymentGateway;
     this.PaymentTerm                  = PaymentTerm;
     this.SoldToContact                = SoldToContact;
     this.Subscription                 = Subscription;
     this.Tagging                      = Tagging;
     this.TaxInfo                      = TaxInfo;
 }
Exemple #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="PUTAccountType" /> class.
 /// </summary>
 /// <param name="AutoPay">Specifies whether future payments are to be automatically billed when they are due. Possible values are: &#x60;true&#x60;, &#x60;false&#x60;. .</param>
 /// <param name="Batch">The alias name given to a batch. A string of 50 characters or less. .</param>
 /// <param name="BillToContact">BillToContact.</param>
 /// <param name="CommunicationProfileId">The ID of a [communication profile](https://knowledgecenter.zuora.com/DC_Developers/SOAP_API/E1_SOAP_API_Object_Reference/Communication_Profile). .</param>
 /// <param name="CrmId">CRM account ID for the account, up to 100 characters. .</param>
 /// <param name="CustomFieldC">Any custom fields defined for this object. .</param>
 /// <param name="InvoiceTemplateId">Invoice template ID, configured in [Billing Settings in the Zuora UI](https://knowledgecenter.zuora.com/CB_Billing/IA_Invoices/Creating_a_Custom_Invoice_Template). .</param>
 /// <param name="Name">Account name, up to 255 characters. .</param>
 /// <param name="Notes">A string of up to 65,535 characters. .</param>
 /// <param name="PaymentGateway">The name of the payment gateway instance. If null or left unassigned, the Account will use the Default Gateway. .</param>
 /// <param name="SoldToContact">SoldToContact.</param>
 /// <param name="Tagging">dummy.</param>
 /// <param name="TaxInfo">TaxInfo.</param>
 public PUTAccountType(bool?AutoPay = null, string Batch = null, PUTAccountTypeBillToContact BillToContact = null, string CommunicationProfileId = null, string CrmId = null, string CustomFieldC = null, string InvoiceTemplateId = null, string Name = null, string Notes = null, string PaymentGateway = null, PUTAccountTypeSoldToContact SoldToContact = null, string Tagging = null, POSTAccountTypeTaxInfo TaxInfo = null)
 {
     this.AutoPay                = AutoPay;
     this.Batch                  = Batch;
     this.BillToContact          = BillToContact;
     this.CommunicationProfileId = CommunicationProfileId;
     this.CrmId                  = CrmId;
     this.CustomFieldC           = CustomFieldC;
     this.InvoiceTemplateId      = InvoiceTemplateId;
     this.Name           = Name;
     this.Notes          = Notes;
     this.PaymentGateway = PaymentGateway;
     this.SoldToContact  = SoldToContact;
     this.Tagging        = Tagging;
     this.TaxInfo        = TaxInfo;
 }