Sha256: e286a4589810301051e387dc54c6acd58661eab3a16e21c57e2e6a9cc1a45bb0

Contents?: true

Size: 945 Bytes

Versions: 4

Compression:

Stored size: 945 Bytes

Contents

require 'json_api_client'

module Instant2fa
  class ConnectionConfiguration
  end

  module Resources
    class UnprocessableEntity < JsonApiClient::Errors::ServerError
      def message
        "Unable to process request"
      end
    end

    class Base < JsonApiClient::Resource
      property :distinct_id, type: :string

      def self.site=(url)
        super(url)
        self.connection(rebuild: true)
      end

      def self.path(params)
        previous = super(params)
        previous + "/"
      end

      self.site = 'https://api.instant2fa.com/'
      self.route_format = :dasherized_key
    end

    class UserAccessToken < Base
      property :hosted_page_url, type: :string
    end

    class VerificationRequest < Base
      property :hosted_page_url, type: :string
    end

    class VerificationResponseToken < Base
    end

    class VerificationResponse < Base
      property :status, type: :string
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
instant2fa-1.0.2 lib/instant2fa/resources.rb
instant2fa-1.0.1 lib/instant2fa/resources.rb
instant2fa-1.0.0 lib/instant2fa/resources.rb
instant2fa-0.0.2 lib/instant2fa/resources.rb