Sha256: b07ef5f4157f958504fa234c8049316bfcc38e46b3ff688db9c7899a6ca91022

Contents?: true

Size: 653 Bytes

Versions: 2

Compression:

Stored size: 653 Bytes

Contents

module BambooId
  module Requests
    class ApiKeyRequest
      include BasicRequestHandling

      def initialize(subdomain:, id_token:)
        self.subdomain = subdomain
        self.id_token  = id_token
      end

      def successful?
        response.success
      end

      def key
        response.key
      end

      private

      attr_accessor :subdomain, :id_token

      def url
        Urls::ApiKeyUrl.new(subdomain: subdomain, id_token: id_token)
      end

      def headers
        {
          'Content-Type' => 'application/x-www-form-urlencoded',
          'Accept'       => 'application/json'
        }
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
bamboo-id-0.1.1 lib/bamboo_id/requests/api_key_request.rb
bamboo-id-0.1.0 lib/bamboo_id/requests/api_key_request.rb