Colorado Timberline APIA Practical Guide to Successful Integration

High Level Architecture

high level depiction of ct client librariesThe CT client libraries provide several main features

  • Object/Protocol Mapping (OPM) – A set of objects which map closely to components sent directly over the wire (XML nodes for example). These are the objects you will supply to the Gateways when invoking API methods, and these will be supplied to your Notification Callbacks as well.
  • Gateway Classes – Gateway classes can invoke methods in the CT API.  They take one or more objects from the OPM, which are automatically marshaled to the protocol by the Gateways during API method invocation
  • Notification Callbacks – An easy way for you to consume notifications from the CT API service.  Each notification type has a corresponding class with an execute() method, which takes as input a pre-hydrated object or set of objects from the OPM.  From here you can easily import notification payloads into your database, notify your users etc. See OrderShipped Notification as an example.
  • Extensibile – CT API client libraries ship with notification stubs for you to add customized functionality. You may also subclass OPM and Gateway classes, and create new configuration files (if the CtConfig class is sufficient) for customized functionality.
  • Configurable – During development, you can submit orders the staging environment without having them actually be printed.  You can easily commit to printing by flipping a switch in your code, which could also be stored in your database.