diff --git a/lib/authsignal.rb b/lib/authsignal.rb index 53178af..3a2838d 100644 --- a/lib/authsignal.rb +++ b/lib/authsignal.rb @@ -26,8 +26,8 @@ def get_user(user_id:, redirect_url: nil) response.transform_keys { |key| underscore(key) }.transform_keys(&:to_sym) end - def get_action(user_id:, action_code:, idempotency_key:) - response = Client.new.get_action(user_id, action_code, idempotency_key) + def get_action(user_id:, action:, idempotency_key:) + response = Client.new.get_action(user_id, action, idempotency_key) response.transform_keys { |key| underscore(key) }.transform_keys(&:to_sym) end diff --git a/lib/authsignal/client.rb b/lib/authsignal/client.rb index eb2e1db..a619e05 100644 --- a/lib/authsignal/client.rb +++ b/lib/authsignal/client.rb @@ -52,8 +52,8 @@ def validate_challenge(user_id: nil, token:) handle_response(response) end - def get_action(user_id, action_code, idempotency_key) - get("/users/#{ERB::Util.url_encode(user_id)}/actions/#{action_code}/#{ERB::Util.url_encode(idempotency_key)}") + def get_action(user_id, action, idempotency_key) + get("/users/#{ERB::Util.url_encode(user_id)}/actions/#{action}/#{ERB::Util.url_encode(idempotency_key)}") end def identify(user_id, user_payload) diff --git a/lib/authsignal/version.rb b/lib/authsignal/version.rb index 8616db8..b5349d2 100644 --- a/lib/authsignal/version.rb +++ b/lib/authsignal/version.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true module Authsignal - VERSION = "2.0.0" + VERSION = "2.1.0" end diff --git a/spec/authsignal/authsignal_spec.rb b/spec/authsignal/authsignal_spec.rb index 5d52c34..85d3e65 100644 --- a/spec/authsignal/authsignal_spec.rb +++ b/spec/authsignal/authsignal_spec.rb @@ -96,7 +96,7 @@ response = Authsignal.get_action( user_id: 1, - action_code: "testAction", + action: "testAction", idempotency_key: "15cac140-f639-48c5-92db-835ec8d3d144")