|
@@ -4,9 +4,10 @@ module ShopifyAPI
|
|
|
|
|
|
def self.calculate(*args)
|
|
|
options = { :refund => args[0] }
|
|
|
- params = options.merge(args[1][:params]) if args[1] && args[1][:params]
|
|
|
- self.prefix = "/admin/orders/#{params[:order_id]}/"
|
|
|
- resource = post(:calculate, {}, options.to_json)
|
|
|
+ params = {}
|
|
|
+ params = args[1][:params] if args[1] && args[1][:params]
|
|
|
+
|
|
|
+ resource = post(:calculate, params, options.to_json)
|
|
|
instantiate_record(format.decode(resource.body), {})
|
|
|
end
|
|
|
end
|