toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  final Map<String, dynamic> data = new Map<String, dynamic>();
  data['api_url'] = this.apiUrl;
  data['gateway_api_url'] = this.gatewayApiUrl;
  data['gateway_api_key'] = this.gatewayApiKey;
  data['support_url'] = this.supportUrl;
  data['stores'] = this.stores;
  data['products'] = this.products;
  if (this.countries != null) {
    data['countries'] = this.countries!.map((v) => v.toJson()).toList();
  }
  data['google_maps_api_key'] = this.googleMapsApiKey;

  if (payment_methods != null) {
    final v = payment_methods;
    final arr0 = [];
    v!.forEach((v) {
      arr0.add(v!.toJson());
    });
    data['payment_methods'] = arr0;
  }
  return data;
}