Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix missing version on PATCH passenger/user #58

Merged
merged 1 commit into from Jan 24, 2022
Merged

Fix missing version on PATCH passenger/user #58

merged 1 commit into from Jan 24, 2022

Conversation

phylor
Copy link
Collaborator

@phylor phylor commented Jan 20, 2022

It seems that the version is missing when calling update_user in the passenger API.

If the API is called as in the following:

    api_user = Ioki::Model::Passenger::User.new(
      first_name: 'Sarah',
      last_name: 'Musterfrau',
      email: Ioki::Model::Passenger::Email.new(email_address: nil),
      version: 0
    )

    passenger_client.update_user(api_user)

Body sent to the API:

{:data=>
  {:email=>{:email_address=>nil},
   :first_name=>"Sarah",
   :last_name=>"Musterfrau"}}

version is missing in the body and the API complains accordingly:

{"api_errors"=>[{"message"=>"Version missing", "code"=>"version_missing"}],
 "debug_information"=>[]

@rmehner rmehner merged commit 1461b99 into ioki-mobility:master Jan 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants