lib/namely/authenticator.rb
def authorization_code_url(options)
      URL.new(options.merge(
        path: "/api/v1/oauth2/authorize",
        params: {
          response_type: "code",
          approve: "true",
          client_id: client_id,
        },
      )).to_s
    end
def authorization_code_url(options)
      URL.new(options.merge(
        path: "/api/v1/oauth2/authorize",
        params: {
          response_type: "code",
          approve: "true",
          client_id: client_id,
        },
      )).to_s
    end
Return a new Authenticator instance.

 @param [Hash] options
 @option options [String] client_id
 @option options [String] client_secret

 @example
   authenticator = Authenticator.new(
     client_id: "my-client-id",
     client_secret: "my-client-secret"
   )

 @return [Authenticator]
 Returns a URL to begin the authorization code workflow. If you
 provide a redirect_uri you can receive the server's response.

 @param [Hash] options
 @option options [String] host (optional)
 @option options [String] protocol (optional, defaults to "https")
 @option options [String] subdomain (required)
 @option options [String] redirect_uri (optional)

 @return [String]