Sha256: d03a44734a79618d999242bd7f05dc27df3cd05c911c746710ec347468fa2178

Contents?: true

Size: 517 Bytes

Versions: 6

Compression:

Stored size: 517 Bytes

Contents

require_relative "base_client"

module PortalConnectors
  class AutomateClient < BaseClient
    def self.singleton
      @singleton ||= new
    end

    def submit_email_otp(receiver_email:, content:)
      params = {
        nonce: next_nonce,
        receiver_email: receiver_email,
        content: content
      }
      url = "#{host}/api/v1/email_otps"
      res = post_with_signature(url, params)
      [JSON.parse(res.body_str), res.response_code == 201]
    rescue => e
      return_error e
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
portal-connectors-0.58.39xc lib/portal-connectors/automate_client.rb
portal-connectors-0.58.39xb lib/portal-connectors/automate_client.rb
portal-connectors-0.58.39xa lib/portal-connectors/automate_client.rb
portal-connectors-0.58.39fj lib/portal-connectors/automate_client.rb
portal-connectors-0.58.39fg lib/portal-connectors/automate_client.rb
portal-connectors-0.58.38xn lib/portal-connectors/automate_client.rb