Class: ShopifyAPI::Refund
- Inherits:
-
Base
- Object
- ActiveResource::Base
- Base
- ShopifyAPI::Refund
- Defined in:
- lib/shopify_api/resources/refund.rb
Class Method Summary collapse
Methods inherited from Base
activate_session, #as_json, clear_session, #encode, #headers, init_prefix, init_prefix_explicit, #persisted?
Methods included from Countable
Methods inherited from ActiveResource::Base
Class Method Details
.calculate(*args) ⇒ Object
5 6 7 8 9 10 11 |
# File 'lib/shopify_api/resources/refund.rb', line 5 def self.calculate(*args) = { :refund => args[0] } params = .merge(args[1][:params]) if args[1] && args[1][:params] self.prefix = "/admin/orders/#{params[:order_id]}/" resource = post(:calculate, {}, .to_json) instantiate_record(format.decode(resource.body), {}) end |