class PS::CustomerAccount

Attributes

customer_id[RW]

Public Class Methods

default(customer_id) click to toggle source
# File lib/ps/objects/customer_account.rb, line 20
def default(customer_id)
  request("GetDefaultCustomerAccount", { :customerId => customer_id }, &instantiate_object)
end
find(account_id, customer_id) click to toggle source
# File lib/ps/objects/customer_account.rb, line 15
def find(account_id, customer_id)
  #The name of this method in Paysimple is sooo misleading...
  request("GetCustomerAccountByAccountId", { :accountId => account_id, :customerId => customer_id }, &instantiate_object)
end

Public Instance Methods

make_default() click to toggle source
# File lib/ps/objects/customer_account.rb, line 5
def make_default
  request("SetDefaultCustomerAccount", 
    { 
      :customerId => self.customer_id, 
      :customerAccountId => self.ps_reference_id 
    }
  )
end