Class: Dibuk::Client

Inherits:
Object
  • Object
show all
Extended by:
Dry::Initializer::Mixin
Defined in:
lib/dibuk/client.rb

Instance Method Summary collapse

Instance Method Details

#license(user, item) ⇒ Object



9
10
11
12
# File 'lib/dibuk/client.rb', line 9

def license(user, item)
  request = Dibuk::Request::License.new(user, item)
  Dibuk::Response::Licensed.new(http_response: call(request))
end


19
20
21
22
# File 'lib/dibuk/client.rb', line 19

def links(user, item)
  request = Dibuk::Request::Links.new(user, item)
  Dibuk::Response::Linked.new(http_response: call(request))
end

#send(user, item, email) ⇒ Object



14
15
16
17
# File 'lib/dibuk/client.rb', line 14

def send(user, item, email)
  request = Dibuk::Request::Send.new(user, item, email)
  Dibuk::Response::Sent.new(http_response: call(request))
end