SHARE
TWEET

Untitled

a guest Feb 18th, 2020 84 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. package com.plaid.myplaidprototype.networking
  2.  
  3. import android.os.Parcelable
  4. import kotlinx.android.parcel.Parcelize
  5.  
  6. /*
  7.  * Copyright (c) 2020 Plaid Technologies, Inc. <support@plaid.com>
  8.  */
  9.  
  10. @Parcelize
  11. data class PreviewResponse(
  12.   val activity: List<ActivityResponse>,
  13.   val apps: List<AppPreviewResponse>,
  14.   val institutions: List<InstitutionPreviewResponse>
  15. ) : Parcelable {
  16.   @Parcelize
  17.   data class ActivityResponse(
  18.     val date: String,
  19.     val description: String,
  20.     val institutionName: String
  21.   ) : Parcelable
  22.  
  23.   @Parcelize
  24.   data class AppPreviewResponse(
  25.     val id: String,
  26.     val name: String
  27.   ) : Parcelable
  28.  
  29.   @Parcelize
  30.   data class InstitutionPreviewResponse(
  31.     val id: String,
  32.     val name: String,
  33.     val numAccounts: Int
  34.   ) : Parcelable
  35. }
  36.  
  37. @Parcelize
  38. data class AppDetailsResponse(
  39.   val id: String,
  40.   val name: String,
  41.   val dataShared: Map<Account, List<DataPermission>>
  42. ) : Parcelable {
  43.   @Parcelize
  44.   data class Account(
  45.     val accountName: String,
  46.     val accountId: String,
  47.     val institution: Institution
  48.   ) : Parcelable
  49.  
  50.   @Parcelize
  51.   data class Institution(
  52.     val id: String,
  53.     val name: String
  54.   ) : Parcelable
  55.  
  56.   @Parcelize
  57.   enum class DataPermission : Parcelable {
  58.     TRANSACTIONS,
  59.     BALANCE,
  60.     LIABILITIES
  61.   }
  62. }
  63.  
  64. @Parcelize
  65. data class InstitutionDetailsResponse(
  66.   val accounts: List<Account>
  67. ) : Parcelable {
  68.  
  69.   @Parcelize
  70.   data class Account(
  71.     val accountName: String,
  72.     val accountId: String,
  73.     val transactions: List<Transaction>
  74.   ) : Parcelable
  75.  
  76.   @Parcelize
  77.   data class Transaction(
  78.     val date: String,
  79.     val description: String,
  80.     val amountUsdCents: Long
  81.   ) : Parcelable
  82. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top