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 {
  SdkLog.d(
    '[UserApi.serviceTerms] started | tagsCount=${tags?.length ?? 0} result=$result',
  );
  final params = <String, String>{
    Constants.tags: ?tags?.join(','),
    Constants.result: ?result,
  };

  final response = await _client.get(
    Constants.v2ServiceTermsPath,
    queryParameters: params,
  );
  final terms = UserServiceTerms.fromJson(response.data);
  SdkLog.i(
    '[UserApi.serviceTerms] completed | count=${terms.serviceTerms?.length ?? 0}',
  );
  return terms;
}