Created
August 17, 2016 23:59
-
-
Save blakewest/2780db592d900039f5d62013717e7af1 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
# Pseudo code for doing a big zuora export | |
# Pull all_account_ids from a CSV export, or potentially from ActiveZuora::Account. Only issue with the latter | |
# is that it might timeout if you have too many accounts. | |
all_account_ids.each do |account_id| | |
list_of_all_soap_objects.each do |soap_object| | |
# A soap_object would be something like Invoice, Payment, CreditBalanceAdjustment, etc. | |
active_zuora_klass = "ActiveZuora::#{soap_object}".constantize | |
active_zuora_klass.where(account_id: account_id).find_each do |zuora_object| | |
# This is just a placeholder. I'm not sure what database you'd use to actually store things. | |
MyDatabase.store!(zuora_object_id: zuora_object.id, full_information: zuora_object.to_json) | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment