Sha256: c5a769e8ba1dd9b88c751eb40399c1a94196340d06011854dabda017b007e79f

Contents?: true

Size: 401 Bytes

Versions: 32

Compression:

Stored size: 401 Bytes

Contents

module ShopifyAPI
  class Refund < Base
    init_prefix :order

    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)
      instantiate_record(format.decode(resource.body), {})
    end
  end
end

Version data entries

32 entries across 32 versions & 1 rubygems

Version Path
shopify_api-6.0.0 lib/shopify_api/resources/refund.rb
shopify_api-5.2.4 lib/shopify_api/resources/refund.rb
shopify_api-5.2.3 lib/shopify_api/resources/refund.rb
shopify_api-5.2.2 lib/shopify_api/resources/refund.rb
shopify_api-5.2.1 lib/shopify_api/resources/refund.rb
shopify_api-5.2.0 lib/shopify_api/resources/refund.rb
shopify_api-5.1.0 lib/shopify_api/resources/refund.rb
shopify_api-5.0.0 lib/shopify_api/resources/refund.rb
shopify_api-4.13.0 lib/shopify_api/resources/refund.rb
shopify_api-4.12.0 lib/shopify_api/resources/refund.rb
shopify_api-4.11.0 lib/shopify_api/resources/refund.rb
shopify_api-4.10.0 lib/shopify_api/resources/refund.rb
shopify_api-4.9.1 lib/shopify_api/resources/refund.rb
shopify_api-4.9.0 lib/shopify_api/resources/refund.rb
shopify_api-4.8.0 lib/shopify_api/resources/refund.rb
shopify_api-4.7.1 lib/shopify_api/resources/refund.rb
shopify_api-4.7.0 lib/shopify_api/resources/refund.rb
shopify_api-4.6.0 lib/shopify_api/resources/refund.rb
shopify_api-4.5.0 lib/shopify_api/resources/refund.rb
shopify_api-4.4.0 lib/shopify_api/resources/refund.rb