Miscellaneous
Errors
ApiError
Class responsible for managing errors.
Declared In:
com.synerise.sdk.error.ApiError
Declaration:
public class ApiError
Properties:
| Property | Type | Optional | Default | Description |
|---|---|---|---|---|
| errorBody | ApiErrorBody | no | - | API Error Body |
| httpErrorCategory | HttpErrorCategory | no | - | HTTP error category |
| errorType | ErrorType | no | - | Error type |
| httpCode | int | no | - | HTTP error code |
| throwable | Throwable | no | - | Android throwable |
Initializers:
There are no initializers.
Methods:
Prints stack trace on original Throwable instance.
public void printStackTrace()ApiErrorBody
Class responsible for providing the API error body.
Declared In:
com.synerise.sdk.error.ApiErrorBody
Declaration:
public class ApiErrorBody implements Serializable
Properties:
| Property | Type | Optional | Default | Description |
|---|---|---|---|---|
| error | String | no | - | String representation of the returned HTTP status code |
| message | String | no | - | Error message |
| path | String | no | - | Endpoint path in which the error has occurred |
| status | int | no | - | Error’s HTTP status code |
| errorCauses | List<ApiErrorCause> | yes | - | Optional list of error causes, mostly occurs when 400 HTTP code is returned |
Initializers:
There are no initializers.
Methods:
There are only getters.
ApiErrorCause
Class responsible for providing the API error cause.
Declared In:
com.synerise.sdk.error.ApiErrorCause
Declaration:
public class ApiErrorCause implements Serializable
Properties:
| Property | Type | Optional | Default | Description |
|---|---|---|---|---|
| field | String | yes | - | Main error cause, for example, the name of the field that failed validation |
| message | String | yes | - | Error message |
| code | int | no | - | Unique error cause code |
| rejectedValue | String | yes | - | Optional rejected value |
Initializers:
There are no initializers.
Methods:
There are only getters.
ErrorType
This enum contains values for error types.
Declared In:
com.synerise.sdk.error.ErrorType
Declaration:
public enum ErrorType
Values:
| Property | Description |
|---|---|
| HTTP_ERROR | HTTP error |
| NETWORK_ERROR | Network error |
| NO_TOKEN | No token |
| UNKNOWN | Unknown error type |
Methods:
There are no methods.
HttpErrorCategory
This enum contains values for HTTP error categories.
Declared In:
com.synerise.sdk.error.HttpErrorCategory
Declaration:
public enum HttpErrorCategory
Values:
| Property | Value | Description |
|---|---|---|
| BAD_REQUEST | 400 | Bad request |
| UNAUTHORIZED | 401 | Unauthorized (no token, wrong token) |
| FORBIDDEN | 403 | Forbidden (insufficient permissions) |
| NOT_FOUND | 404 | Resource not found |
| RANGE_NOT_SATISFIABLE | 416 | Range not satisfiable |
| SERVER_ERROR | 500-599 | Server error |
| UNKNOWN | -1 | Unknown error |
Methods:
This method retrieves the HTTP error category.
public static HttpErrorCategory getHttpErrorCategory(int code)Misc
ApiQuerySortingOrder
This enum contains values for query sorting order.
Declared In:
com.synerise.sdk.core.types.enums.ApiQuerySortingOrder
Declaration:
public enum ApiQuerySortingOrder
Values:
| Property | Value | Description |
|---|---|---|
| ASCENDING | “asc” | Sorting order |
| DESCENDING | “desc” | Sorting order |
Methods:
This method retrieves the order.
public String getOrder()This method retrieves the order.
public static ApiQuerySortingOrder getBySortingOrder(String order)ScreenViewApiQuery
Class responsible for creating a query to the Screen View API.
Declared In:
com.synerise.sdk.content.model.ScreenViewApiQuery
Declaration:
public class ScreenViewApiQuery
Properties:
| Property | Type | Optional | Default | Description |
|---|---|---|---|---|
| feedSlug | String | no | nil | Identifies a specific screen view feed |
| productID | String | yes | nil | Item identifier |
| params | HashMap<String,Object> | yes | nil | Additional parameters to pass for Inserts in the screen view. For example, if the insert is {{ foo }}, you need to pass the value of foo |
Initializers:
There is a constructor.
public ScreenViewApiQuery(String feedSlug, String productId)Methods:
Setter for feedSlug
public void setFeedSlug(String feedSlug)Setter for productId
public void setProductId(String productId)ScreenView
Declared In:
com.synerise.sdk.content.model.screenview
Declaration:
public class ScreenView
Properties:
| Property | Type | Optional | Description |
|---|---|---|---|
| id | String | no | Screen View’s ID |
| name | String | no | Screen View’s name |
| hash | String | no | Screen View’s hash |
| path | String | no | URL of the screen view’s definition |
| priority | Integer | no | Screen View’s priority (1-99, where 1 is the highest) |
| audience | Audience | no | - |
| data | Object | no | Content of the screen view |
| createdAt | Date | no | Screen View’s creation date |
| updatedAt | Date | no | Screen View’s update date |
Initializers:
There are no initializers.
Methods:
There are only getters for the above properties.
ScreenView.Audience
Declared In:
com.synerise.sdk.content.model.screenview
Declaration:
public class Audience
Properties:
| Property | Type | Optional | Description |
|---|---|---|---|
| segments | List |
yes | Audience’s segments |
| query | String | yes | Audience’s query |
| targetType | String | yes | Audience’s target type |
Initializers:
There are no initializers.
Methods:
There are only getters for the above properties.
Removed symbols
ScreenViewResponse
Class responsible for receiving screen views.
Declared In:
com.synerise.sdk.content.model.ScreenViewResponse
Declaration:
public class ScreenViewResponse
Properties:
| Property | Type | Optional | Default | Description |
|---|---|---|---|---|
| audience | Audience | no | - | Audience of a Screen view |
| createdAt | String | no | - | Creation time of a screen view |
| data | Object | no | - | Content of a screen view |
| id | String | no | - | Screen view ID |
| hash | String | no | - | Screen view hash |
| name | String | no | - | Screen view name |
| parentVersion | String | no | - | Screen view parent version |
| path | String | no | - | Screen view path |
| priority | Integer | no | - | Screen view priority |
| updatedAt | String | no | - | Screen view update time |
| version | String | no | - | Screen view version |
Initializers:
There are no initializers.
Methods:
Getters and setters for the above properties.
ScreenViewResponse.Audience
Audience model for screen view campaigns.
Declared In:
com.synerise.sdk.content.model.Audience
Declaration:
public class Audience
Properties:
| Property | Type | Optional | Default | Description |
|---|---|---|---|---|
| ids | List |
no | - | List of segmentation IDs |
| query | String | no | - | Query for the analytics engine |
Methods:
There are getters and setters for the above properties.