Class: KcSdkCompany::Api::Orders
- Defined in:
- lib/kc-sdk-company/api/orders.rb
Instance Method Summary collapse
Methods inherited from Base
#initialize, #resource, #validate_keys!
Constructor Details
This class inherits a constructor from KcSdkCompany::Api::Base
Instance Method Details
#consuming(data) ⇒ Object
10 11 12 13 14 |
# File 'lib/kc-sdk-company/api/orders.rb', line 10 def consuming(data) validate_keys!(data, %i[company_id plan scope quantity taken_at uid]) resp = resource['v1/orders/consuming'].post(data) JSON.parse(resp.body) end |
#surplus(query) ⇒ Object
4 5 6 7 8 |
# File 'lib/kc-sdk-company/api/orders.rb', line 4 def surplus(query) validate_keys!(query, %i[company_id plan scope]) resp = resource['v1/orders/surplus'].get({ params: query }) JSON.parse(resp.body) end |