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

com.plaid.client.request.ItemCredentialsEncryptRequest Maven / Gradle / Ivy

There is a newer version: 27.0.0
Show newest version
package com.plaid.client.request;

import com.plaid.client.request.common.BasePublicRequest;

import java.util.HashMap;
import java.util.Map;

import static com.plaid.client.internal.Util.arrayToMap;
import static com.plaid.client.internal.Util.notEmpty;

/**
 * Request for the /item/credentials/encrypt endpoint.
 *
 * @see https://plaid.com/docs/api
 */
public final class ItemCredentialsEncryptRequest extends BasePublicRequest {
  private Map credentials;

  public ItemCredentialsEncryptRequest(Map credentials) {
    notEmpty(credentials, "credentials");
    this.credentials = new HashMap<>(credentials);
  }

  /**
   * Convenience constructor for credentials. Each 2 consecutive arguments are a (name,value) pair,
   * so this method will only accept an even number of arguments.
   * 

* For example: * * ItemCredentialsEncryptRequest("username", "alice", "password", "supersecret"); * *

* More generally: * * ItemCredentialsEncryptRequest(name1, value1, name2, value2, ...); * * * @param namesAndValues A series of credential names and corresponding values. */ public ItemCredentialsEncryptRequest(String... namesAndValues) { this.credentials = arrayToMap(namesAndValues); } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy