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

com.plaid.client.model.CreditBankIncomeCategory Maven / Gradle / Ivy

There is a newer version: 33.1.0
Show newest version
/*
 * The Plaid API
 * The Plaid REST API. Please see https://plaid.com/docs/api for more details.
 *
 * The version of the OpenAPI document: 2020-09-14_1.610.1
 * 
 *
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 * https://openapi-generator.tech
 * Do not edit the class manually.
 */


package com.plaid.client.model;

import java.util.Objects;
import java.util.Arrays;
import io.swagger.annotations.ApiModel;
import com.google.gson.annotations.SerializedName;

import java.io.IOException;
import com.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;

/**
 * The income category.  `BANK_INTEREST`: Interest earned from a bank account. `BENEFIT_OTHER`: Government benefits other than retirement, unemployment, child support, or disability. Currently used only in the UK, to represent benefits such as Cost of Living Payments. `CASH`: Deprecated and used only for existing legacy implementations. Has been replaced by `CASH_DEPOSIT` and `TRANSFER_FROM_APPLICATION`. `CASH_DEPOSIT`: A cash or check deposit. `CHILD_SUPPORT`: Child support payments received. `GIG_ECONOMY`: Income earned as a gig economy worker, e.g. driving for Uber, Lyft, Postmates, DoorDash, etc. `LONG_TERM_DISABILITY`: Disability payments, including Social Security disability benefits. `OTHER`: Income that could not be categorized as any other income category. `MILITARY`: Veterans benefits. Income earned as salary for serving in the military (e.g. through DFAS) will be classified as `SALARY` rather than `MILITARY`.  `RENTAL`: Income earned from a rental property. Income may be identified as rental when the payment is received through a rental platform, e.g. Airbnb; rent paid directly by the tenant to the property owner (e.g. via cash, check, or ACH) will typically not be classified as rental income.  `RETIREMENT`: Payments from private retirement systems, pensions, and government retirement programs, including Social Security retirement benefits. `SALARY`: Payment from an employer to an earner or other form of permanent employment. `TAX_REFUND`: A tax refund. `TRANSFER_FROM_APPLICATION`: Deposits from a money transfer app, such as Venmo, Cash App, or Zelle. `UNEMPLOYMENT`: Unemployment benefits. In the UK, includes certain low-income benefits such as the Universal Credit.
 */
@JsonAdapter(CreditBankIncomeCategory.Adapter.class)
public enum CreditBankIncomeCategory {
  
  SALARY("SALARY"),
  
  UNEMPLOYMENT("UNEMPLOYMENT"),
  
  CASH("CASH"),
  
  GIG_ECONOMY("GIG_ECONOMY"),
  
  RENTAL("RENTAL"),
  
  CHILD_SUPPORT("CHILD_SUPPORT"),
  
  MILITARY("MILITARY"),
  
  RETIREMENT("RETIREMENT"),
  
  LONG_TERM_DISABILITY("LONG_TERM_DISABILITY"),
  
  BANK_INTEREST("BANK_INTEREST"),
  
  CASH_DEPOSIT("CASH_DEPOSIT"),
  
  TRANSFER_FROM_APPLICATION("TRANSFER_FROM_APPLICATION"),
  
  TAX_REFUND("TAX_REFUND"),
  
  BENEFIT_OTHER("BENEFIT_OTHER"),
  
  OTHER("OTHER"),

  // This is returned when an enum is returned from the API that doesn't exist in the OpenAPI file.
  // Try upgrading your client-library version.
  ENUM_UNKNOWN("ENUM_UNKNOWN");

  private String value;

  CreditBankIncomeCategory(String value) {
    this.value = value;
  }

  public String getValue() {
    return value;
  }

  @Override
  public String toString() {
    return String.valueOf(value);
  }

  public static CreditBankIncomeCategory fromValue(String value) {
    for (CreditBankIncomeCategory b : CreditBankIncomeCategory.values()) {
      if (b.value.equals(value)) {
        return b;
      }
    }
    
    return CreditBankIncomeCategory.ENUM_UNKNOWN;
  }

  public static class Adapter extends TypeAdapter {
    @Override
    public void write(final JsonWriter jsonWriter, final CreditBankIncomeCategory enumeration) throws IOException {
      jsonWriter.value(enumeration.getValue());
    }

    @Override
    public CreditBankIncomeCategory read(final JsonReader jsonReader) throws IOException {
      String value = jsonReader.nextString();
      return CreditBankIncomeCategory.fromValue(value);
    }
  }
}





© 2015 - 2025 Weber Informatics LLC | Privacy Policy