Skip to content
This repository was archived by the owner on Jul 22, 2024. It is now read-only.

Commit 1f0a07a

Browse files
author
Isaiah Williams
authored
Added the ability to remove the reseller relationship (#58)
1 parent 6ac2872 commit 1f0a07a

6 files changed

Lines changed: 31 additions & 9 deletions

File tree

ChangeLog.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,12 @@
2020

2121
# Change Log
2222

23-
## Upcoming Release
23+
## 1.13.4
24+
25+
* Customers
26+
* Added the ability to remove the reseller relationship
27+
28+
## 1.13.3
2429

2530
* Subscriptions
2631
* Addressed issue [#54](https://github.com/microsoft/Partner-Center-Java/issues/54) by renaming the billing cycle type functions in the conversion class from getBillingCycleType/setBillingCycleType to getBillingCycle/setBillingCycle

README.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Partner Center Java SDK
22

3-
![Build Status](https://dev.azure.com/partnercenter/sdk/_apis/build/status/partner-center-java-CI)
3+
![Build status](https://dev.azure.com/partnercenter/sdk/_apis/build/status/partner-center-java-CI)
44

55
[![Maven Central](https://img.shields.io/maven-central/v/com.microsoft.store/partnercenter.svg?label=Maven%20Central)](https://search.maven.org/search?q=g:%22com.microsoft.store%22%20AND%20a:%22partnercenter%22) [![GitHub issues](https://img.shields.io/github/issues/Microsoft/Partner-Center-Java.svg)](https://github.com/Microsoft/Partner-Center-Java/issues/) [![GitHub pull-requests](https://img.shields.io/github/issues-pr/Microsoft/Partner-Center-Java.svg)](https://gitHub.com/Microsoft/Partner-Center-Java/pull/)
66

@@ -14,7 +14,7 @@ Jar dependency binary information for maven and gradle can be found here at [mav
1414
<dependency>
1515
<groupId>com.microsoft.store</groupId>
1616
<artifactId>partnercenter</artifactId>
17-
<version>1.13.2</version>
17+
<version>1.13.4</version>
1818
</dependency>
1919
```
2020

@@ -45,5 +45,3 @@ mvn clean package
4545
## Related Projects
4646

4747
[Partner Center Java SDK Samples](https://github.com/Microsoft/Partner-Center-Java-Samples) - Sample console application that demonstrates the supported scenarios of this SDK.
48-
49-
[Partner Center .NET SDK Samples](https://github.com/PartnerCenterSamples/Partner-Center-SDK-Samples) - Sample console application that demonstrates the supported scenarios of the Partner Center .NET SDK.

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
<modelVersion>4.0.0</modelVersion>
99
<groupId>com.microsoft.store</groupId>
1010
<artifactId>partnercenter</artifactId>
11-
<version>1.13.3</version>
11+
<version>1.13.4</version>
1212
<packaging>jar</packaging>
1313
<name>Partner Center Java SDK</name>
1414
<description>SDK for accessing Microsoft Partner Center API.</description>

src/main/java/com/microsoft/store/partnercenter/customers/CustomerOperations.java

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -422,7 +422,7 @@ public IDirectoryRoleCollection getDirectoryRoles()
422422
}
423423

424424
/**
425-
* Obtains the subscribed skus for the customer.
425+
* Obtains the subscribed SKUs for the customer.
426426
*
427427
* @return The customer usage spending budget operations.
428428
*/
@@ -601,6 +601,24 @@ public Customer get()
601601
this.getContext()));
602602
}
603603

604+
/**
605+
* Removes the relationship between the partner and customer when RelationshipToPartner == CustomerPartnerRelationship.NONE.
606+
*
607+
* @param customer A customer with RelationshipToPartner == CustomerPartnerRelationship.NONE.
608+
* @return The information for the modified customer.
609+
*/
610+
@Override
611+
public Customer patch(Customer customer)
612+
{
613+
return this.getPartner().getServiceClient().patch(
614+
this.getPartner(),
615+
new TypeReference<Customer>(){},
616+
MessageFormat.format(
617+
PartnerService.getInstance().getConfiguration().getApis().get("RemoveCustomerRelationship").getPath(),
618+
this.getContext()),
619+
customer);
620+
}
621+
604622
/**
605623
* Deletes the customer from a testing in production account. This only works for customer in the integration sandbox.
606624
*/

src/main/java/com/microsoft/store/partnercenter/customers/ICustomer.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
import com.microsoft.store.partnercenter.entitlements.IEntitlementCollection;
2121
import com.microsoft.store.partnercenter.genericoperations.IEntityDeleteOperations;
2222
import com.microsoft.store.partnercenter.genericoperations.IEntityGetOperations;
23+
import com.microsoft.store.partnercenter.genericoperations.IEntityPatchOperations;
2324
import com.microsoft.store.partnercenter.managedservices.IManagedServiceCollection;
2425
import com.microsoft.store.partnercenter.models.customers.Customer;
2526
import com.microsoft.store.partnercenter.offers.ICustomerOfferCategoryCollection;
@@ -37,7 +38,7 @@
3738
* Groups operations that can be performed on a single partner customer.
3839
*/
3940
public interface ICustomer
40-
extends IPartnerComponentString, IEntityGetOperations<Customer>, IEntityDeleteOperations<Customer>
41+
extends IPartnerComponentString, IEntityGetOperations<Customer>, IEntityDeleteOperations<Customer>, IEntityPatchOperations<Customer>
4142
{
4243
/**
4344
* Gets the agreements behavior for the customer.

src/main/resources/PartnerService.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"DefaultAuthenticationTokenExpiryBufferInSeconds": "30",
66
"DefaultLocale": "en-US",
77
"PartnerCenterClient": "Partner Center Java SDK",
8-
"SdkVersion": "1.13.3",
8+
"SdkVersion": "1.13.4",
99
"Apis": {
1010
"PartnerLicensesDeploymentInsights": {
1111
"Path": "analytics/licenses/deployment"

0 commit comments

Comments
 (0)