Sha256: e5d657a6f0c6492a770a2f1957ae49a86a6b65123d1f52b8f27818f316784887

Contents?: true

Size: 378 Bytes

Versions: 9

Compression:

Stored size: 378 Bytes

Contents

# frozen_string_literal: true
module ShopifyAPI
  class Refund < Base
    init_prefix :order

    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
  end
end

Version data entries

9 entries across 9 versions & 2 rubygems

Version Path
shopify_api-9.5.2 lib/shopify_api/resources/refund.rb
ruby_shopify_api-1.2.0 lib/ruby_shopify_api/resources/refund.rb
ruby_shopify_api-1.1.0 lib/shopify_api/resources/refund.rb
ruby_shopify_api-1.0.0 lib/shopify_api/resources/refund.rb
shopify_api-9.5.1 lib/shopify_api/resources/refund.rb
shopify_api-9.5 lib/shopify_api/resources/refund.rb
shopify_api-9.4.1 lib/shopify_api/resources/refund.rb
shopify_api-9.4.0 lib/shopify_api/resources/refund.rb
shopify_api-9.3.0 lib/shopify_api/resources/refund.rb