Sha256: 92de750be09551321fb7d1a55276aa74e4f4e6645be1a14bba8be25c8db099cb

Contents?: true

Size: 616 Bytes

Versions: 2

Compression:

Stored size: 616 Bytes

Contents

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)
            new_from_json(json)
          end
        end
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
chartmogul-ruby-1.1.5 lib/chartmogul/api/actions/retrieve.rb
chartmogul-ruby-1.1.4 lib/chartmogul/api/actions/retrieve.rb