-
Notifications
You must be signed in to change notification settings - Fork 71
Getting Started
Emil Dafinov edited this page Apr 27, 2017
·
9 revisions
- Include a dependency on the latest version of the sdk in your pom.xml
<dependency>
<groupId>com.appdirect</groupId>
<artifactId>service-integration-sdk</artifactId>
<version>1.15</version>
</dependency>
- Ensure your application context imports the
ConnectorSdkConfiguration
class; Use the import annotation@Import(ConnectorSdkConfiguration.class)
. i.e.
@SpringBootApplication
@Import(ConnectorSdkConfiguration.class)
public class MinimalConnector {
// your code...
}
-
Ensure your application context includes a
DeveloperSpecificAppmarketCredentialsSupplier
bean that returns valid appmarket credentials given a consumer key. -
Ensure your application context includes a
AppmarketEventHandler<T>
bean for every type of mandatory market events.
- Not providing handler for a mandatory event types will lead to an application context failure.
- The events you need to expose
AppmarketEventHandler
s for are
- Optional events can be handled if need be.
- Add
AppmarketEventHandler<T>
beans for every desired events and annotate it with@Primary
.
@Primary
@Bean
public AppmarketEventHandler<SubscriptionUpcomingInvoice> mySubscriptionUpcomingNoticeHandler() {
return event -> ApiResult.success("My handler for a SUBSCRIPTION_UPCOMING_INVOICE event");
}