com.microsoft.store.partnercenter.customers.servicecosts.ServiceCostSummaryOperations Maven / Gradle / Ivy
// -----------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
// -----------------------------------------------------------------------
package com.microsoft.store.partnercenter.customers.servicecosts;
import java.text.MessageFormat;
import com.fasterxml.jackson.core.type.TypeReference;
import com.microsoft.store.partnercenter.BasePartnerComponent;
import com.microsoft.store.partnercenter.IPartner;
import com.microsoft.store.partnercenter.PartnerService;
import com.microsoft.store.partnercenter.models.servicecosts.ServiceCostsSummary;
import com.microsoft.store.partnercenter.models.utils.Tuple;
/**
* This class implements the operations for a customer's service costs summary.
*/
public class ServiceCostSummaryOperations
extends BasePartnerComponent>
implements IServiceCostSummary
{
/**
* Initializes a new instance of the ServiceCostSummaryOperations class.
*
* @param rootPartnerOperations The root partner operations instance.
* @param context The context, including customer id and billing period..
*/
public ServiceCostSummaryOperations( IPartner rootPartnerOperations, Tuple context )
{
super( rootPartnerOperations, context );
if ( context == null )
{
throw new IllegalArgumentException( "context must be set" );
}
}
/**
* Retrieves a customer's service cost line items.
*
* @return The service cost line items.
*/
@Override
public ServiceCostsSummary get()
{
return this.getPartner().getServiceClient().get(
this.getPartner(),
new TypeReference(){},
MessageFormat.format(
PartnerService.getInstance().getConfiguration().getApis().get("GetCustomerServiceCostsSummary").getPath(),
this.getContext().getItem1(),
this.getContext().getItem2()));
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy