class Remitano::Client::ActionConfirmations
Attributes
config[RW]
Public Class Methods
new(config:)
click to toggle source
# File lib/remitano/client/action_confirmations.rb, line 7 def initialize(config:) @config = config end
Public Instance Methods
confirm!(id)
click to toggle source
# File lib/remitano/client/action_confirmations.rb, line 11 def confirm!(id) config.net.post("/action_confirmations/#{id}/confirm", token: config.authenticator_token).execute end
confirm_by_hotp!(id, otp_counter)
click to toggle source
# File lib/remitano/client/action_confirmations.rb, line 15 def confirm_by_hotp!(id, otp_counter) otp = config.hotp(otp_counter) config.net.post("/action_confirmations/#{id}/confirm", token: otp).execute end
confirm_if_neccessary!(response)
click to toggle source
# File lib/remitano/client/action_confirmations.rb, line 20 def confirm_if_neccessary!(response) if response.is_action_confirmation && response.status != "confirmed" puts "Submitting token" confirm!(response.id) else response end end