setValue method

Future<DynamiteResponse<DeclarativeSettingsSetValueResponseApplicationJson, void>> setValue({
  1. required String app,
  2. required String formId,
  3. required String fieldId,
  4. required ContentString<JsonObject> value,
  5. bool? oCSAPIRequest,
})

Sets a declarative settings value.

Returns a Future containing a DynamiteResponse with the status code, deserialized body and headers. Throws a DynamiteApiException if the API call does not return an expected status code.

Parameters:

  • app ID of the app.
  • formId ID of the form.
  • fieldId ID of the field.
  • value Value to be saved.
  • oCSAPIRequest Required to be true for the API request to pass. Defaults to true.

Status codes:

  • 200: Value set successfully
  • 500: Not logged in or not an admin user
  • 400: Invalid arguments to save value

See:

Implementation

Future<_i1.DynamiteResponse<DeclarativeSettingsSetValueResponseApplicationJson, void>> setValue({
  required String app,
  required String formId,
  required String fieldId,
  required ContentString<JsonObject> value,
  bool? oCSAPIRequest,
}) async {
  final _request = $setValue_Request(
    app: app,
    formId: formId,
    fieldId: fieldId,
    value: value,
    oCSAPIRequest: oCSAPIRequest,
  );
  final _response = await _rootClient.httpClient.send(_request);

  final _serializer = $setValue_Serializer();
  final _rawResponse =
      await _i1.ResponseConverter<DeclarativeSettingsSetValueResponseApplicationJson, void>(_serializer)
          .convert(_response);
  return _i1.DynamiteResponse.fromRawResponse(_rawResponse);
}