-
-
Save novito/3c3bddba92c77015956e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def import_legacy_purchase_data(data) | |
purchase_list = legacy_data_parser.parse_purchase_records(data) | |
purchase_list.each do |purchase_record| | |
customer = customer_list.get_customer(purchase_record.email_address) | |
product = product_inventory.get_product(purchase_record.product_id) | |
customer.add_purchased_product(product) | |
customer.notify_of_files_available(product) | |
log_successful_import(purchase_record) | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment