academe / SagePay-Integration

HTTP Messages for the Sage Pay REST (Pi) gateway.
GNU General Public License v3.0
9 stars 5 forks source link

All "response" messages should instantiate with array data #26

Closed judgej closed 8 years ago

judgej commented 8 years ago

The constructors for some of the response messages are ridiculously long lists of parameters. Let's take them all out and merge the fromData() method into the constructor. So ALL received messages are instantiated from an array of data.

judgej commented 8 years ago

Practically, a response message will always be populated from an [nested] array of data, so it makes sense to use that data in the constructor. The fromData() methods still exist for some models and the error collections, as a convenience.

judgej commented 8 years ago

All done now, and fromData() is deprecated across all the response messages.