create static method

AffiliateProgramInfo create({
  1. bool schemeUtilsIsSetDefaultData = false,
  2. String special_type = "affiliateProgramInfo",
  3. String special_return_type = "affiliateProgramInfo",
  4. AffiliateProgramParameters? parameters,
  5. num? end_date,
  6. StarAmount? daily_revenue_per_user_amount,
})
override

Generate By AZKADEV | Azka Axelion Gibran Script Dont edit by hand or anything manual

Implementation

static AffiliateProgramInfo create({
  bool schemeUtilsIsSetDefaultData = false,
  String special_type = "affiliateProgramInfo",
  String special_return_type = "affiliateProgramInfo",
  AffiliateProgramParameters? parameters,
  num? end_date,
  StarAmount? daily_revenue_per_user_amount,
}) {
  // AffiliateProgramInfo affiliateProgramInfo = AffiliateProgramInfo({
  final Map affiliateProgramInfo_data_create_json = {
    "@type": special_type,
    "@return_type": special_return_type,
    "parameters": (parameters != null) ? parameters.toJson() : null,
    "end_date": end_date,
    "daily_revenue_per_user_amount": (daily_revenue_per_user_amount != null) ? daily_revenue_per_user_amount.toJson() : null,
  };

  affiliateProgramInfo_data_create_json.removeWhere((key, value) => value == null);

  if (schemeUtilsIsSetDefaultData) {
    defaultData.forEach((key, value) {
      if (affiliateProgramInfo_data_create_json.containsKey(key) == false) {
        affiliateProgramInfo_data_create_json[key] = value;
      }
    });
  }
  return AffiliateProgramInfo(affiliateProgramInfo_data_create_json);
}