class Giftrocket::Catalog
Attributes
data[RW]
id[RW]
name[RW]
raw[RW]
Public Class Methods
list(filters={})
click to toggle source
# File lib/giftrocket/catalog.rb, line 13 def self.list(filters={}) Giftrocket::Request.get( 'catalog', query: filters.merge(Giftrocket.default_options), format: 'json' )[:catalog].map do |item| Giftrocket::Catalog.new(item) end end
new(attributes)
click to toggle source
# File lib/giftrocket/catalog.rb, line 6 def initialize(attributes) attributes = attributes.with_indifferent_access self.id = attributes[:id] self.name = attributes[:name] self.raw = attributes end