Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions doc/controllers/coupons.md
Original file line number Diff line number Diff line change
Expand Up @@ -872,6 +872,12 @@ try {
}
```

## Errors

| HTTP Status Code | Error Description | Exception Class |
| --- | --- | --- |
| 422 | Unprocessable Entity (WebDAV) | [`ErrorStringMapResponseException`](../../doc/models/error-string-map-response-exception.md) |


# Create Coupon Subcodes

Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ Maxio integrates directly into your product, so you can seamlessly manage your p
<dependency>
<groupId>io.apimatic</groupId>
<artifactId>core</artifactId>
<version>[0.6.4, 0.7)</version>
<version>[0.6.6, 0.7)</version>
</dependency>
<dependency>
<groupId>io.apimatic</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import com.maxio.advancedbilling.Server;
import com.maxio.advancedbilling.exceptions.ApiException;
import com.maxio.advancedbilling.exceptions.ErrorListResponseException;
import com.maxio.advancedbilling.exceptions.ErrorStringMapResponseException;
import com.maxio.advancedbilling.exceptions.SingleStringErrorResponseException;
import com.maxio.advancedbilling.http.request.HttpMethod;
import com.maxio.advancedbilling.models.CouponCurrencyRequest;
Expand Down Expand Up @@ -558,6 +559,9 @@ private ApiCall<CouponCurrencyResponse, ApiException> prepareCreateOrUpdateCoupo
.deserializer(
response -> ApiHelper.deserialize(response, CouponCurrencyResponse.class))
.nullify404(false)
.localErrorCase("422",
ErrorCase.setTemplate("HTTP Response Not OK. Status code: {$statusCode}. Response: '{$response.body}'.",
(reason, context) -> new ErrorStringMapResponseException(reason, context)))
.globalErrorCase(GLOBAL_ERROR_CASES))
.build();
}
Expand Down
Loading