All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.microsoft.store.partnercenter.customers.servicecosts.ServiceCostLineItemsOperations Maven / Gradle / Ivy

There is a newer version: 1.15.3
Show newest version
// -----------------------------------------------------------------------
// 
//      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.models.ResourceCollection;
import com.microsoft.store.partnercenter.models.servicecosts.ServiceCostLineItem;
import com.microsoft.store.partnercenter.models.utils.Tuple;
import com.microsoft.store.partnercenter.PartnerService;
import com.microsoft.store.partnercenter.network.IPartnerServiceProxy;
import com.microsoft.store.partnercenter.network.PartnerServiceProxy;

/**
 * Represents the behavior of the customer service cost line items as a whole.
 */
public class ServiceCostLineItemsOperations
    extends BasePartnerComponent>
    implements IServiceCostLineItemsCollection
{
    /**
     * Initializes a new instance of the ServiceCostLineItemsOperations class.
     * 
     * @param rootPartnerOperations The root partner operations instance.
     * @param context The context, including customer id and billing period..
     */
    public ServiceCostLineItemsOperations( 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 ResourceCollection get()
    {
        IPartnerServiceProxy> partnerServiceProxy =
        new PartnerServiceProxy<>( 
            new TypeReference>()
            {
            }, 
            this.getPartner(), 
            MessageFormat.format( 
                PartnerService.getInstance().getConfiguration().getApis().get( "GetCustomerServiceCostLineItems" ).getPath(),
                this.getContext().getItem1(), 
                this.getContext().getItem2() ) );

        return partnerServiceProxy.get();
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy