Class: ShopifyAPI::Refund

Inherits:
Base
  • Object
show all
Defined in:
lib/shopify_api/resources/refund.rb

Class Method Summary collapse

Methods inherited from Base

activate_session, api_version, api_version=, #as_json, clear_session, early_july_pagination?, #encode, headers, init_prefix, init_prefix_explicit, #persisted?, prefix, prefix=, prefix_source, resource_prefix, resource_prefix=, version_validation!

Methods included from Countable

#count

Class Method Details

.calculate(*args) ⇒ Object


5
6
7
8
9
10
11
12
# File 'lib/shopify_api/resources/refund.rb', line 5

def self.calculate(*args)
  options = { :refund => args[0] }
  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