Skip to content

Commit 3a5294f

Browse files
authored
Merge pull request #17 from getbrevo/N8N-3466
N8N-3466 : Update SDK for Loyalty APIs
2 parents 18ac650 + 63428d2 commit 3a5294f

15 files changed

Lines changed: 237 additions & 101 deletions

docs/BalanceApi.md

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -672,7 +672,7 @@ Name | Type | Description | Notes
672672

673673
<a name="getContactBalances"></a>
674674
# **getContactBalances**
675-
> ContactBalancesResp getContactBalances(pid)
675+
> ContactBalancesResp getContactBalances(pid, includeInternal)
676676
677677
Get balance list
678678

@@ -703,8 +703,9 @@ partnerKey.setApiKey("YOUR PARTNER KEY");
703703

704704
BalanceApi apiInstance = new BalanceApi();
705705
UUID pid = new UUID(); // UUID | Loyalty Program Id
706+
Boolean includeInternal = true; // Boolean | Include Internal
706707
try {
707-
ContactBalancesResp result = apiInstance.getContactBalances(pid);
708+
ContactBalancesResp result = apiInstance.getContactBalances(pid, includeInternal);
708709
System.out.println(result);
709710
} catch (ApiException e) {
710711
System.err.println("Exception when calling BalanceApi#getContactBalances");
@@ -717,6 +718,7 @@ try {
717718
Name | Type | Description | Notes
718719
------------- | ------------- | ------------- | -------------
719720
**pid** | [**UUID**](.md)| Loyalty Program Id |
721+
**includeInternal** | **Boolean**| Include Internal | [optional]
720722

721723
### Return type
722724

@@ -733,7 +735,7 @@ Name | Type | Description | Notes
733735

734736
<a name="getSubscriptionBalances"></a>
735737
# **getSubscriptionBalances**
736-
> ModelSubscriptionBalanceResp getSubscriptionBalances(cid, pid)
738+
> ModelSubscriptionBalanceResp getSubscriptionBalances(cid, pid, includeInternal)
737739
738740
Get subscription balances
739741

@@ -765,8 +767,9 @@ partnerKey.setApiKey("YOUR PARTNER KEY");
765767
BalanceApi apiInstance = new BalanceApi();
766768
String cid = "cid_example"; // String | Contact Id
767769
UUID pid = new UUID(); // UUID | Loyalty Program Id
770+
Boolean includeInternal = true; // Boolean | Include Internal
768771
try {
769-
ModelSubscriptionBalanceResp result = apiInstance.getSubscriptionBalances(cid, pid);
772+
ModelSubscriptionBalanceResp result = apiInstance.getSubscriptionBalances(cid, pid, includeInternal);
770773
System.out.println(result);
771774
} catch (ApiException e) {
772775
System.err.println("Exception when calling BalanceApi#getSubscriptionBalances");
@@ -780,6 +783,7 @@ Name | Type | Description | Notes
780783
------------- | ------------- | ------------- | -------------
781784
**cid** | **String**| Contact Id |
782785
**pid** | [**UUID**](.md)| Loyalty Program Id |
786+
**includeInternal** | **Boolean**| Include Internal | [optional]
783787

784788
### Return type
785789

@@ -796,7 +800,7 @@ Name | Type | Description | Notes
796800

797801
<a name="loyaltyBalanceProgramsPidActiveBalanceGet"></a>
798802
# **loyaltyBalanceProgramsPidActiveBalanceGet**
799-
> BalanceLimit loyaltyBalanceProgramsPidActiveBalanceGet(pid, contactId, balanceDefinitionId, limit, offset, sortField, sort)
803+
> BalanceLimit loyaltyBalanceProgramsPidActiveBalanceGet(pid, contactId, balanceDefinitionId, limit, offset, sortField, sort, includeInternal)
800804
801805
Get Active Balances API
802806

@@ -833,8 +837,9 @@ Integer limit = 56; // Integer | Limit
833837
Integer offset = 56; // Integer | Offset
834838
String sortField = "sortField_example"; // String | Sort Field
835839
String sort = "sort_example"; // String | Sort Order
840+
Boolean includeInternal = true; // Boolean | Include Internal
836841
try {
837-
BalanceLimit result = apiInstance.loyaltyBalanceProgramsPidActiveBalanceGet(pid, contactId, balanceDefinitionId, limit, offset, sortField, sort);
842+
BalanceLimit result = apiInstance.loyaltyBalanceProgramsPidActiveBalanceGet(pid, contactId, balanceDefinitionId, limit, offset, sortField, sort, includeInternal);
838843
System.out.println(result);
839844
} catch (ApiException e) {
840845
System.err.println("Exception when calling BalanceApi#loyaltyBalanceProgramsPidActiveBalanceGet");
@@ -853,6 +858,7 @@ Name | Type | Description | Notes
853858
**offset** | **Integer**| Offset | [optional]
854859
**sortField** | **String**| Sort Field | [optional]
855860
**sort** | **String**| Sort Order | [optional]
861+
**includeInternal** | **Boolean**| Include Internal | [optional]
856862

857863
### Return type
858864

@@ -997,7 +1003,7 @@ Name | Type | Description | Notes
9971003

9981004
<a name="loyaltyBalanceProgramsPidTransactionHistoryGet"></a>
9991005
# **loyaltyBalanceProgramsPidTransactionHistoryGet**
1000-
> TransactionHistoryResp loyaltyBalanceProgramsPidTransactionHistoryGet(pid, contactId, balanceDefinitionId, limit, offset, sortField, sort, filters)
1006+
> TransactionHistoryResp loyaltyBalanceProgramsPidTransactionHistoryGet(pid, contactId, balanceDefinitionId, limit, offset, sortField, sort, filters, status, transactionType)
10011007
10021008
Get Transaction History API
10031009

@@ -1035,8 +1041,10 @@ Integer offset = 0; // Integer | Skip a number of records
10351041
String sortField = "createdAt"; // String | Field to sort by
10361042
String sort = "desc"; // String | Sort order, either asc or desc
10371043
List<String> filters = Arrays.asList("filters_example"); // List<String> | Filters to apply
1044+
String status = "status_example"; // String | Filter by transaction status
1045+
String transactionType = "transactionType_example"; // String | Filter by transaction type
10381046
try {
1039-
TransactionHistoryResp result = apiInstance.loyaltyBalanceProgramsPidTransactionHistoryGet(pid, contactId, balanceDefinitionId, limit, offset, sortField, sort, filters);
1047+
TransactionHistoryResp result = apiInstance.loyaltyBalanceProgramsPidTransactionHistoryGet(pid, contactId, balanceDefinitionId, limit, offset, sortField, sort, filters, status, transactionType);
10401048
System.out.println(result);
10411049
} catch (ApiException e) {
10421050
System.err.println("Exception when calling BalanceApi#loyaltyBalanceProgramsPidTransactionHistoryGet");
@@ -1056,6 +1064,8 @@ Name | Type | Description | Notes
10561064
**sortField** | **String**| Field to sort by | [optional] [default to createdAt] [enum: createdAt]
10571065
**sort** | **String**| Sort order, either asc or desc | [optional] [default to desc] [enum: asc, desc]
10581066
**filters** | [**List&lt;String&gt;**](String.md)| Filters to apply | [optional]
1067+
**status** | **String**| Filter by transaction status | [optional]
1068+
**transactionType** | **String**| Filter by transaction type | [optional]
10591069

10601070
### Return type
10611071

docs/CreateBalanceDefinitionPayload.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Name | Type | Description | Notes
1616
**maxAmount** | [**BigDecimal**](BigDecimal.md) | Maximum allowable balance amount. | [optional]
1717
**maxCreditAmountLimit** | [**BigDecimal**](BigDecimal.md) | Maximum credit allowed per operation. | [optional]
1818
**maxDebitAmountLimit** | [**BigDecimal**](BigDecimal.md) | Maximum debit allowed per operation. | [optional]
19-
**meta** | **Object** | Additional metadata for the balance definition. | [optional]
19+
**meta** | **Map&lt;String, Object&gt;** | Additional metadata for the balance definition. | [optional]
2020
**minAmount** | [**BigDecimal**](BigDecimal.md) | Minimum allowable balance amount. | [optional]
2121
**name** | **String** | Name of the balance definition. |
2222
**unit** | [**UnitEnum**](#UnitEnum) | Unit of balance measurement. |

docs/CreateTierGroupRequest.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ Name | Type | Description | Notes
88
**upgradeStrategy** | [**UpgradeStrategyEnum**](#UpgradeStrategyEnum) | Select real_time to upgrade tier on real time balance updates. Select membership_anniversary to upgrade tier on subscription anniversary. Select tier_anniversary to upgrade tier on tier anniversary. | [optional]
99
**downgradeStrategy** | [**DowngradeStrategyEnum**](#DowngradeStrategyEnum) | Select real_time to downgrade tier on real time balance updates. Select membership_anniversary to downgrade tier on subscription anniversary. Select tier_anniversary to downgrade tier on tier anniversary. | [optional]
1010
**tierOrder** | **List&lt;String&gt;** | Order of the tiers in the group in ascending order | [optional]
11+
**meta** | **Map&lt;String, Object&gt;** | Additional metadata for the tier group | [optional]
1112

1213

1314
<a name="UpgradeStrategyEnum"></a>

docs/ProgramApi.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,7 @@ Name | Type | Description | Notes
331331

332332
<a name="getParameterSubscriptionInfo"></a>
333333
# **getParameterSubscriptionInfo**
334-
> SubscriptionHandlerInfo getParameterSubscriptionInfo(pid, contactId, params, loyaltySubscriptionId)
334+
> SubscriptionHandlerInfo getParameterSubscriptionInfo(pid, contactId, params, loyaltySubscriptionId, includeInternal)
335335
336336
Get Subscription Data
337337

@@ -365,8 +365,9 @@ UUID pid = new UUID(); // UUID | Loyalty Program Id
365365
String contactId = "contactId_example"; // String | Contact Id
366366
String params = "params_example"; // String | Filter List
367367
String loyaltySubscriptionId = "loyaltySubscriptionId_example"; // String | Loyalty Subscription Id
368+
Boolean includeInternal = true; // Boolean | Include Internal
368369
try {
369-
SubscriptionHandlerInfo result = apiInstance.getParameterSubscriptionInfo(pid, contactId, params, loyaltySubscriptionId);
370+
SubscriptionHandlerInfo result = apiInstance.getParameterSubscriptionInfo(pid, contactId, params, loyaltySubscriptionId, includeInternal);
370371
System.out.println(result);
371372
} catch (ApiException e) {
372373
System.err.println("Exception when calling ProgramApi#getParameterSubscriptionInfo");
@@ -382,6 +383,7 @@ Name | Type | Description | Notes
382383
**contactId** | **String**| Contact Id | [optional]
383384
**params** | **String**| Filter List | [optional]
384385
**loyaltySubscriptionId** | **String**| Loyalty Subscription Id | [optional]
386+
**includeInternal** | **Boolean**| Include Internal | [optional]
385387

386388
### Return type
387389

@@ -428,8 +430,8 @@ partnerKey.setApiKey("YOUR PARTNER KEY");
428430
//partner-key.setApiKeyPrefix("Token");
429431

430432
ProgramApi apiInstance = new ProgramApi();
431-
Object pid = null; // Object | Loyalty Program ID. A unique identifier for the loyalty program.
432-
Object cid = null; // Object | Contact ID.
433+
UUID pid = new UUID(); // UUID | Loyalty Program ID. A unique identifier for the loyalty program.
434+
Integer cid = 56; // Integer | Contact ID.
433435
try {
434436
TransactionHistoryResp result = apiInstance.loyaltyConfigProgramsPidContactCidDelete(pid, cid);
435437
System.out.println(result);
@@ -443,8 +445,8 @@ try {
443445

444446
Name | Type | Description | Notes
445447
------------- | ------------- | ------------- | -------------
446-
**pid** | [**Object**](.md)| Loyalty Program ID. A unique identifier for the loyalty program. |
447-
**cid** | [**Object**](.md)| Contact ID. |
448+
**pid** | [**UUID**](.md)| Loyalty Program ID. A unique identifier for the loyalty program. |
449+
**cid** | **Integer**| Contact ID. |
448450

449451
### Return type
450452

docs/SubscriptionHandlerInfo.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
## Properties
55
Name | Type | Description | Notes
66
------------ | ------------- | ------------- | -------------
7-
**balance** | **Object** | Balance details for the subscription. | [optional]
7+
**balance** | [**SubscriptionBalances**](SubscriptionBalances.md) | Balance details for the subscription. | [optional]
88
**members** | [**List&lt;MemberContact&gt;**](MemberContact.md) | List of members associated with the subscription. | [optional]
99
**reward** | [**List&lt;SubscriptionAttributedReward&gt;**](SubscriptionAttributedReward.md) | List of rewards associated with the subscription. | [optional]
1010
**tier** | [**List&lt;SubscriptionTier&gt;**](SubscriptionTier.md) | List of tier assignments for the subscription. | [optional]

docs/UpdateBalanceDefinitionPayload.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Name | Type | Description | Notes
1616
**maxAmount** | [**BigDecimal**](BigDecimal.md) | Maximum allowable balance amount. | [optional]
1717
**maxCreditAmountLimit** | [**BigDecimal**](BigDecimal.md) | Maximum credit allowed per operation. | [optional]
1818
**maxDebitAmountLimit** | [**BigDecimal**](BigDecimal.md) | Maximum debit allowed per operation. | [optional]
19-
**meta** | **Object** | Optional metadata for the balance definition. | [optional]
19+
**meta** | **Map&lt;String, Object&gt;** | Optional metadata for the balance definition. | [optional]
2020
**minAmount** | [**BigDecimal**](BigDecimal.md) | Minimum allowable balance amount. | [optional]
2121
**name** | **String** | Name of the balance definition. |
2222
**unit** | [**UnitEnum**](#UnitEnum) | Unit of balance measurement. |

docs/UpdateTierGroupRequest.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ Name | Type | Description | Notes
77
**name** | **String** | Name of the tier group |
88
**tierOrder** | [**List&lt;UUID&gt;**](UUID.md) | Order of the tiers in the group in ascending order |
99
**upgradeStrategy** | [**UpgradeStrategyEnum**](#UpgradeStrategyEnum) | Select real_time to upgrade tier on real time balance updates. Select membership_anniversary to upgrade tier on subscription anniversary. Select tier_anniversary to upgrade tier on tier anniversary. |
10-
**downgradeStrategy** | [**DowngradeStrategyEnum**](#DowngradeStrategyEnum) | Select real_time to downgrade tier on real time balance updates. Select membership_anniversary to downgrade tier on subscription anniversary. Select tier_anniversary to downgrade tier on tier anniversary. |
10+
**downgradeStrategy** | [**DowngradeStrategyEnum**](#DowngradeStrategyEnum) | Select real_time to downgrade tier on real time balance updates. Select membership_anniversary to downgrade tier on subscription anniversary. Select tier_anniversary to downgrade tier on tier anniversary. |
11+
**meta** | **Map&lt;String, Object&gt;** | Additional metadata for the tier group | [optional]
1112

1213

1314
<a name="UpgradeStrategyEnum"></a>

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<modelVersion>4.0.0</modelVersion>
44
<groupId>com.brevo</groupId>
55
<artifactId>brevo</artifactId>
6-
<version>1.1.2</version>
6+
<version>1.1.3</version>
77
<packaging>jar</packaging>
88

99
<name>brevo</name>

0 commit comments

Comments
 (0)