Sha256: d41ecc4128da0301e3725b0c9db67d4c52411de29cf6591b732093c68f3b3416
Contents?: true
Size: 624 Bytes
Versions: 5
Compression:
Stored size: 624 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) new_from_json(json) end end end end end end
Version data entries
5 entries across 5 versions & 1 rubygems