Class: Voucherify::Service::AsyncActions

Inherits:
Object
  • Object
show all
Defined in:
lib/voucherify/service/async_actions.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(client) ⇒ AsyncActions

Returns a new instance of AsyncActions.



8
9
10
# File 'lib/voucherify/service/async_actions.rb', line 8

def initialize(client)
  @client = client
end

Instance Attribute Details

#clientObject (readonly)

Returns the value of attribute client.



6
7
8
# File 'lib/voucherify/service/async_actions.rb', line 6

def client
  @client
end

Instance Method Details

#get(id) ⇒ Object



12
13
14
# File 'lib/voucherify/service/async_actions.rb', line 12

def get(id)
  @client.get("/async-actions/#{ERB::Util.url_encode(id)}")
end

#list(query) ⇒ Object



16
17
18
# File 'lib/voucherify/service/async_actions.rb', line 16

def list(query)
  @client.get('/async-actions', query)
end