Skip to content

Commit 61fc091

Browse files
authored
Releasing v3.37.0 (#58)
1 parent 5026fc3 commit 61fc091

47 files changed

Lines changed: 3511 additions & 2676 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

CHANGELOG.md

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,59 @@
1+
### v3.37.0 ( 2025-09-23)
2+
* * *
3+
4+
### New Resources:
5+
* PersonalizedOffer has been added.
6+
* OfferFulfillment has been added.
7+
* OfferEvent has been added.
8+
* OmnichannelSubscriptionItemOffer has been added.
9+
10+
### New Attributes:
11+
* business_entity_id has been added to Customer#Balance.
12+
* processor_advice_code has been added to GatewayErrorDetail.
13+
* processor_advice_code has been added to Transaction#GatewayErrorDetail.
14+
* omnichannel_subscription_item_offers has been added to OmnichannelSubscriptionItem.
15+
* linked_omnichannel_subscriptions has been added to OmnichannelTransaction.
16+
* linked_omnichannel_one_time_orders has been added to OmnichannelTransaction.
17+
* contract_term has been added to Ramp.
18+
* charge_once has been added to Ramp#ItemsToAdd.
19+
* charge_on_option has been added to Ramp#ItemsToAdd.
20+
* charge_on_event has been added to Ramp#ItemsToAdd.
21+
* charge_once has been added to Ramp#ItemsToUpdate.
22+
* charge_on_option has been added to Ramp#ItemsToUpdate.
23+
* charge_on_event has been added to Ramp#ItemsToUpdate.
24+
* error_file_path has been added to UsageFile.
25+
* error_file_url has been added to UsageFile.
26+
27+
### New Endpoint:
28+
* move has been added to OmnichannelSubscription.
29+
30+
### New Parameters:
31+
* offline_payment_method has been added to Estimate#CreateSubItemEstimateRequest.
32+
* offline_payment_method has been added to Estimate#CreateSubItemForCustomerEstimateRequest.
33+
* offline_payment_method has been added to HostedPage#CheckoutNewForItemsRequest.
34+
* offline_payment_method has been added to Quote#SubscriptionCreateSubItemsForCustomerQuoteRequest.
35+
* offline_payment_method has been added to Quote#SubscriptionEditCreateSubCustomerQuoteForItemsRequest.
36+
* contract_term has been added to Ramp#CreateForSubscriptionRequest.
37+
* items_to_add has been added to Ramp#CreateForSubscriptionRequest.
38+
* items_to_update has been added to Ramp#CreateForSubscriptionRequest.
39+
* contract_term has been added to Ramp#UpdateRequest.
40+
* items_to_add has been added to Ramp#UpdateRequest.
41+
* items_to_update has been added to Ramp#UpdateRequest.
42+
43+
### New Enums:
44+
* DUNNING_UPDATED has been added EventType.
45+
* OMNICHANNEL_SUBSCRIPTION_MOVED_IN has been added to EventType.
46+
47+
48+
### Bug Fixes:
49+
* currency list action has been marked as ListRequest.
50+
* index has been removed from CreditNote#ShippingAddress.
51+
* index has been removed from Invoice#ShippingAddress
52+
* index has been removed from Order#ShippingAddress.
53+
* index has been removed from Quote#ShippingAddress.
54+
* index has been removed from SubscriptionEstimate#ShippingAddress.
55+
* index has been removed from Subscription#ShippingAddress.
56+
157
### v3.36.1 (2025-09-16)
258
* * *
359

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
<groupId>com.chargebee</groupId>
66
<artifactId>chargebee-java</artifactId>
7-
<version>3.36.1</version>
7+
<version>3.37.0</version>
88

99

1010
<packaging>jar</packaging>

src/main/java/com/chargebee/Environment.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public class Environment {
3838

3939
public static final String API_VERSION = "v2";
4040

41-
public static final String LIBRARY_VERSION = "3.36.1";
41+
public static final String LIBRARY_VERSION = "3.37.0";
4242

4343
private final String apiBaseUrl;
4444

src/main/java/com/chargebee/internal/HttpUtil.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -215,12 +215,9 @@ private static Resp sendRequest(HttpURLConnection conn) throws IOException {
215215
int httpRespCode = conn.getResponseCode();
216216
final String UBB_BATCH_INGESTION_INVALID_REQUEST = "ubb_batch_ingestion_invalid_request";
217217
Map<String, List<String>> responseHeaders = conn.getHeaderFields();
218-
if (httpRespCode == HttpURLConnection.HTTP_NO_CONTENT) {
219-
throw new RuntimeException("Got http_no_content response");
220-
}
221218
boolean error = httpRespCode < 200 || httpRespCode > 299;
222219
String content = getContentAsString(conn, error);
223-
JSONObject jsonResp = getContentAsJSON(content);
220+
JSONObject jsonResp = getContentAsJSON(content, httpRespCode);
224221
if (error) {
225222
try {
226223
jsonResp.getString("api_error_code");
@@ -297,8 +294,11 @@ private static String getAuthValue(Environment config) {
297294
.replaceAll("\r?", "").replaceAll("\n?", "");
298295
}
299296

300-
private static JSONObject getContentAsJSON(String content) throws IOException {
297+
private static JSONObject getContentAsJSON(String content, int httpRespCode) throws IOException {
301298
try {
299+
if(httpRespCode == 204) {
300+
return null;
301+
}
302302
return new JSONObject(content);
303303
} catch (JSONException exp) {
304304
if (content.contains("503")){

src/main/java/com/chargebee/internal/ResultBase.java

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -352,10 +352,22 @@ public UsageFile usageFile() {
352352
return (UsageFile)get("usage_file");
353353
}
354354

355+
public PersonalizedOffer personalizedOffer() {
356+
return (PersonalizedOffer)get("personalized_offer");
357+
}
358+
355359
public Brand brand() {
356360
return (Brand)get("brand");
357361
}
358362

363+
public OfferFulfillment offerFulfillment() {
364+
return (OfferFulfillment)get("offer_fulfillment");
365+
}
366+
367+
public OfferEvent offerEvent() {
368+
return (OfferEvent)get("offer_event");
369+
}
370+
359371
public WebhookEndpoint webhookEndpoint() {
360372
return (WebhookEndpoint)get("webhook_endpoint");
361373
}
@@ -408,6 +420,10 @@ public List<InAppSubscription> inAppSubscriptions() {
408420
return (List<InAppSubscription>) getList("in_app_subscriptions", "in_app_subscription");
409421
}
410422

423+
public List<PersonalizedOffer> personalizedOffers() {
424+
return (List<PersonalizedOffer>) getList("personalized_offers", "personalized_offer");
425+
}
426+
411427

412428
private List<? extends Resource> getList(String pluralName, String singularName) {
413429
JSONArray listModels = jsonObj.optJSONArray(pluralName);
@@ -446,6 +462,9 @@ public JSONObject jsonObj(){
446462
@Override
447463
public String toString() {
448464
try {
465+
if(jsonObj == null){
466+
return null;
467+
}
449468
return jsonObj.toString(2);
450469
} catch (JSONException ex) {
451470
throw new RuntimeException(ex);

src/main/java/com/chargebee/models/Card.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,7 @@ public UpdateCardForCustomerRequest customerVatNumber(String customerVatNumber)
358358
params.addOpt("customer[vat_number]", customerVatNumber);
359359
return this;
360360
}
361-
361+
362362
@Override
363363
public Params params() {
364364
return params;

src/main/java/com/chargebee/models/CreditNote.java

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -595,10 +595,6 @@ public ValidationStatus validationStatus() {
595595
return optEnum("validation_status", ValidationStatus.class);
596596
}
597597

598-
public Integer index() {
599-
return reqInteger("index");
600-
}
601-
602598
}
603599

604600
public static class BillingAddress extends Resource<BillingAddress> {
@@ -1198,32 +1194,32 @@ public RecordRefundRequest transactionId(String transactionId) {
11981194
params.addOpt("transaction[id]", transactionId);
11991195
return this;
12001196
}
1201-
1197+
12021198
public RecordRefundRequest transactionAmount(Long transactionAmount) {
12031199
params.addOpt("transaction[amount]", transactionAmount);
12041200
return this;
12051201
}
1206-
1202+
12071203
public RecordRefundRequest transactionPaymentMethod(com.chargebee.models.enums.PaymentMethod transactionPaymentMethod) {
12081204
params.add("transaction[payment_method]", transactionPaymentMethod);
12091205
return this;
12101206
}
1211-
1207+
12121208
public RecordRefundRequest transactionReferenceNumber(String transactionReferenceNumber) {
12131209
params.addOpt("transaction[reference_number]", transactionReferenceNumber);
12141210
return this;
12151211
}
1216-
1212+
12171213
public RecordRefundRequest transactionCustomPaymentMethodId(String transactionCustomPaymentMethodId) {
12181214
params.addOpt("transaction[custom_payment_method_id]", transactionCustomPaymentMethodId);
12191215
return this;
12201216
}
1221-
1217+
12221218
public RecordRefundRequest transactionDate(Timestamp transactionDate) {
12231219
params.add("transaction[date]", transactionDate);
12241220
return this;
12251221
}
1226-
1222+
12271223
@Override
12281224
public Params params() {
12291225
return params;
@@ -1390,7 +1386,7 @@ public RemoveTaxWithheldRefundRequest taxWithheldId(String taxWithheldId) {
13901386
params.add("tax_withheld[id]", taxWithheldId);
13911387
return this;
13921388
}
1393-
1389+
13941390
@Override
13951391
public Params params() {
13961392
return params;

0 commit comments

Comments
 (0)