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

com.mastercard.api.directoryservices.MappingAccountAdditionalData Maven / Gradle / Ivy

/*
 * Copyright 2016 MasterCard International.
 *
 * Redistribution and use in source and binary forms, with or without modification, are 
 * permitted provided that the following conditions are met:
 *
 * Redistributions of source code must retain the above copyright notice, this list of 
 * conditions and the following disclaimer.
 * Redistributions in binary form must reproduce the above copyright notice, this list of 
 * conditions and the following disclaimer in the documentation and/or other materials 
 * provided with the distribution.
 * Neither the name of the MasterCard International Incorporated nor the names of its 
 * contributors may be used to endorse or promote products derived from this software 
 * without specific prior written permission.
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 
 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
 * SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
 * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 
 * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER 
 * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 
 * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 
 * SUCH DAMAGE.
 *
 */

package com.mastercard.api.directoryservices;

import com.mastercard.api.core.exception.*;
import com.mastercard.api.core.model.*;
import com.mastercard.api.core.security.*;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

public class MappingAccountAdditionalData extends BaseObject  {

    private static Map operationConfigs;

    static {
        operationConfigs = new HashMap();
        operationConfigs.put("c5a888af-5963-49dd-962e-f4c5fea9b1d5", new OperationConfig("/send/#env/v1/partners/{partnerId}/mappings/{mappingId}/accounts/{accountId}/additional-data/{additionalDataId}", Action.delete, Arrays.asList(""), Arrays.asList("")));
        operationConfigs.put("2817530b-663c-4886-b89a-66e1953718ce", new OperationConfig("/send/#env/v1/partners/{partnerId}/mappings/{mappingId}/accounts/{accountId}/additional-data", Action.query, Arrays.asList(""), Arrays.asList("")));
        operationConfigs.put("071e3b0e-2798-4146-bede-f2f14157a96f", new OperationConfig("/send/#env/v1/partners/{partnerId}/mappings/{mappingId}/accounts/{accountId}/additional-data/{additionalDataId}", Action.read, Arrays.asList(""), Arrays.asList("")));
        operationConfigs.put("43daab27-7d4a-428e-8132-9db5711c9c4a", new OperationConfig("/send/#env/v1/partners/{partnerId}/mappings/{mappingId}/accounts/{accountId}/additional-data/{additionalDataId}", Action.update, Arrays.asList(""), Arrays.asList("x-oaep-hashing-algorithm","x-encrypted-key","x-public-key-fingerprint","x-iv")));
    }

    public MappingAccountAdditionalData() {
    }

    public MappingAccountAdditionalData(BaseObject o) {
        putAll(o);
    }

    public MappingAccountAdditionalData(RequestMap requestMap) {
        putAll(requestMap);
    }

    @Override protected final OperationConfig getOperationConfig(String operationUUID) throws IllegalArgumentException{
        OperationConfig operationConfig = operationConfigs.get(operationUUID);

        if(operationConfig == null) {
            throw new IllegalArgumentException("Invalid operationUUID supplied: " + operationUUID);
        }

        return operationConfig;
    }

    @Override protected OperationMetadata getOperationMetadata() throws IllegalArgumentException {
        return new OperationMetadata(ResourceConfig.getInstance().getVersion(), ResourceConfig.getInstance().getHost(), ResourceConfig.getInstance().getContext(), ResourceConfig.getInstance().getJsonNative(), ResourceConfig.getInstance().getContentTypeOverride());
    }




    /**
     * Deletes a MappingAccountAdditionalData object.
     *
     * @return a MappingAccountAdditionalData object.
     *
     * @throws ApiException - which encapsulates the http status code and the error return by the server
     */
    public MappingAccountAdditionalData deleteAdditionalData()
        throws ApiException {

        BaseObject object = BaseObject.executeOperation(null, "c5a888af-5963-49dd-962e-f4c5fea9b1d5", this);
        this.clear();
        this.putAll(object);
        return this;
    }

    /**
     * Deletes a MappingAccountAdditionalData object.
     *
     * @param auth Authentication object overriding ApiConfig.setAuthentication(authentication)
     *
     * @return a MappingAccountAdditionalData object.
     *
     * @throws ApiException - which encapsulates the http status code and the error return by the server
     */
    public MappingAccountAdditionalData deleteAdditionalData(Authentication auth)
        throws ApiException {

        BaseObject object = BaseObject.executeOperation(auth, "c5a888af-5963-49dd-962e-f4c5fea9b1d5", this);
        this.clear();
        this.putAll(object);
        return this;
    }

    /**
     * Deletes a MappingAccountAdditionalData object.
     *
     * @param id the id of the object to delete
     *
     * @return a MappingAccountAdditionalData object.
     *
     * @throws ApiException - which encapsulates the http status code and the error return by the server
     */
    public static MappingAccountAdditionalData deleteAdditionalData(String id)
        throws ApiException {

        return deleteAdditionalData(null, id);
    }

    /**
     * Deletes a MappingAccountAdditionalData object
     *
     * @param auth Authentication object overriding ApiConfig.setAuthentication(authentication)
     * @param id  the id of the object to delete
     *
     * @return a MappingAccountAdditionalData object.
     *
     * @throws ApiException - which encapsulates the http status code and the error return by the server
     */
    public static MappingAccountAdditionalData deleteAdditionalData(Authentication auth, String id)
        throws ApiException {

        MappingAccountAdditionalData object = new MappingAccountAdditionalData(new RequestMap("id", id));
        return object.deleteAdditionalData(auth);
    }

    /**
     * Deletes a MappingAccountAdditionalData object
     *
     * @param id the id of the object to delete
     * @param map a map of additional parameters
     *
     * @return a MappingAccountAdditionalData object.
     *
     * @throws ApiException - which encapsulates the http status code and the error return by the server
     */
    public static MappingAccountAdditionalData deleteAdditionalData(String id, RequestMap map)
        throws ApiException {

        return deleteAdditionalData(null, id, map);
    }

    /**
     * Deletes a MappingAccountAdditionalData object
     *
     * @param auth Authentication object overriding ApiConfig.setAuthentication(authentication)
     * @param id  the id of the object to delete
     * @param map a map of additional parameters
     *
     * @return a MappingAccountAdditionalData object.
     *
     * @throws ApiException - which encapsulates the http status code and the error return by the server
     */
    public static MappingAccountAdditionalData deleteAdditionalData(Authentication auth, String id, RequestMap map)
        throws ApiException {

        MappingAccountAdditionalData object = new MappingAccountAdditionalData(new RequestMap("id", id));
        if (map != null)  object.putAll(map);
        return object.deleteAdditionalData(auth);
    }








    /**
     * Query / Retrieve a MappingAccountAdditionalData object
     *
     * @param query a map of query parameters
     *
     * @return a MappingAccountAdditionalData object
     *
     * @throws ApiException - which encapsulates the http status code and the error return by the server
     */
    public static MappingAccountAdditionalData listAllAdditionalData(RequestMap query)
        throws ApiException {

        return listAllAdditionalData(null, query);
    }

    /**
     * Query / Retrieve a MappingAccountAdditionalData object
     *
     * @param auth Authentication object overriding ApiConfig.setAuthentication(authentication)
     * @param query a map of query parameters
     *
     * @return a MappingAccountAdditionalData object
     *
     * @throws ApiException - which encapsulates the http status code and the error return by the server
     */
    public static MappingAccountAdditionalData listAllAdditionalData(Authentication auth, RequestMap query)
        throws ApiException {

        MappingAccountAdditionalData val = new MappingAccountAdditionalData();
        if (query != null)  val.putAll(query);
        return new MappingAccountAdditionalData(BaseObject.executeOperation(auth, "2817530b-663c-4886-b89a-66e1953718ce", val));
    }




    /**
     * Retrieve a MappingAccountAdditionalData object
     *
     * @param id the id of the MappingAccountAdditionalData object to retrieve
     *
     * @return a MappingAccountAdditionalData object
     *
     * @throws ApiException - which encapsulates the http status code and the error return by the server
     */
    public static MappingAccountAdditionalData readByAdditionalDataId(String id)
        throws ApiException {

        return readByAdditionalDataId(null, id, null);
    }

    /**
     * Retrieve a MappingAccountAdditionalData object
     *
     * @param id the id of the MappingAccountAdditionalData object to retrieve
     * @param map a map of additional parameters
     *
     * @return a MappingAccountAdditionalData object
     *
     * @throws ApiException - which encapsulates the http status code and the error return by the server
     */
    public static MappingAccountAdditionalData readByAdditionalDataId(String id, RequestMap map)
        throws ApiException {

        return readByAdditionalDataId(null, id, map);
    }

    /**
     * Retrieve a MappingAccountAdditionalData object
     *
     * @param auth Authentication object overriding ApiConfig.setAuthentication(authentication)
     * @param id the id of the MappingAccountAdditionalData object to retrieve
     *
     * @return a MappingAccountAdditionalData object
     *
     * @throws ApiException - which encapsulates the http status code and the error return by the server
     */
    public static MappingAccountAdditionalData readByAdditionalDataId(Authentication auth, String id)
        throws ApiException {

        return readByAdditionalDataId(auth, id, null);
    }

    /**
     * Retrieve a MappingAccountAdditionalData object
     *
     * @param auth Authentication object overriding ApiConfig.setAuthentication(authentication)
     * @param id the id of the MappingAccountAdditionalData object to retrieve
     * @param map a map of additional parameters
     *
     * @return a MappingAccountAdditionalData object
     *
     * @throws ApiException - which encapsulates the http status code and the error return by the server
     */
    public static MappingAccountAdditionalData readByAdditionalDataId(Authentication auth, String id, RequestMap map)
        throws ApiException {

        MappingAccountAdditionalData val = new MappingAccountAdditionalData();
        if (id != null) val.put("id", id);
        if (map != null)  val.putAll(map);
        return new MappingAccountAdditionalData(BaseObject.executeOperation(auth, "071e3b0e-2798-4146-bede-f2f14157a96f", val));
    }


    /**
     * Update a MappingAccountAdditionalData object.
     *
     * @return a MappingAccountAdditionalData object.
     *
     * @throws ApiException - which encapsulates the http status code and the error return by the server
     */
    public MappingAccountAdditionalData updateAdditonalData()
        throws ApiException {

        BaseObject object = BaseObject.executeOperation(null, "43daab27-7d4a-428e-8132-9db5711c9c4a", this);
        this.putAll(object);
        return this;
    }

    /**
     * Update a MappingAccountAdditionalData object.
     *
     * @param auth Authentication object overriding ApiConfig.setAuthentication(authentication)
     *
     * @return a MappingAccountAdditionalData object.
     *
     * @throws ApiException - which encapsulates the http status code and the error return by the server
     */
    public MappingAccountAdditionalData updateAdditonalData(Authentication auth)
        throws ApiException {

        BaseObject object = BaseObject.executeOperation(auth, "43daab27-7d4a-428e-8132-9db5711c9c4a", this);
        this.putAll(object);
        return this;
    }




}






© 2015 - 2025 Weber Informatics LLC | Privacy Policy