Module: PaymentProfileCim

Includes:
ActiveMerchant::Billing
Included in:
PaymentProfile
Defined in:
app/models/payment_profile_cim.rb

Instance Method Summary (collapse)

Instance Method Details

- (Object) create



5
6
7
8
9
10
11
12
13
14
15
16
17
# File 'app/models/payment_profile_cim.rb', line 5

def create
  if super and create_payment_profile
    # user.payment_profile_id = self.id  #  add this line if the user has a default payment_profile
    # user.save
    return true
  else
    if self.id
      #destroy the instance if it was created
      self.destroy
    end
    return false
  end
end

- (Object) destroy



26
27
28
29
30
31
# File 'app/models/payment_profile_cim.rb', line 26

def destroy
  if delete_payment_profile and super
    return true
  end
  return false
end

- (Object) update



19
20
21
22
23
24
# File 'app/models/payment_profile_cim.rb', line 19

def update
  if super and update_payment_profile
    return true
  end
  return false
end