class E4commerce::BankBillet

Public Instance Methods

add_product(product) click to toggle source
# File lib/e4commerce/bank_billet.rb, line 25
def add_product(product)
        # Adds a product or an array of products to the products list
        self.product_list << product
end
calculate_total(product_list) click to toggle source
# File lib/e4commerce/bank_billet.rb, line 10
    def calculate_total(product_list)
# Determine total price sum of products in list

self.product_list.each do |product|
    self.total += product.unit_price
end 

return self.total
    end
create_payment(client) click to toggle source
# File lib/e4commerce/bank_billet.rb, line 20
        def create_payment(client)
    
    raise NotImplementedError, "Child must implement method"
end