Skip to content

Fix missing version on PATCH passenger/user#58

Merged
rmehner merged 1 commit into
ioki-mobility:masterfrom
phylor:fix-passenger-user-update-missing-version
Jan 24, 2022
Merged

Fix missing version on PATCH passenger/user#58
rmehner merged 1 commit into
ioki-mobility:masterfrom
phylor:fix-passenger-user-update-missing-version

Conversation

@phylor

@phylor phylor commented Jan 20, 2022

Copy link
Copy Markdown
Collaborator

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.

2 participants