Class: Vantiv::MockedSandbox::FixtureGenerator

Inherits:
Object
  • Object
show all
Defined in:
lib/vantiv/mocked_sandbox/fixture_generator.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#cardObject

Returns the value of attribute card.



11
12
13
# File 'lib/vantiv/mocked_sandbox/fixture_generator.rb', line 11

def card
  @card
end

Class Method Details

.generate_allObject



7
8
9
# File 'lib/vantiv/mocked_sandbox/fixture_generator.rb', line 7

def self.generate_all
  new.run
end

Instance Method Details

#runObject



13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# File 'lib/vantiv/mocked_sandbox/fixture_generator.rb', line 13

def run
  record_tokenize

  TestCard.all.each do |card|
    self.card = CardforFixtureGeneration.new(card)

    record_tokenize_by_direct_post
    if card.tokenizable?
      record_auth_capture
      record_auth
      record_refund
    end
  end

  record_capture
  record_auth_reversal
  record_credit
  record_void
end