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