Sha256: 6f0abd888cc8d9b8c6de265a0895150bfd10efdffe72ee11785b687075502ac9
Contents?: true
Size: 768 Bytes
Versions: 8
Compression:
Stored size: 768 Bytes
Contents
module Access class Redemption def self.search_by_member(member_key, options = {}) Access::Api.new.search_offer_redemptions_by_member member_key, options end def self.find_by_member(member_key, usage_redeem_key, options = {}) Access::Api.new.find_offer_redemptions_by_member member_key, usage_redeem_key, options end def self.process_batch(chunk) chunk.map { |redemption| new(redemption) } end def initialize(values) self.class.class_eval {attr_reader *values.keys } values.each do |attribute_name, attribute_value| self.instance_variable_set("@#{attribute_name}", attribute_value) end @offer = Access::Offer.new(@offer) @member = Access::Member.new(@member) end end end
Version data entries
8 entries across 8 versions & 1 rubygems