Appearance
Default Service Return Properties
The following values will return with all service methods.
Property | Description | Type |
---|---|---|
IsSuccessful | This will return true for success (no errors) and false for failure. false means that they were errors of some kind. If your query was valid but does not yield results or records, the value will still be true as long as no errors were triggered. | boolean |
Message | This value will only be populated if the IsSuccessful property is false. | string |
There is an object called DefaultServiceReturnModel
that is strictly made up of these two properties that some service methods return, however, all service methods don’t always return the DefaultServiceReturnModel
object. For example, the CreateTransactions()
method returns an object called TransactionDetailsServiceReturnModel
which is made up of all the properties in the DefaultServiceReturnModel
object but it also adds an additional property called Transactions. So, the DefaultServiceReturnModel
object is always the “base class” for all service returns.
The main point here is that all service return objects, regardless of what method you call, will ALWAYS have these two default properties included. You will always be able to count on the fact that when you call a service method, you will be able to check the IsSuccessful
property of the service return to see if the call was a success or if it failed in some way. If it failed, the Message
property will always have a value with some kind of descriptive error message and in some case. If it was a successful call, the Message
property will be null/empty.