Skip to content

Commit

Permalink
ExchangePrimaryFactor (#90)
Browse files Browse the repository at this point in the history
* ExchangePrimaryFactor

* bump version
  • Loading branch information
alex-stytch authored Aug 21, 2023
1 parent 94660b9 commit a4d067d
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
12 changes: 12 additions & 0 deletions lib/stytch/users.rb
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,18 @@ def update(
put_request("/v1/users/#{user_id}", request)
end

def exchange_primary_factor(
user_id:,
email_address: nil,
phone_number: nil
)
request = {}
request[:email_address] = email_address unless email_address.nil?
request[:phone_number] = phone_number unless phone_number.nil?

put_request("/v1/users/#{user_id}/exchange_primary_factor", request)
end

# Delete a User from Stytch.
#
# == Parameters:
Expand Down
2 changes: 1 addition & 1 deletion lib/stytch/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# frozen_string_literal: true

module Stytch
VERSION = '6.2.1'
VERSION = '6.3.0'
end

0 comments on commit a4d067d

Please sign in to comment.