Skip to content

Commit

Permalink
Merge branch 'main' into feature/make-it-compatible-with-pydantic-v2
Browse files Browse the repository at this point in the history
  • Loading branch information
acostapazo committed Jun 29, 2023
2 parents ae208fc + 2ecf68d commit fcdd147
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
9 changes: 8 additions & 1 deletion alice/onboarding/onboarding.py
Original file line number Diff line number Diff line change
Expand Up @@ -1702,6 +1702,7 @@ def update_user_state(
user_id: str,
user_state: UserState,
operator: str = "auto",
state_update_reasons: Optional[List[Dict[str, str]]] = None,
verbose: bool = False,
) -> Result[bool, OnboardingError]:
"""
Expand All @@ -1714,6 +1715,8 @@ def update_user_state(
User identifier
operator
Who is accepting the user
state_update_reasons
List of reasons for status update
verbose
Used for print service response as well as the time elapsed
Returns
Expand All @@ -1723,7 +1726,11 @@ def update_user_state(
"""
verbose = self.verbose or verbose
response = self.onboarding_client.update_user_state(
user_id=user_id, user_state=user_state, operator=operator, verbose=verbose
user_id=user_id,
user_state=user_state,
operator=operator,
state_update_reasons=state_update_reasons,
verbose=verbose,
).unwrap_or_return()

if response.status_code == 200:
Expand Down
4 changes: 4 additions & 0 deletions alice/onboarding/onboarding_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -1954,6 +1954,7 @@ def update_user_state(
user_id: str,
user_state: UserState,
operator: str = "auto",
state_update_reasons: Optional[List[Dict[str, str]]] = None,
verbose: bool = False,
) -> Result[Response, Error]:
"""
Expand All @@ -1967,6 +1968,8 @@ def update_user_state(
User identifier
operator
Who is accepting the user
state_update_reasons
List of reasons for status update
verbose
Used for print service response as well as the time elapsed
Expand All @@ -1989,6 +1992,7 @@ def update_user_state(
headers=headers,
json={
"state": user_state.value,
"state_update_reasons": state_update_reasons,
"operator": operator,
},
timeout=self.timeout,
Expand Down

0 comments on commit fcdd147

Please sign in to comment.