title: How to reduce coupling when one class calls only one method on another class that has many methods?
body: <p>I have a class (let's call it <code>MyService</code>) that accepts two dependencies in it's constructor.  The first one is not all that relevant to the question.  The second one is <code>PaymentDetails</code>.  PaymentDetails lives for longer than the MyService, which is created by a factory to process this particular request.</p>
  
  <p>In <code>MyService.process()</code>, it:</p>
  
  <ul>
  <li>does some stuff with the first dependency,</li>
  <li>constructs a <code>new TransactionDetails()</code> object and sets various things on it,</li>
  <li>calls <code>myPaymentDetails.setTransactionDetails( td );</code></li>
  <li>returns something to say which page in the wizard follows next</li>
  </ul>
  
  <p><code>PaymentDetails</code> has by necessity many methods on it.  It is an Entity style object into which information is built up as the user steps through a series of about 5 pages.</p>
  
  <p>What is bothering me is that as written my service class depends on the whole of <code>PaymentDetails</code> but only calls one single method.  </p>
  
  <p>This bothers me because: </p>
  
  <ul>
  <li>it will limit the ability to re-use the service class</li>
  <li>it is not possible to understand what the real dependencies are by reading the method signatures</li>
  </ul>
  
  <p>My question is:</p>
  
  <p>What is the best way to fix this so that my service class has minimal dependencies?</p>