Class: Access::Redeem

Inherits:
Object
  • Object
show all
Includes:
MuchMeta
Defined in:
lib/access/redeem.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods included from MuchMeta

#set_up_methods, #set_values

Constructor Details

#initialize(values) ⇒ Redeem

Returns a new instance of Redeem.



13
14
15
16
17
# File 'lib/access/redeem.rb', line 13

def initialize(values)
  @used_fields = []
  set_up_methods(values)
  set_values(values)
end

Class Method Details

.process_batch(chunk) ⇒ Object



9
10
11
# File 'lib/access/redeem.rb', line 9

def self.process_batch(chunk)
  chunk.map { |redeem| new(redeem) }
end

.redeem_offer(offer_key, redeem_type = nil, options = {}) ⇒ Object



5
6
7
# File 'lib/access/redeem.rb', line 5

def self.redeem_offer(offer_key, redeem_type = nil, options = {})
  Access::Api.new.redeem_offer offer_key, redeem_type, options
end