updateSettingsCountry function

Future<ApiResponse<SettingsCountry>> updateSettingsCountry(
  1. ExsitedClient client,
  2. Object countryId,
  3. Object payload, {
  4. bool? raiseOnError,
  5. String? responseFormat,
})

PATCH /api/{api_version}/settings/countries/{country_id}

Update a country's status, description or default_* fields; the answer is the country as it was before the write.

Implementation

Future<ApiResponse<SettingsCountry>> updateSettingsCountry(
  ExsitedClient client,
  Object countryId,
  Object payload, {
  bool? raiseOnError,
  String? responseFormat,
}) =>
    client.sendPatchRequest(CountriesUrls.settingsCountry,
        pathParams: {'country_id': countryId},
        jsonBody: payload,
        raiseOnError: raiseOnError,
        responseFormat: responseFormat,
        dtoDecoder: SettingsCountry.fromMap);