The Ramp Pricing feature is supported as a result of this change. Also, some refactoring was done to start curbing bad patterns and separate code out into logical chunks:
The CONTRIBUTING.md file was updated to provide a bit more direction for developers looking to add to this library with no prior experience.
An XmlTools class was created with the aim of being a purely static class to handle individual XML operations. Much of the Recurly_Resource code was moved here.
An XmlDoc trait was created with the aim of being adding the ability to represent any class as an XML node/document. It includes mechanisms to track the possible child nodes of a class as well as handle the conversion from the object into an XML document string.
Recurly_Base and Recurly_Resource were overhauled to accommodate these new tools, moving in a more common sense direction around model relationships in this library (e.g. a "resource" can be directly fetched from the server and a "node" (or doc) simply needs to be represented as XML).
To see how the new ramp pricing feature is utilized, see the spec tests added in this change.
The Ramp Pricing feature is supported as a result of this change. Also, some refactoring was done to start curbing bad patterns and separate code out into logical chunks:
CONTRIBUTING.md
file was updated to provide a bit more direction for developers looking to add to this library with no prior experience.XmlTools
class was created with the aim of being a purely static class to handle individual XML operations. Much of theRecurly_Resource
code was moved here.XmlDoc
trait was created with the aim of being adding the ability to represent any class as an XML node/document. It includes mechanisms to track the possible child nodes of a class as well as handle the conversion from the object into an XML document string.Recurly_Base
andRecurly_Resource
were overhauled to accommodate these new tools, moving in a more common sense direction around model relationships in this library (e.g. a "resource" can be directly fetched from the server and a "node" (or doc) simply needs to be represented as XML).To see how the new ramp pricing feature is utilized, see the spec tests added in this change.