Sha256: 1a6eb9010fa58ca63ff7adcf7ed30ea5efb0aeafeac0e34323c94e6fcfffb0f2

Contents?: true

Size: 338 Bytes

Versions: 7

Compression:

Stored size: 338 Bytes

Contents

Comable::Sample.import('orders')
Comable::Sample.import('payment_methods')

payment_method = Comable::PaymentMethod.first

Comable::Order.complete.each do |order|
  payment = order.create_payment!(payment_method: payment_method, fee: payment_method.fee)
  payment.state = 'completed'
  payment.completed_at = Time.now
  payment.save!
end

Version data entries

7 entries across 7 versions & 2 rubygems

Version Path
comable-sample-0.7.1 db/samples/payments.rb
comable-sample-0.7.0 db/samples/payments.rb
comable-sample-0.7.0.beta2 db/samples/payments.rb
comable-sample-0.7.0.beta1 db/samples/payments.rb
comable-sample-0.6.0 db/samples/payments.rb
comable_sample-0.5.0 db/samples/payments.rb
comable_sample-0.4.2 db/samples/payments.rb