Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions lib/workos/user_management/update_user_options.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
TARGET CODE:
# frozen_string_literal: true

module WorkOS
module UserManagement
# This class is used to serialize the options for updating a user
class UpdateUserOptions
attr_accessor :email, :email_verified, :first_name, :last_name, :password, :password_hash, :password_hash_type, :external_id

def initialize(options = {})
@email = options[:email]
@email_verified = options[:email_verified]
@first_name = options[:first_name]
@last_name = options[:last_name]
@password = options[:password]
@password_hash = options[:password_hash]
@password_hash_type = options[:password_hash_type]
@external_id = options[:external_id]
end
end
end
end

This Ruby code provides the same functionality as the Node.js code. It defines a class `UpdateUserOptions` with the same properties as the `UpdateUserOptions` interface in the Node.js code. The `initialize` method in the Ruby code is equivalent to the `serializeUpdateUserOptions` function in the Node.js code. It takes an options hash and assigns the values to the corresponding instance variables.
Loading