Sha256: a710a0e5f233fbb0d2a10922373ec53b042f74a6436d2b17466f9ff6da6bb7fd
Contents?: true
Size: 547 Bytes
Versions: 3
Compression:
Stored size: 547 Bytes
Contents
# frozen_string_literal: true module Alma class BibHolding extend Alma::ApiDefaults extend Forwardable def self.find(mms_id:, holding_id:) url = "#{bibs_base_path}/#{mms_id}/holdings/#{holding_id}" response = HTTParty.get(url, headers: headers, timeout: timeout) new(response) end attr_reader :holding def_delegators :holding, :[], :[]=, :has_key?, :keys, :to_json, :each def initialize(holding) @holding = holding end def holding_id holding["holding_id"] end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
alma-0.4.0 | lib/alma/bib_holding.rb |
alma-0.3.3 | lib/alma/bib_holding.rb |
alma-0.3.2 | lib/alma/bib_holding.rb |