Class: Voucherify::Service::AsyncActions
- Inherits:
-
Object
- Object
- Voucherify::Service::AsyncActions
- Defined in:
- lib/voucherify/service/async_actions.rb
Instance Attribute Summary collapse
-
#client ⇒ Object
readonly
Returns the value of attribute client.
Instance Method Summary collapse
- #get(id) ⇒ Object
-
#initialize(client) ⇒ AsyncActions
constructor
A new instance of AsyncActions.
- #list(query) ⇒ Object
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
#client ⇒ Object (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 |