Class: Passfort::Endpoint::Checks

Inherits:
Object
  • Object
show all
Defined in:
lib/passfort/endpoint/checks.rb

Instance Method Summary collapse

Constructor Details

#initialize(client) ⇒ Checks

Returns a new instance of Checks.



6
7
8
# File 'lib/passfort/endpoint/checks.rb', line 6

def initialize(client)
  @client = client
end

Instance Method Details

#create(profile_id:, check_type:) ⇒ Object



10
11
12
13
14
15
16
# File 'lib/passfort/endpoint/checks.rb', line 10

def create(profile_id:, check_type:)
  response = @client.post(
    "/profiles/#{profile_id}/checks",
    body: { check_type: check_type },
  )
  Passfort::Resource::Check.new(response)
end