Created
October 13, 2016 19:38
-
-
Save waltflanagan/f22d77c62a1a8a7b78497b8aaa7645d6 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
module OrderPlacementService | |
def fetch_user_billing_info(params) | |
HashParamsChecker.check_params( | |
{:inputs => { :pre_user_id => 13 } | |
}, | |
params | |
) | |
#... | |
end | |
def fetch_notification_email(params) | |
HashParamsChecker.check_params( | |
{ | |
:inputs => { :pre_user_id => 13 }, | |
:fetch_user_billing_info => {:user_billing_info => "usi object"} | |
}, | |
params | |
) | |
#... | |
end | |
end | |
class OrderPlacer | |
@@user | |
def initialize(id) | |
@user = User.find_by_id(id) | |
end | |
def fetch_user_billing_info(params) | |
@user.stuff | |
#... | |
end | |
def fetch_notification_email(params) | |
@user.stuff | |
#... | |
end | |
end | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment