Skip to content

Instantly share code, notes, and snippets.

@waltflanagan
Created October 13, 2016 19:38
Show Gist options
  • Save waltflanagan/f22d77c62a1a8a7b78497b8aaa7645d6 to your computer and use it in GitHub Desktop.
Save waltflanagan/f22d77c62a1a8a7b78497b8aaa7645d6 to your computer and use it in GitHub Desktop.
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