Sha256: d5f4393f4a79039c57a8faea216c6f5e1be5ae92d2e8751010731fe720f3ac46

Contents?: true

Size: 584 Bytes

Versions: 6

Compression:

Stored size: 584 Bytes

Contents

# frozen_string_literal: true

module ShopifyApiBruv
  module Clients
    class HttpRequest
      attr_reader :method, :path, :body, :content_type, :query, :headers

      def initialize(method:, path:, body:, content_type:, query: nil, headers:)
        @method = method
        @path = path
        @body = body.is_a?(Hash) ? body.to_json : body
        @content_type = content_type
        @query = query
        @headers = headers

        ShopifyApiBruv.logger(
          method: :info,
          message: 'Shopify API request initiated...'
        )
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
shopify_api_bruv-0.2.4 lib/shopify_api_bruv/clients/http_request.rb
shopify_api_bruv-0.2.3 lib/shopify_api_bruv/clients/http_request.rb
shopify_api_bruv-0.2.2 lib/shopify_api_bruv/clients/http_request.rb
shopify_api_bruv-0.2.1 lib/shopify_api_bruv/clients/http_request.rb
shopify_api_bruv-0.2.0 lib/shopify_api_bruv/clients/http_request.rb
shopify_api_bruv-0.1.0 lib/shopify_api_bruv/clients/http_request.rb