|
| 1 | +# swagger-java-client |
| 2 | + |
| 3 | +## Requirements |
| 4 | + |
| 5 | +Building the API client library requires [Maven](https://maven.apache.org/) to be installed. |
| 6 | + |
| 7 | +## Installation |
| 8 | + |
| 9 | +To install the API client library to your local Maven repository, simply execute: |
| 10 | + |
| 11 | +```shell |
| 12 | +mvn install |
| 13 | +``` |
| 14 | + |
| 15 | +To deploy it to a remote Maven repository instead, configure the settings of the repository and execute: |
| 16 | + |
| 17 | +```shell |
| 18 | +mvn deploy |
| 19 | +``` |
| 20 | + |
| 21 | +Refer to the [official documentation](https://maven.apache.org/plugins/maven-deploy-plugin/usage.html) for more information. |
| 22 | + |
| 23 | +### Maven users |
| 24 | + |
| 25 | +Add this dependency to your project's POM: |
| 26 | + |
| 27 | +```xml |
| 28 | +<dependency> |
| 29 | + <groupId>io.swagger</groupId> |
| 30 | + <artifactId>swagger-java-client</artifactId> |
| 31 | + <version>1.0.0</version> |
| 32 | + <scope>compile</scope> |
| 33 | +</dependency> |
| 34 | +``` |
| 35 | + |
| 36 | +### Gradle users |
| 37 | + |
| 38 | +Add this dependency to your project's build file: |
| 39 | + |
| 40 | +```groovy |
| 41 | +compile "io.swagger:swagger-java-client:1.0.0" |
| 42 | +``` |
| 43 | + |
| 44 | +### Others |
| 45 | + |
| 46 | +At first generate the JAR by executing: |
| 47 | + |
| 48 | + mvn package |
| 49 | + |
| 50 | +Then manually install the following JARs: |
| 51 | + |
| 52 | +* target/swagger-java-client-1.0.0.jar |
| 53 | +* target/lib/*.jar |
| 54 | + |
| 55 | +## Getting Started |
| 56 | + |
| 57 | +Please follow the [installation](#installation) instruction and execute the following Java code: |
| 58 | + |
| 59 | +```java |
| 60 | + |
| 61 | +import io.swagger.client.*; |
| 62 | +import io.swagger.client.auth.*; |
| 63 | +import io.swagger.client.model.*; |
| 64 | +import io.swagger.client.api.IntegrationApiApi; |
| 65 | + |
| 66 | +import java.io.File; |
| 67 | +import java.util.*; |
| 68 | + |
| 69 | +public class IntegrationApiApiExample { |
| 70 | + |
| 71 | + public static void main(String[] args) { |
| 72 | + ApiClient defaultClient = Configuration.getDefaultApiClient(); |
| 73 | + |
| 74 | + // Configure API key authorization: integration_auth |
| 75 | + ApiKeyAuth integration_auth = (ApiKeyAuth) defaultClient.getAuthentication("integration_auth"); |
| 76 | + integration_auth.setApiKey("YOUR API KEY"); |
| 77 | + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) |
| 78 | + //integration_auth.setApiKeyPrefix("Token"); |
| 79 | + |
| 80 | + IntegrationApiApi apiInstance = new IntegrationApiApi(); |
| 81 | + NewReferral body = new NewReferral(); // NewReferral | |
| 82 | + try { |
| 83 | + Referral result = apiInstance.createReferral(body); |
| 84 | + System.out.println(result); |
| 85 | + } catch (ApiException e) { |
| 86 | + System.err.println("Exception when calling IntegrationApiApi#createReferral"); |
| 87 | + e.printStackTrace(); |
| 88 | + } |
| 89 | + } |
| 90 | +} |
| 91 | + |
| 92 | +``` |
| 93 | + |
| 94 | +## Documentation for API Endpoints |
| 95 | + |
| 96 | +All URIs are relative to *https://localhost* |
| 97 | + |
| 98 | +Class | Method | HTTP request | Description |
| 99 | +------------ | ------------- | ------------- | ------------- |
| 100 | +*IntegrationApiApi* | [**createReferral**](docs/IntegrationApiApi.md#createReferral) | **POST** /v1/referrals | Create a referral code for an advocate |
| 101 | +*IntegrationApiApi* | [**getCustomerProfilesByAttributes**](docs/IntegrationApiApi.md#getCustomerProfilesByAttributes) | **POST** /v1/customer_profiles_search | Get a list of the customer profiles that match the given attributes |
| 102 | +*IntegrationApiApi* | [**trackEvent**](docs/IntegrationApiApi.md#trackEvent) | **POST** /v1/events | Track an Event |
| 103 | +*IntegrationApiApi* | [**updateCustomerProfile**](docs/IntegrationApiApi.md#updateCustomerProfile) | **PUT** /v1/customer_profiles/{integrationId} | Update a Customer Profile |
| 104 | +*IntegrationApiApi* | [**updateCustomerSession**](docs/IntegrationApiApi.md#updateCustomerSession) | **PUT** /v1/customer_sessions/{customerSessionId} | Update a Customer Session |
| 105 | + |
| 106 | + |
| 107 | +## Documentation for Models |
| 108 | + |
| 109 | + - [APIError](docs/APIError.md) |
| 110 | + - [AccessControlList](docs/AccessControlList.md) |
| 111 | + - [AccessLogEntry](docs/AccessLogEntry.md) |
| 112 | + - [AccountEntity](docs/AccountEntity.md) |
| 113 | + - [ApplicationApiHealth](docs/ApplicationApiHealth.md) |
| 114 | + - [ApplicationEntity](docs/ApplicationEntity.md) |
| 115 | + - [ApplicationProfileEntity](docs/ApplicationProfileEntity.md) |
| 116 | + - [ApplicationSessionEntity](docs/ApplicationSessionEntity.md) |
| 117 | + - [ApplicationStorageData](docs/ApplicationStorageData.md) |
| 118 | + - [Binding](docs/Binding.md) |
| 119 | + - [CampaignEntity](docs/CampaignEntity.md) |
| 120 | + - [CampaignSetBranchNode](docs/CampaignSetBranchNode.md) |
| 121 | + - [CampaignSetLeafNode](docs/CampaignSetLeafNode.md) |
| 122 | + - [CampaignSetNode](docs/CampaignSetNode.md) |
| 123 | + - [CartItem](docs/CartItem.md) |
| 124 | + - [CartItemAdjustment](docs/CartItemAdjustment.md) |
| 125 | + - [CodeGeneratorSettings](docs/CodeGeneratorSettings.md) |
| 126 | + - [CouponConstraints](docs/CouponConstraints.md) |
| 127 | + - [CouponSearch](docs/CouponSearch.md) |
| 128 | + - [CouponValue](docs/CouponValue.md) |
| 129 | + - [CustomerProfileSearch](docs/CustomerProfileSearch.md) |
| 130 | + - [EmailEntity](docs/EmailEntity.md) |
| 131 | + - [Entity](docs/Entity.md) |
| 132 | + - [ErrorResponse](docs/ErrorResponse.md) |
| 133 | + - [ErrorSource](docs/ErrorSource.md) |
| 134 | + - [FeatureFlags](docs/FeatureFlags.md) |
| 135 | + - [FeatureFlagsBody](docs/FeatureFlagsBody.md) |
| 136 | + - [InlineResponse200](docs/InlineResponse200.md) |
| 137 | + - [IntegrationEntity](docs/IntegrationEntity.md) |
| 138 | + - [IntegrationProfileEntity](docs/IntegrationProfileEntity.md) |
| 139 | + - [IntegrationState](docs/IntegrationState.md) |
| 140 | + - [LedgerBalance](docs/LedgerBalance.md) |
| 141 | + - [LibraryAttribute](docs/LibraryAttribute.md) |
| 142 | + - [LimitConfig](docs/LimitConfig.md) |
| 143 | + - [LimitEntityEnum](docs/LimitEntityEnum.md) |
| 144 | + - [LoyaltyMembership](docs/LoyaltyMembership.md) |
| 145 | + - [LoyaltyProgramActivation](docs/LoyaltyProgramActivation.md) |
| 146 | + - [MultiApplicationEntity](docs/MultiApplicationEntity.md) |
| 147 | + - [MutableEntity](docs/MutableEntity.md) |
| 148 | + - [NewAccount](docs/NewAccount.md) |
| 149 | + - [NewApiKey](docs/NewApiKey.md) |
| 150 | + - [NewApplication](docs/NewApplication.md) |
| 151 | + - [NewApplicationStorage](docs/NewApplicationStorage.md) |
| 152 | + - [NewApplicationStorageData](docs/NewApplicationStorageData.md) |
| 153 | + - [NewApplicationStorageTuple](docs/NewApplicationStorageTuple.md) |
| 154 | + - [NewCampaign](docs/NewCampaign.md) |
| 155 | + - [NewCustomerProfile](docs/NewCustomerProfile.md) |
| 156 | + - [NewInvitation](docs/NewInvitation.md) |
| 157 | + - [NewInviteEmail](docs/NewInviteEmail.md) |
| 158 | + - [NewLoyaltyProgram](docs/NewLoyaltyProgram.md) |
| 159 | + - [NewPassword](docs/NewPassword.md) |
| 160 | + - [NewPasswordEmail](docs/NewPasswordEmail.md) |
| 161 | + - [NewProductLoyaltyPoints](docs/NewProductLoyaltyPoints.md) |
| 162 | + - [NewReferral](docs/NewReferral.md) |
| 163 | + - [NewRole](docs/NewRole.md) |
| 164 | + - [NewRuleset](docs/NewRuleset.md) |
| 165 | + - [Policy](docs/Policy.md) |
| 166 | + - [ProductLoyaltyPoints](docs/ProductLoyaltyPoints.md) |
| 167 | + - [Rule](docs/Rule.md) |
| 168 | + - [Session](docs/Session.md) |
| 169 | + - [Tier](docs/Tier.md) |
| 170 | + - [Tiers](docs/Tiers.md) |
| 171 | + - [UpdateAccount](docs/UpdateAccount.md) |
| 172 | + - [UserEntity](docs/UserEntity.md) |
| 173 | + - [WebhookLogEntry](docs/WebhookLogEntry.md) |
| 174 | + - [Account](docs/Account.md) |
| 175 | + - [ApiKey](docs/ApiKey.md) |
| 176 | + - [Application](docs/Application.md) |
| 177 | + - [ApplicationEvent](docs/ApplicationEvent.md) |
| 178 | + - [ApplicationProfile](docs/ApplicationProfile.md) |
| 179 | + - [ApplicationSession](docs/ApplicationSession.md) |
| 180 | + - [ApplicationStorage](docs/ApplicationStorage.md) |
| 181 | + - [ApplicationStorageTuple](docs/ApplicationStorageTuple.md) |
| 182 | + - [Campaign](docs/Campaign.md) |
| 183 | + - [CampaignAnalytics](docs/CampaignAnalytics.md) |
| 184 | + - [CampaignSet](docs/CampaignSet.md) |
| 185 | + - [Change](docs/Change.md) |
| 186 | + - [Coupon](docs/Coupon.md) |
| 187 | + - [CustomerActivityReport](docs/CustomerActivityReport.md) |
| 188 | + - [CustomerProfile](docs/CustomerProfile.md) |
| 189 | + - [CustomerSession](docs/CustomerSession.md) |
| 190 | + - [Event](docs/Event.md) |
| 191 | + - [LedgerEntry](docs/LedgerEntry.md) |
| 192 | + - [LoginParams](docs/LoginParams.md) |
| 193 | + - [LoyaltyProgram](docs/LoyaltyProgram.md) |
| 194 | + - [NewCampaignSet](docs/NewCampaignSet.md) |
| 195 | + - [NewCoupons](docs/NewCoupons.md) |
| 196 | + - [NewCustomerSession](docs/NewCustomerSession.md) |
| 197 | + - [NewEvent](docs/NewEvent.md) |
| 198 | + - [Referral](docs/Referral.md) |
| 199 | + - [Role](docs/Role.md) |
| 200 | + - [Ruleset](docs/Ruleset.md) |
| 201 | + - [UpdateCoupon](docs/UpdateCoupon.md) |
| 202 | + - [UpdateUser](docs/UpdateUser.md) |
| 203 | + - [User](docs/User.md) |
| 204 | + - [ApiKeyWithUsage](docs/ApiKeyWithUsage.md) |
| 205 | + - [NewAccountSignUp](docs/NewAccountSignUp.md) |
| 206 | + - [NewUser](docs/NewUser.md) |
| 207 | + |
| 208 | + |
| 209 | +## Documentation for Authorization |
| 210 | + |
| 211 | +Authentication schemes defined for the API: |
| 212 | +### integration_auth |
| 213 | + |
| 214 | +- **Type**: API key |
| 215 | +- **API key parameter name**: Content-Signature |
| 216 | +- **Location**: HTTP header |
| 217 | + |
| 218 | + |
| 219 | +## Recommendation |
| 220 | + |
| 221 | +It's recommended to create an instance of `ApiClient` per thread in a multithreaded environment to avoid any potential issues. |
| 222 | + |
| 223 | +## Author |
| 224 | + |
| 225 | + |
| 226 | + |
0 commit comments