Class: BillingLogic::CommandBuilders::BasicBuilder

Inherits:
Object
  • Object
show all
Defined in:
lib/billing_logic/command_builders/command_builders.rb

Direct Known Subclasses

AggregateWordBuilder, WordBuilder

Class Method Summary collapse

Class Method Details

.cancel_recurring_payment_commands(profile, opts = {}) ⇒ Object



138
139
140
141
142
143
# File 'lib/billing_logic/command_builders/command_builders.rb', line 138

def cancel_recurring_payment_commands(profile, opts = {})
  ActionObject.new(opts.merge(:action     => :cancel,
                              :profile_id => profile.identifier,
                              :products   => profile.products,
                              :when       => time.now))
end

.create_recurring_payment_commands(products, opts = {:paid_until_date => Date.current}) ⇒ Object

Raises:

  • (Exception)


129
130
131
# File 'lib/billing_logic/command_builders/command_builders.rb', line 129

def create_recurring_payment_commands(products, opts = {:paid_until_date => Date.current})
  raise Exception.new('Implement me')
end

.remove_product_from_payment_profile(profile_id, products, opts) ⇒ Object



145
146
147
148
149
150
# File 'lib/billing_logic/command_builders/command_builders.rb', line 145

def remove_product_from_payment_profile(profile_id, products, opts)
  ActionObject.new(opts.merge(:action     => :remove,
                              :products   => products,
                              :profile_id => profile_id,
                              :when       => time.now))
end

.timeObject

override this with Time.zone if used with rails



134
135
136
# File 'lib/billing_logic/command_builders/command_builders.rb', line 134

def time
  Time
end