PcoServicesTextSetting constructor

PcoServicesTextSetting({
  1. String? id,
  2. bool? isSchedulingRequestsEnabled,
  3. bool? isGeneralEmailsEnabled,
  4. bool? isSchedulingRepliesEnabled,
  5. bool? isRemindersEnabled,
  6. String? carrier,
  7. String? displayNumber,
  8. String? normalizedNumber,
  9. Map<String, List<PcoResource>>? withRelationships,
  10. List<PcoResource>? withIncluded,
})

Create a new PcoServicesTextSetting object. This object cannot be created with the API

NOTES:

  • Creating an instance of a class this way does not save it on the server.
  • This object cannot be saved directly to the server.
  • Only set the id field if you know what you are doing. Save operations will overwrite data when the id is set.
  • Dummy data can be supplied for a required parameter, but if so, .save() should not be called on the object
  • FIELDS USED WHEN CREATING: none
  • FIELDS USED WHEN UPDATING: isGeneralEmailsEnabled, isRemindersEnabled, isSchedulingRepliesEnabled, isSchedulingRequestsEnabled

Implementation

factory PcoServicesTextSetting(
    {String? id,
    bool? isSchedulingRequestsEnabled,
    bool? isGeneralEmailsEnabled,
    bool? isSchedulingRepliesEnabled,
    bool? isRemindersEnabled,
    String? carrier,
    String? displayNumber,
    String? normalizedNumber,
    Map<String, List<PcoResource>>? withRelationships,
    List<PcoResource>? withIncluded}) {
  var obj = PcoServicesTextSetting.empty();
  obj._id = id;
  if (isSchedulingRequestsEnabled != null)
    obj._attributes['scheduling_requests_enabled'] =
        isSchedulingRequestsEnabled;
  if (isGeneralEmailsEnabled != null)
    obj._attributes['general_emails_enabled'] = isGeneralEmailsEnabled;
  if (isSchedulingRepliesEnabled != null)
    obj._attributes['scheduling_replies_enabled'] =
        isSchedulingRepliesEnabled;
  if (isRemindersEnabled != null)
    obj._attributes['reminders_enabled'] = isRemindersEnabled;
  if (carrier != null) obj._attributes['carrier'] = carrier;
  if (displayNumber != null)
    obj._attributes['display_number'] = displayNumber;
  if (normalizedNumber != null)
    obj._attributes['normalized_number'] = normalizedNumber;

  if (withRelationships != null) {
    for (var r in withRelationships.entries) {
      obj._relationships[r.key] = r.value;
    }
    obj._hasManualRelationships = true;
  }

  if (withIncluded != null) {
    obj._included.addAll(withIncluded);
    obj._hasManualIncluded = true;
  }

  return obj;
}