/// <summary> /// Initializes a new instance of the <see cref="PhoneRequest" /> class. /// </summary> /// <param name="fkiPhonetypeID">The unique ID of the Phonetype. Valid values: |Value|Description| |-|-| |1|Office| |2|Home| |3|Mobile| |4|Fax| |5|Pager| |6|Toll Free| (required).</param> /// <param name="ePhoneType">ePhoneType (required).</param> /// <param name="sPhoneRegion">The region of the phone number. (For a North America Number only) The region is the \"514\" section in this sample phone number: (514) 990-1516 x123.</param> /// <param name="sPhoneExchange">The exchange of the phone number. (For a North America Number only) The exchange is the \"990\" section in this sample phone number: (514) 990-1516 x123.</param> /// <param name="sPhoneNumber">The number of the phone number. (For a North America Number only) The number is the \"1516\" section in this sample phone number: (514) 990-1516 x123.</param> /// <param name="sPhoneInternational">The international phone number. (For phone numbers outside of North) Do not specify the \"011\" part of the phone number used to dial an international phone number from North America. For example for this sample phone number \"+442071838750\", you would send \"442071838750\" without the \"+\" sign..</param> /// <param name="sPhoneExtension">The extension of the phone number. The extension is the \"123\" section in this sample phone number: (514) 990-1516 x123. It can also be used with international phone numbers.</param> public PhoneRequest(int fkiPhonetypeID = default(int), FieldEPhoneType ePhoneType = default(FieldEPhoneType), string sPhoneRegion = default(string), string sPhoneExchange = default(string), string sPhoneNumber = default(string), string sPhoneInternational = default(string), string sPhoneExtension = default(string)) { // to ensure "fkiPhonetypeID" is required (not null) if (fkiPhonetypeID == null) { throw new InvalidDataException("fkiPhonetypeID is a required property for PhoneRequest and cannot be null"); } else { this.FkiPhonetypeID = fkiPhonetypeID; } // to ensure "ePhoneType" is required (not null) if (ePhoneType == null) { throw new InvalidDataException("ePhoneType is a required property for PhoneRequest and cannot be null"); } else { this.EPhoneType = ePhoneType; } this.SPhoneRegion = sPhoneRegion; this.SPhoneExchange = sPhoneExchange; this.SPhoneNumber = sPhoneNumber; this.SPhoneInternational = sPhoneInternational; this.SPhoneExtension = sPhoneExtension; }
/// <summary> /// Initializes a new instance of the <see cref="PhoneRequest" /> class. /// </summary> /// <param name="fkiPhonetypeID">The unique ID of the Phonetype. Valid values: |Value|Description| |-|-| |1|Office| |2|Home| |3|Mobile| |4|Fax| |5|Pager| |6|Toll Free| (required).</param> /// <param name="ePhoneType">ePhoneType (required).</param> /// <param name="sPhoneRegion">The region of the phone number. (For a North America Number only) The region is the \"514\" section in this sample phone number: (514) 990-1516 x123.</param> /// <param name="sPhoneExchange">The exchange of the phone number. (For a North America Number only) The exchange is the \"990\" section in this sample phone number: (514) 990-1516 x123.</param> /// <param name="sPhoneNumber">The number of the phone number. (For a North America Number only) The number is the \"1516\" section in this sample phone number: (514) 990-1516 x123.</param> /// <param name="sPhoneInternational">The international phone number. (For phone numbers outside of North) Do not specify the \"011\" part of the phone number used to dial an international phone number from North America. For example for this sample phone number \"+442071838750\", you would send \"442071838750\" without the \"+\" sign..</param> /// <param name="sPhoneExtension">The extension of the phone number. The extension is the \"123\" section in this sample phone number: (514) 990-1516 x123. It can also be used with international phone numbers.</param> public PhoneRequest(int fkiPhonetypeID = default(int), FieldEPhoneType ePhoneType = default(FieldEPhoneType), string sPhoneRegion = default(string), string sPhoneExchange = default(string), string sPhoneNumber = default(string), string sPhoneInternational = default(string), string sPhoneExtension = default(string)) { this.FkiPhonetypeID = fkiPhonetypeID; // to ensure "ePhoneType" is required (not null) this.EPhoneType = ePhoneType ?? throw new ArgumentNullException("ePhoneType is a required property for PhoneRequest and cannot be null"); this.SPhoneRegion = sPhoneRegion; this.SPhoneExchange = sPhoneExchange; this.SPhoneNumber = sPhoneNumber; this.SPhoneInternational = sPhoneInternational; this.SPhoneExtension = sPhoneExtension; }