Sha256: 3ed2a10e4209ed5aac7d1940007689ceadb92b411703bea1c7e018b72226a63d

Contents?: true

Size: 701 Bytes

Versions: 14

Compression:

Stored size: 701 Bytes

Contents

module Access
  class Redemption
    include Access::MuchMeta

    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)
      @used_fields = []
      set_up_methods(values)
      set_values(values)
      @offer = Access::Offer.new(@offer) if @offer
      @member = Access::Member.new(@member) if @member
    end

  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
access-2.3.0.pre.rc2 lib/access/redemption.rb
access-2.3.0.pre.rc1 lib/access/redemption.rb
access-2.2.0 lib/access/redemption.rb
access-2.1.5 lib/access/redemption.rb
access-2.1.4 lib/access/redemption.rb
access-2.1.3 lib/access/redemption.rb
access-2.1.2 lib/access/redemption.rb
access-2.1.1 lib/access/redemption.rb
access-2.1.0 lib/access/redemption.rb
access-2.0.55 lib/access/redemption.rb
access-2.0.54 lib/access/redemption.rb
access-2.0.53 lib/access/redemption.rb
access-2.0.52 lib/access/redemption.rb
access-2.0.51 lib/access/redemption.rb