Sha256: 03744260bcccaf8f676205145ae2be5a7652a63bff101ab7b3d2cee3bc417ddf

Contents?: true

Size: 657 Bytes

Versions: 16

Compression:

Stored size: 657 Bytes

Contents

# frozen_string_literal: true

module ChartMogul
  module API
    module Actions
      module Retrieve
        def self.included(base)
          base.extend ClassMethods
        end

        module ClassMethods
          def retrieve(uuid, options = {})
            resp = handling_errors do
              connection.get("#{resource_path.apply(options)}/#{uuid}") do |req|
                req.headers['Content-Type'] = 'application/json'
              end
            end

            json = ChartMogul::Utils::JSONParser.parse(resp.body, immutable_keys: immutable_keys)
            new_from_json(json)
          end
        end
      end
    end
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
chartmogul-ruby-4.4.0 lib/chartmogul/api/actions/retrieve.rb
chartmogul-ruby-4.3.0 lib/chartmogul/api/actions/retrieve.rb
chartmogul-ruby-4.2.0 lib/chartmogul/api/actions/retrieve.rb
chartmogul-ruby-4.1.0 lib/chartmogul/api/actions/retrieve.rb
chartmogul-ruby-4.0.0 lib/chartmogul/api/actions/retrieve.rb
chartmogul-ruby-3.3.1 lib/chartmogul/api/actions/retrieve.rb
chartmogul-ruby-3.3.0 lib/chartmogul/api/actions/retrieve.rb
chartmogul-ruby-3.2.0 lib/chartmogul/api/actions/retrieve.rb
chartmogul-ruby-3.1.0 lib/chartmogul/api/actions/retrieve.rb
chartmogul-ruby-3.0.2 lib/chartmogul/api/actions/retrieve.rb
chartmogul-ruby-3.0.0 lib/chartmogul/api/actions/retrieve.rb
chartmogul-ruby-2.9.0 lib/chartmogul/api/actions/retrieve.rb
chartmogul-ruby-2.1.0 lib/chartmogul/api/actions/retrieve.rb
chartmogul-ruby-2.0.0 lib/chartmogul/api/actions/retrieve.rb
chartmogul-ruby-1.7.3 lib/chartmogul/api/actions/retrieve.rb
chartmogul-ruby-1.7.2 lib/chartmogul/api/actions/retrieve.rb