serviceTerms method

Future<UserServiceTerms> serviceTerms({
  1. List<String>? tags,
  2. String? result,
})

KO: 서비스 약관 동의 내역 확인하기
서비스 약관 태그 목록은 tags에 전달
result에 조회 대상(agreed_service_terms: 사용자가 동의한 서비스 약관 목록 | app_service_terms: 앱에 사용 설정된 서비스 약관 목록, 기본값: agreed_service_terms) 전달

EN: Retrieve consent details for service terms
Pass the tags of service terms to tags
Pass the result type (agreed_service_terms: List of service terms the user has agreed to | app_service_terms: List of service terms enabled for the app, Default: agreed_service_terms) to result

Implementation

Future<UserServiceTerms> serviceTerms({
  List<String>? tags,
  String? result,
}) async {
  Map<String, dynamic> param = {
    Constants.tags: tags,
    Constants.result: result,
  };
  param.removeWhere((k, v) => v == null);
  return ApiFactory.handleApiError(() async {
    Response response =
        await _dio.get(Constants.v2ServiceTermsPath, queryParameters: param);
    return UserServiceTerms.fromJson(response.data);
  });
}