plaid 13.0.0 → 14.0.0.beta.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (687) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +81 -1
  3. data/CONTRIBUTING.md +15 -59
  4. data/Dockerfile +12 -0
  5. data/Gemfile.lock +45 -36
  6. data/LICENSE.txt +1 -1
  7. data/Makefile +2 -0
  8. data/PUBLISH.md +6 -7
  9. data/README.md +100 -92
  10. data/Rakefile +8 -79
  11. data/UPGRADING.md +4 -0
  12. data/docs/ACHClass.md +15 -0
  13. data/docs/APR.md +24 -0
  14. data/docs/AccountAssets.md +40 -0
  15. data/docs/AccountAssetsAllOf.md +24 -0
  16. data/docs/AccountBalance.md +26 -0
  17. data/docs/AccountBase.md +32 -0
  18. data/docs/AccountFiltersResponse.md +24 -0
  19. data/docs/AccountIdentity.md +34 -0
  20. data/docs/AccountIdentityAllOf.md +18 -0
  21. data/docs/AccountSubtype.md +15 -0
  22. data/docs/AccountType.md +15 -0
  23. data/docs/AccountsBalanceGetRequest.md +24 -0
  24. data/docs/AccountsBalanceGetRequestOptions.md +18 -0
  25. data/docs/AccountsGetRequest.md +24 -0
  26. data/docs/AccountsGetRequestOptions.md +18 -0
  27. data/docs/AccountsGetResponse.md +22 -0
  28. data/docs/Address.md +20 -0
  29. data/docs/AddressData.md +26 -0
  30. data/docs/Amount.md +20 -0
  31. data/docs/AssetReport.md +28 -0
  32. data/docs/AssetReportAuditCopyCreateRequest.md +24 -0
  33. data/docs/AssetReportAuditCopyCreateResponse.md +20 -0
  34. data/docs/AssetReportAuditCopyGetRequest.md +22 -0
  35. data/docs/AssetReportAuditCopyRemoveRequest.md +22 -0
  36. data/docs/AssetReportAuditCopyRemoveResponse.md +20 -0
  37. data/docs/AssetReportCreateRequest.md +26 -0
  38. data/docs/AssetReportCreateRequestOptions.md +22 -0
  39. data/docs/AssetReportCreateResponse.md +22 -0
  40. data/docs/AssetReportFilterRequest.md +24 -0
  41. data/docs/AssetReportFilterResponse.md +22 -0
  42. data/docs/AssetReportGetRequest.md +24 -0
  43. data/docs/AssetReportGetResponse.md +22 -0
  44. data/docs/AssetReportItem.md +26 -0
  45. data/docs/AssetReportPDFGetRequest.md +22 -0
  46. data/docs/AssetReportRefreshRequest.md +26 -0
  47. data/docs/AssetReportRefreshRequestOptions.md +22 -0
  48. data/docs/AssetReportRefreshResponse.md +22 -0
  49. data/docs/AssetReportRemoveRequest.md +22 -0
  50. data/docs/AssetReportRemoveResponse.md +20 -0
  51. data/docs/AssetReportTransaction.md +62 -0
  52. data/docs/AssetReportTransactionAllOf.md +20 -0
  53. data/docs/AssetReportUser.md +30 -0
  54. data/docs/AssetsErrorWebhook.md +24 -0
  55. data/docs/AssetsProductReadyWebhook.md +22 -0
  56. data/docs/AuthGetNumbers.md +24 -0
  57. data/docs/AuthGetRequest.md +24 -0
  58. data/docs/AuthGetRequestOptions.md +18 -0
  59. data/docs/AuthGetResponse.md +24 -0
  60. data/docs/AutomaticallyVerifiedWebhook.md +24 -0
  61. data/docs/BankTransfer.md +50 -0
  62. data/docs/BankTransferBalance.md +20 -0
  63. data/docs/BankTransferBalanceGetRequest.md +22 -0
  64. data/docs/BankTransferBalanceGetResponse.md +22 -0
  65. data/docs/BankTransferCancelRequest.md +22 -0
  66. data/docs/BankTransferCancelResponse.md +18 -0
  67. data/docs/BankTransferCreateRequest.md +46 -0
  68. data/docs/BankTransferCreateResponse.md +20 -0
  69. data/docs/BankTransferDirection.md +15 -0
  70. data/docs/BankTransferEvent.md +40 -0
  71. data/docs/BankTransferEventListRequest.md +40 -0
  72. data/docs/BankTransferEventListResponse.md +20 -0
  73. data/docs/BankTransferEventSyncRequest.md +24 -0
  74. data/docs/BankTransferEventSyncResponse.md +20 -0
  75. data/docs/BankTransferEventType.md +15 -0
  76. data/docs/BankTransferFailure.md +20 -0
  77. data/docs/BankTransferGetRequest.md +22 -0
  78. data/docs/BankTransferGetResponse.md +20 -0
  79. data/docs/BankTransferListRequest.md +32 -0
  80. data/docs/BankTransferListResponse.md +20 -0
  81. data/docs/BankTransferMigrateAccountRequest.md +26 -0
  82. data/docs/BankTransferMigrateAccountResponse.md +22 -0
  83. data/docs/BankTransferNetwork.md +15 -0
  84. data/docs/BankTransferReceiverDetails.md +18 -0
  85. data/docs/BankTransferStatus.md +15 -0
  86. data/docs/BankTransferType.md +15 -0
  87. data/docs/BankTransferUser.md +22 -0
  88. data/docs/BankTransfersEventsUpdateWebhook.md +20 -0
  89. data/docs/CategoriesGetResponse.md +20 -0
  90. data/docs/Category.md +22 -0
  91. data/docs/Cause.md +20 -0
  92. data/docs/CountryCode.md +15 -0
  93. data/docs/CreditCardLiability.md +34 -0
  94. data/docs/CreditFilter.md +18 -0
  95. data/docs/DefaultUpdateWebhook.md +26 -0
  96. data/docs/DepositSwitchAddressData.md +26 -0
  97. data/docs/DepositSwitchAltCreateRequest.md +24 -0
  98. data/docs/DepositSwitchAltCreateResponse.md +20 -0
  99. data/docs/DepositSwitchCreateRequest.md +24 -0
  100. data/docs/DepositSwitchCreateResponse.md +20 -0
  101. data/docs/DepositSwitchGetRequest.md +22 -0
  102. data/docs/DepositSwitchGetResponse.md +38 -0
  103. data/docs/DepositSwitchTargetAccount.md +24 -0
  104. data/docs/DepositSwitchTargetUser.md +28 -0
  105. data/docs/DepositSwitchTokenCreateRequest.md +22 -0
  106. data/docs/DepositSwitchTokenCreateResponse.md +22 -0
  107. data/docs/DepositoryFilter.md +18 -0
  108. data/docs/Email.md +22 -0
  109. data/docs/Employee.md +22 -0
  110. data/docs/EmployeeIncomeSummaryFieldString.md +20 -0
  111. data/docs/Employer.md +24 -0
  112. data/docs/EmployerIncomeSummaryFieldString.md +20 -0
  113. data/docs/EmployersSearchRequest.md +24 -0
  114. data/docs/EmployersSearchResponse.md +20 -0
  115. data/docs/Error.md +34 -0
  116. data/docs/ExternalPaymentSchedule.md +24 -0
  117. data/docs/ExternalPaymentScheduleGet.md +26 -0
  118. data/docs/HealthIncident.md +24 -0
  119. data/docs/HistoricalBalance.md +24 -0
  120. data/docs/HistoricalUpdateWebhook.md +26 -0
  121. data/docs/Holding.md +34 -0
  122. data/docs/HoldingsDefaultUpdateWebhook.md +28 -0
  123. data/docs/IdentityGetRequest.md +24 -0
  124. data/docs/IdentityGetRequestOptions.md +18 -0
  125. data/docs/IdentityGetResponse.md +22 -0
  126. data/docs/IncidentUpdate.md +22 -0
  127. data/docs/IncomeBreakdown.md +24 -0
  128. data/docs/IncomeSummary.md +30 -0
  129. data/docs/IncomeSummaryFieldNumber.md +20 -0
  130. data/docs/IncomeSummaryFieldString.md +20 -0
  131. data/docs/IncomeVerificationCreateRequest.md +22 -0
  132. data/docs/IncomeVerificationCreateResponse.md +20 -0
  133. data/docs/IncomeVerificationDocumentsDownloadRequest.md +22 -0
  134. data/docs/IncomeVerificationDocumentsDownloadResponse.md +18 -0
  135. data/docs/IncomeVerificationPaystubGetRequest.md +22 -0
  136. data/docs/IncomeVerificationPaystubGetResponse.md +20 -0
  137. data/docs/IncomeVerificationStatusWebhook.md +24 -0
  138. data/docs/IncomeVerificationSummaryGetRequest.md +22 -0
  139. data/docs/IncomeVerificationSummaryGetResponse.md +20 -0
  140. data/docs/IncomeVerificationWebhookStatus.md +18 -0
  141. data/docs/InflowModel.md +26 -0
  142. data/docs/InitialUpdateWebhook.md +26 -0
  143. data/docs/Institution.md +36 -0
  144. data/docs/InstitutionStatus.md +30 -0
  145. data/docs/InstitutionsGetByIdRequest.md +26 -0
  146. data/docs/InstitutionsGetByIdRequestOptions.md +20 -0
  147. data/docs/InstitutionsGetByIdResponse.md +20 -0
  148. data/docs/InstitutionsGetRequest.md +28 -0
  149. data/docs/InstitutionsGetRequestOptions.md +24 -0
  150. data/docs/InstitutionsGetResponse.md +22 -0
  151. data/docs/InstitutionsSearchAccountFilter.md +24 -0
  152. data/docs/InstitutionsSearchRequest.md +28 -0
  153. data/docs/InstitutionsSearchRequestOptions.md +20 -0
  154. data/docs/InstitutionsSearchResponse.md +20 -0
  155. data/docs/InvestmentFilter.md +18 -0
  156. data/docs/InvestmentHoldingsGetRequestOptions.md +18 -0
  157. data/docs/InvestmentTransaction.md +44 -0
  158. data/docs/InvestmentsDefaultUpdateWebhook.md +28 -0
  159. data/docs/InvestmentsHoldingsGetRequest.md +24 -0
  160. data/docs/InvestmentsHoldingsGetResponse.md +26 -0
  161. data/docs/InvestmentsTransactionsGetRequest.md +28 -0
  162. data/docs/InvestmentsTransactionsGetRequestOptions.md +22 -0
  163. data/docs/InvestmentsTransactionsGetResponse.md +28 -0
  164. data/docs/Item.md +32 -0
  165. data/docs/ItemAccessTokenInvalidateRequest.md +22 -0
  166. data/docs/ItemAccessTokenInvalidateResponse.md +20 -0
  167. data/docs/ItemErrorWebhook.md +24 -0
  168. data/docs/ItemGetRequest.md +22 -0
  169. data/docs/ItemGetResponse.md +24 -0
  170. data/docs/ItemImportRequest.md +26 -0
  171. data/docs/ItemImportRequestOptions.md +18 -0
  172. data/docs/ItemImportRequestUserAuth.md +20 -0
  173. data/docs/ItemImportResponse.md +20 -0
  174. data/docs/ItemProductReadyWebhook.md +24 -0
  175. data/docs/ItemPublicTokenCreateRequest.md +22 -0
  176. data/docs/ItemPublicTokenCreateResponse.md +22 -0
  177. data/docs/ItemPublicTokenExchangeRequest.md +22 -0
  178. data/docs/ItemPublicTokenExchangeResponse.md +22 -0
  179. data/docs/ItemRemoveRequest.md +22 -0
  180. data/docs/ItemRemoveResponse.md +18 -0
  181. data/docs/ItemStatus.md +22 -0
  182. data/docs/ItemWebhookUpdateRequest.md +24 -0
  183. data/docs/ItemWebhookUpdateResponse.md +20 -0
  184. data/docs/JWKPublicKey.md +34 -0
  185. data/docs/JWTHeader.md +18 -0
  186. data/docs/LiabilitiesGetRequest.md +24 -0
  187. data/docs/LiabilitiesGetRequestOptions.md +18 -0
  188. data/docs/LiabilitiesGetResponse.md +24 -0
  189. data/docs/LiabilitiesObject.md +22 -0
  190. data/docs/LiabilityOverride.md +66 -0
  191. data/docs/LinkTokenAccountFilters.md +24 -0
  192. data/docs/LinkTokenCreateRequest.md +52 -0
  193. data/docs/LinkTokenCreateRequestAccountSubtypes.md +24 -0
  194. data/docs/LinkTokenCreateRequestAuth.md +18 -0
  195. data/docs/LinkTokenCreateRequestDepositSwitch.md +18 -0
  196. data/docs/LinkTokenCreateRequestIncomeVerification.md +20 -0
  197. data/docs/LinkTokenCreateRequestPaymentInitiation.md +18 -0
  198. data/docs/LinkTokenCreateRequestUser.md +32 -0
  199. data/docs/LinkTokenCreateResponse.md +22 -0
  200. data/docs/LinkTokenGetMetadataResponse.md +30 -0
  201. data/docs/LinkTokenGetRequest.md +22 -0
  202. data/docs/LinkTokenGetResponse.md +26 -0
  203. data/docs/LoanFilter.md +18 -0
  204. data/docs/Location.md +32 -0
  205. data/docs/MFA.md +26 -0
  206. data/docs/Meta.md +22 -0
  207. data/docs/MortgageInterestRate.md +20 -0
  208. data/docs/MortgageLiability.md +56 -0
  209. data/docs/MortgagePropertyAddress.md +26 -0
  210. data/docs/NullableAccessToken.md +15 -0
  211. data/docs/NullableAddress.md +20 -0
  212. data/docs/NullableAddressData.md +26 -0
  213. data/docs/NullableItemStatus.md +22 -0
  214. data/docs/NullableNumbersACH.md +24 -0
  215. data/docs/NullableNumbersBACS.md +22 -0
  216. data/docs/NullableNumbersEFT.md +24 -0
  217. data/docs/NullableNumbersInternational.md +22 -0
  218. data/docs/NullableRecipientBACS.md +20 -0
  219. data/docs/Numbers.md +32 -0
  220. data/docs/NumbersACH.md +24 -0
  221. data/docs/NumbersBACS.md +22 -0
  222. data/docs/NumbersEFT.md +24 -0
  223. data/docs/NumbersInternational.md +22 -0
  224. data/docs/OverrideAccounts.md +38 -0
  225. data/docs/Owner.md +24 -0
  226. data/docs/OwnerOverride.md +24 -0
  227. data/docs/PSLFStatus.md +22 -0
  228. data/docs/PayFrequency.md +20 -0
  229. data/docs/PayPeriodDetails.md +26 -0
  230. data/docs/PaymentAmount.md +20 -0
  231. data/docs/PaymentInitiationAddress.md +24 -0
  232. data/docs/PaymentInitiationPaymentCreateRequest.md +28 -0
  233. data/docs/PaymentInitiationPaymentCreateResponse.md +22 -0
  234. data/docs/PaymentInitiationPaymentGetRequest.md +22 -0
  235. data/docs/PaymentInitiationPaymentGetResponse.md +34 -0
  236. data/docs/PaymentInitiationPaymentListRequest.md +24 -0
  237. data/docs/PaymentInitiationPaymentListResponse.md +22 -0
  238. data/docs/PaymentInitiationPaymentTokenCreateRequest.md +22 -0
  239. data/docs/PaymentInitiationPaymentTokenCreateResponse.md +22 -0
  240. data/docs/PaymentInitiationRecipient.md +26 -0
  241. data/docs/PaymentInitiationRecipientCreateRequest.md +28 -0
  242. data/docs/PaymentInitiationRecipientCreateResponse.md +20 -0
  243. data/docs/PaymentInitiationRecipientGetRequest.md +22 -0
  244. data/docs/PaymentInitiationRecipientGetResponse.md +28 -0
  245. data/docs/PaymentInitiationRecipientListRequest.md +20 -0
  246. data/docs/PaymentInitiationRecipientListResponse.md +20 -0
  247. data/docs/PaymentMeta.md +32 -0
  248. data/docs/PaymentStatusUpdateWebhook.md +38 -0
  249. data/docs/Paystub.md +30 -0
  250. data/docs/PaystubDeduction.md +22 -0
  251. data/docs/PaystubYTDDetails.md +20 -0
  252. data/docs/PendingExpirationWebhook.md +24 -0
  253. data/docs/PhoneNumber.md +22 -0
  254. data/docs/PlaidApi.md +5660 -0
  255. data/docs/ProcessorApexProcessorTokenCreateRequest.md +24 -0
  256. data/docs/ProcessorAuthGetRequest.md +22 -0
  257. data/docs/ProcessorAuthGetResponse.md +22 -0
  258. data/docs/ProcessorBalanceGetRequest.md +22 -0
  259. data/docs/ProcessorBalanceGetResponse.md +20 -0
  260. data/docs/ProcessorIdentityGetRequest.md +22 -0
  261. data/docs/ProcessorIdentityGetResponse.md +20 -0
  262. data/docs/ProcessorNumber.md +24 -0
  263. data/docs/ProcessorStripeBankAccountTokenCreateRequest.md +24 -0
  264. data/docs/ProcessorStripeBankAccountTokenCreateResponse.md +20 -0
  265. data/docs/ProcessorTokenCreateRequest.md +26 -0
  266. data/docs/ProcessorTokenCreateResponse.md +20 -0
  267. data/docs/ProductStatus.md +22 -0
  268. data/docs/ProductStatusBreakdown.md +24 -0
  269. data/docs/Products.md +15 -0
  270. data/docs/ProjectedIncomeSummaryFieldNumber.md +20 -0
  271. data/docs/RecaptchaRequiredError.md +30 -0
  272. data/docs/RecipientBACS.md +20 -0
  273. data/docs/SandboxBankTransferFireWebhookRequest.md +22 -0
  274. data/docs/SandboxBankTransferFireWebhookResponse.md +18 -0
  275. data/docs/SandboxBankTransferSimulateRequest.md +26 -0
  276. data/docs/SandboxBankTransferSimulateResponse.md +18 -0
  277. data/docs/SandboxItemFireWebhookRequest.md +24 -0
  278. data/docs/SandboxItemFireWebhookResponse.md +20 -0
  279. data/docs/SandboxItemResetLoginRequest.md +22 -0
  280. data/docs/SandboxItemResetLoginResponse.md +20 -0
  281. data/docs/SandboxItemSetVerificationStatusRequest.md +26 -0
  282. data/docs/SandboxItemSetVerificationStatusResponse.md +18 -0
  283. data/docs/SandboxProcessorTokenCreateRequest.md +24 -0
  284. data/docs/SandboxProcessorTokenCreateRequestOptions.md +20 -0
  285. data/docs/SandboxProcessorTokenCreateResponse.md +20 -0
  286. data/docs/SandboxPublicTokenCreateRequest.md +26 -0
  287. data/docs/SandboxPublicTokenCreateRequestOptions.md +24 -0
  288. data/docs/SandboxPublicTokenCreateRequestOptionsTransactions.md +20 -0
  289. data/docs/SandboxPublicTokenCreateResponse.md +20 -0
  290. data/docs/Security.md +46 -0
  291. data/docs/ServicerAddressData.md +26 -0
  292. data/docs/StandaloneAccountType.md +26 -0
  293. data/docs/StandaloneCurrencyCodeList.md +20 -0
  294. data/docs/StandaloneInvestmentTransactionSubtype.md +104 -0
  295. data/docs/StandaloneInvestmentTransactionType.md +28 -0
  296. data/docs/StudentLoan.md +66 -0
  297. data/docs/StudentLoanRepaymentModel.md +22 -0
  298. data/docs/StudentLoanStatus.md +20 -0
  299. data/docs/StudentRepaymentPlan.md +20 -0
  300. data/docs/Transaction.md +58 -0
  301. data/docs/TransactionCode.md +15 -0
  302. data/docs/TransactionData.md +26 -0
  303. data/docs/TransactionOverride.md +26 -0
  304. data/docs/TransactionsGetRequest.md +28 -0
  305. data/docs/TransactionsGetRequestOptions.md +22 -0
  306. data/docs/TransactionsGetResponse.md +26 -0
  307. data/docs/TransactionsRefreshRequest.md +22 -0
  308. data/docs/TransactionsRefreshResponse.md +18 -0
  309. data/docs/TransactionsRemovedWebhook.md +26 -0
  310. data/docs/UserCustomPassword.md +28 -0
  311. data/docs/UserPermissionRevokedWebhook.md +24 -0
  312. data/docs/VerificationExpiredWebhook.md +24 -0
  313. data/docs/VerificationStatus.md +15 -0
  314. data/docs/Warning.md +22 -0
  315. data/docs/WebhookUpdateAcknowledgedWebhook.md +26 -0
  316. data/docs/WebhookVerificationKeyGetRequest.md +22 -0
  317. data/docs/WebhookVerificationKeyGetResponse.md +20 -0
  318. data/docs/YTDGrossIncomeSummaryFieldNumber.md +20 -0
  319. data/docs/YTDNetIncomeSummaryFieldNumber.md +20 -0
  320. data/lib/plaid.rb +340 -61
  321. data/lib/plaid/api/plaid_api.rb +4483 -0
  322. data/lib/plaid/api_client.rb +383 -0
  323. data/lib/plaid/api_error.rb +57 -0
  324. data/lib/plaid/configuration.rb +297 -0
  325. data/lib/plaid/models/account_assets.rb +406 -0
  326. data/lib/plaid/models/account_assets_all_of.rb +263 -0
  327. data/lib/plaid/models/account_balance.rb +269 -0
  328. data/lib/plaid/models/account_base.rb +345 -0
  329. data/lib/plaid/models/account_filters_response.rb +246 -0
  330. data/lib/plaid/models/account_identity.rb +369 -0
  331. data/lib/plaid/models/account_identity_all_of.rb +226 -0
  332. data/lib/plaid/models/account_subtype.rb +101 -0
  333. data/lib/plaid/models/account_type.rb +41 -0
  334. data/lib/plaid/models/accounts_balance_get_request.rb +254 -0
  335. data/lib/plaid/models/accounts_balance_get_request_options.rb +222 -0
  336. data/lib/plaid/models/accounts_get_request.rb +254 -0
  337. data/lib/plaid/models/accounts_get_request_options.rb +222 -0
  338. data/lib/plaid/models/accounts_get_response.rb +256 -0
  339. data/lib/plaid/models/ach_class.rb +50 -0
  340. data/lib/plaid/models/address.rb +235 -0
  341. data/lib/plaid/models/address_data.rb +277 -0
  342. data/lib/plaid/models/amount.rb +274 -0
  343. data/lib/plaid/models/apr.rb +296 -0
  344. data/lib/plaid/models/asset_report.rb +301 -0
  345. data/lib/plaid/models/asset_report_audit_copy_create_request.rb +260 -0
  346. data/lib/plaid/models/asset_report_audit_copy_create_response.rb +240 -0
  347. data/lib/plaid/models/asset_report_audit_copy_get_request.rb +245 -0
  348. data/lib/plaid/models/asset_report_audit_copy_remove_request.rb +245 -0
  349. data/lib/plaid/models/asset_report_audit_copy_remove_response.rb +240 -0
  350. data/lib/plaid/models/asset_report_create_request.rb +323 -0
  351. data/lib/plaid/models/asset_report_create_request_options.rb +239 -0
  352. data/lib/plaid/models/asset_report_create_response.rb +255 -0
  353. data/lib/plaid/models/asset_report_filter_request.rb +262 -0
  354. data/lib/plaid/models/asset_report_filter_response.rb +255 -0
  355. data/lib/plaid/models/asset_report_get_request.rb +255 -0
  356. data/lib/plaid/models/asset_report_get_response.rb +256 -0
  357. data/lib/plaid/models/asset_report_item.rb +287 -0
  358. data/lib/plaid/models/asset_report_pdf_get_request.rb +245 -0
  359. data/lib/plaid/models/asset_report_refresh_request.rb +290 -0
  360. data/lib/plaid/models/asset_report_refresh_request_options.rb +239 -0
  361. data/lib/plaid/models/asset_report_refresh_response.rb +255 -0
  362. data/lib/plaid/models/asset_report_remove_request.rb +245 -0
  363. data/lib/plaid/models/asset_report_remove_response.rb +240 -0
  364. data/lib/plaid/models/asset_report_transaction.rb +533 -0
  365. data/lib/plaid/models/asset_report_transaction_all_of.rb +235 -0
  366. data/lib/plaid/models/asset_report_user.rb +287 -0
  367. data/lib/plaid/models/assets_error_webhook.rb +265 -0
  368. data/lib/plaid/models/assets_product_ready_webhook.rb +255 -0
  369. data/lib/plaid/models/auth_get_numbers.rb +258 -0
  370. data/lib/plaid/models/auth_get_request.rb +254 -0
  371. data/lib/plaid/models/auth_get_request_options.rb +222 -0
  372. data/lib/plaid/models/auth_get_response.rb +270 -0
  373. data/lib/plaid/models/automatically_verified_webhook.rb +270 -0
  374. data/lib/plaid/models/bank_transfer.rb +453 -0
  375. data/lib/plaid/models/bank_transfer_balance.rb +239 -0
  376. data/lib/plaid/models/bank_transfer_balance_get_request.rb +241 -0
  377. data/lib/plaid/models/bank_transfer_balance_get_response.rb +250 -0
  378. data/lib/plaid/models/bank_transfer_cancel_request.rb +245 -0
  379. data/lib/plaid/models/bank_transfer_cancel_response.rb +225 -0
  380. data/lib/plaid/models/bank_transfer_create_request.rb +474 -0
  381. data/lib/plaid/models/bank_transfer_create_response.rb +239 -0
  382. data/lib/plaid/models/bank_transfer_direction.rb +37 -0
  383. data/lib/plaid/models/bank_transfer_event.rb +390 -0
  384. data/lib/plaid/models/bank_transfer_event_list_request.rb +422 -0
  385. data/lib/plaid/models/bank_transfer_event_list_response.rb +241 -0
  386. data/lib/plaid/models/bank_transfer_event_sync_request.rb +305 -0
  387. data/lib/plaid/models/bank_transfer_event_sync_response.rb +241 -0
  388. data/lib/plaid/models/bank_transfer_event_type.rb +42 -0
  389. data/lib/plaid/models/bank_transfer_failure.rb +231 -0
  390. data/lib/plaid/models/bank_transfer_get_request.rb +245 -0
  391. data/lib/plaid/models/bank_transfer_get_response.rb +239 -0
  392. data/lib/plaid/models/bank_transfer_list_request.rb +340 -0
  393. data/lib/plaid/models/bank_transfer_list_response.rb +241 -0
  394. data/lib/plaid/models/bank_transfer_migrate_account_request.rb +275 -0
  395. data/lib/plaid/models/bank_transfer_migrate_account_response.rb +255 -0
  396. data/lib/plaid/models/bank_transfer_network.rb +38 -0
  397. data/lib/plaid/models/bank_transfer_receiver_details.rb +255 -0
  398. data/lib/plaid/models/bank_transfer_status.rb +40 -0
  399. data/lib/plaid/models/bank_transfer_type.rb +37 -0
  400. data/lib/plaid/models/bank_transfer_user.rb +246 -0
  401. data/lib/plaid/models/bank_transfers_events_update_webhook.rb +240 -0
  402. data/lib/plaid/models/categories_get_response.rb +242 -0
  403. data/lib/plaid/models/category.rb +257 -0
  404. data/lib/plaid/models/cause.rb +235 -0
  405. data/lib/plaid/models/country_code.rb +42 -0
  406. data/lib/plaid/models/credit_card_liability.rb +339 -0
  407. data/lib/plaid/models/credit_filter.rb +227 -0
  408. data/lib/plaid/models/default_update_webhook.rb +280 -0
  409. data/lib/plaid/models/deposit_switch_address_data.rb +285 -0
  410. data/lib/plaid/models/deposit_switch_alt_create_request.rb +258 -0
  411. data/lib/plaid/models/deposit_switch_alt_create_response.rb +240 -0
  412. data/lib/plaid/models/deposit_switch_create_request.rb +260 -0
  413. data/lib/plaid/models/deposit_switch_create_response.rb +240 -0
  414. data/lib/plaid/models/deposit_switch_get_request.rb +245 -0
  415. data/lib/plaid/models/deposit_switch_get_response.rb +381 -0
  416. data/lib/plaid/models/deposit_switch_target_account.rb +303 -0
  417. data/lib/plaid/models/deposit_switch_target_user.rb +288 -0
  418. data/lib/plaid/models/deposit_switch_token_create_request.rb +245 -0
  419. data/lib/plaid/models/deposit_switch_token_create_response.rb +255 -0
  420. data/lib/plaid/models/depository_filter.rb +227 -0
  421. data/lib/plaid/models/email.rb +289 -0
  422. data/lib/plaid/models/employee.rb +242 -0
  423. data/lib/plaid/models/employee_income_summary_field_string.rb +245 -0
  424. data/lib/plaid/models/employer.rb +261 -0
  425. data/lib/plaid/models/employer_income_summary_field_string.rb +245 -0
  426. data/lib/plaid/models/employers_search_request.rb +262 -0
  427. data/lib/plaid/models/employers_search_response.rb +242 -0
  428. data/lib/plaid/models/error.rb +360 -0
  429. data/lib/plaid/models/external_payment_schedule.rb +265 -0
  430. data/lib/plaid/models/external_payment_schedule_get.rb +283 -0
  431. data/lib/plaid/models/health_incident.rb +253 -0
  432. data/lib/plaid/models/historical_balance.rb +262 -0
  433. data/lib/plaid/models/historical_update_webhook.rb +280 -0
  434. data/lib/plaid/models/holding.rb +329 -0
  435. data/lib/plaid/models/holdings_default_update_webhook.rb +295 -0
  436. data/lib/plaid/models/identity_get_request.rb +254 -0
  437. data/lib/plaid/models/identity_get_request_options.rb +222 -0
  438. data/lib/plaid/models/identity_get_response.rb +256 -0
  439. data/lib/plaid/models/incident_update.rb +273 -0
  440. data/lib/plaid/models/income_breakdown.rb +253 -0
  441. data/lib/plaid/models/income_summary.rb +275 -0
  442. data/lib/plaid/models/income_summary_field_number.rb +238 -0
  443. data/lib/plaid/models/income_summary_field_string.rb +238 -0
  444. data/lib/plaid/models/income_verification_create_request.rb +245 -0
  445. data/lib/plaid/models/income_verification_create_response.rb +240 -0
  446. data/lib/plaid/models/income_verification_documents_download_request.rb +245 -0
  447. data/lib/plaid/models/income_verification_documents_download_response.rb +224 -0
  448. data/lib/plaid/models/income_verification_paystub_get_request.rb +245 -0
  449. data/lib/plaid/models/income_verification_paystub_get_response.rb +229 -0
  450. data/lib/plaid/models/income_verification_status_webhook.rb +270 -0
  451. data/lib/plaid/models/income_verification_summary_get_request.rb +245 -0
  452. data/lib/plaid/models/income_verification_summary_get_response.rb +242 -0
  453. data/lib/plaid/models/income_verification_webhook_status.rb +223 -0
  454. data/lib/plaid/models/inflow_model.rb +285 -0
  455. data/lib/plaid/models/initial_update_webhook.rb +281 -0
  456. data/lib/plaid/models/institution.rb +344 -0
  457. data/lib/plaid/models/institution_status.rb +307 -0
  458. data/lib/plaid/models/institutions_get_by_id_request.rb +271 -0
  459. data/lib/plaid/models/institutions_get_by_id_request_options.rb +234 -0
  460. data/lib/plaid/models/institutions_get_by_id_response.rb +239 -0
  461. data/lib/plaid/models/institutions_get_request.rb +328 -0
  462. data/lib/plaid/models/institutions_get_request_options.rb +254 -0
  463. data/lib/plaid/models/institutions_get_response.rb +257 -0
  464. data/lib/plaid/models/institutions_search_account_filter.rb +253 -0
  465. data/lib/plaid/models/institutions_search_request.rb +309 -0
  466. data/lib/plaid/models/institutions_search_request_options.rb +230 -0
  467. data/lib/plaid/models/institutions_search_response.rb +242 -0
  468. data/lib/plaid/models/investment_filter.rb +227 -0
  469. data/lib/plaid/models/investment_holdings_get_request_options.rb +222 -0
  470. data/lib/plaid/models/investment_transaction.rb +446 -0
  471. data/lib/plaid/models/investments_default_update_webhook.rb +295 -0
  472. data/lib/plaid/models/investments_holdings_get_request.rb +254 -0
  473. data/lib/plaid/models/investments_holdings_get_response.rb +290 -0
  474. data/lib/plaid/models/investments_transactions_get_request.rb +284 -0
  475. data/lib/plaid/models/investments_transactions_get_request_options.rb +289 -0
  476. data/lib/plaid/models/investments_transactions_get_response.rb +305 -0
  477. data/lib/plaid/models/item.rb +351 -0
  478. data/lib/plaid/models/item_access_token_invalidate_request.rb +245 -0
  479. data/lib/plaid/models/item_access_token_invalidate_response.rb +240 -0
  480. data/lib/plaid/models/item_error_webhook.rb +265 -0
  481. data/lib/plaid/models/item_get_request.rb +245 -0
  482. data/lib/plaid/models/item_get_response.rb +259 -0
  483. data/lib/plaid/models/item_import_request.rb +291 -0
  484. data/lib/plaid/models/item_import_request_options.rb +220 -0
  485. data/lib/plaid/models/item_import_request_user_auth.rb +240 -0
  486. data/lib/plaid/models/item_import_response.rb +240 -0
  487. data/lib/plaid/models/item_product_ready_webhook.rb +265 -0
  488. data/lib/plaid/models/item_public_token_create_request.rb +245 -0
  489. data/lib/plaid/models/item_public_token_create_response.rb +249 -0
  490. data/lib/plaid/models/item_public_token_exchange_request.rb +245 -0
  491. data/lib/plaid/models/item_public_token_exchange_response.rb +255 -0
  492. data/lib/plaid/models/item_remove_request.rb +245 -0
  493. data/lib/plaid/models/item_remove_response.rb +225 -0
  494. data/lib/plaid/models/item_status.rb +249 -0
  495. data/lib/plaid/models/item_webhook_update_request.rb +260 -0
  496. data/lib/plaid/models/item_webhook_update_response.rb +239 -0
  497. data/lib/plaid/models/jwk_public_key.rb +299 -0
  498. data/lib/plaid/models/jwt_header.rb +224 -0
  499. data/lib/plaid/models/liabilities_get_request.rb +254 -0
  500. data/lib/plaid/models/liabilities_get_request_options.rb +222 -0
  501. data/lib/plaid/models/liabilities_get_response.rb +270 -0
  502. data/lib/plaid/models/liabilities_object.rb +249 -0
  503. data/lib/plaid/models/liability_override.rb +581 -0
  504. data/lib/plaid/models/link_token_account_filters.rb +246 -0
  505. data/lib/plaid/models/link_token_create_request.rb +429 -0
  506. data/lib/plaid/models/link_token_create_request_account_subtypes.rb +258 -0
  507. data/lib/plaid/models/link_token_create_request_auth.rb +259 -0
  508. data/lib/plaid/models/link_token_create_request_deposit_switch.rb +225 -0
  509. data/lib/plaid/models/link_token_create_request_income_verification.rb +236 -0
  510. data/lib/plaid/models/link_token_create_request_payment_initiation.rb +225 -0
  511. data/lib/plaid/models/link_token_create_request_user.rb +295 -0
  512. data/lib/plaid/models/link_token_create_response.rb +255 -0
  513. data/lib/plaid/models/link_token_get_metadata_response.rb +287 -0
  514. data/lib/plaid/models/link_token_get_request.rb +245 -0
  515. data/lib/plaid/models/link_token_get_response.rb +266 -0
  516. data/lib/plaid/models/loan_filter.rb +227 -0
  517. data/lib/plaid/models/location.rb +298 -0
  518. data/lib/plaid/models/meta.rb +255 -0
  519. data/lib/plaid/models/mfa.rb +285 -0
  520. data/lib/plaid/models/mortgage_interest_rate.rb +232 -0
  521. data/lib/plaid/models/mortgage_liability.rb +430 -0
  522. data/lib/plaid/models/mortgage_property_address.rb +265 -0
  523. data/lib/plaid/models/nullable_access_token.rb +209 -0
  524. data/lib/plaid/models/nullable_address.rb +241 -0
  525. data/lib/plaid/models/nullable_address_data.rb +283 -0
  526. data/lib/plaid/models/nullable_item_status.rb +255 -0
  527. data/lib/plaid/models/nullable_numbers_ach.rb +272 -0
  528. data/lib/plaid/models/nullable_numbers_bacs.rb +261 -0
  529. data/lib/plaid/models/nullable_numbers_eft.rb +276 -0
  530. data/lib/plaid/models/nullable_numbers_international.rb +261 -0
  531. data/lib/plaid/models/nullable_recipient_bacs.rb +236 -0
  532. data/lib/plaid/models/numbers.rb +330 -0
  533. data/lib/plaid/models/numbers_ach.rb +266 -0
  534. data/lib/plaid/models/numbers_bacs.rb +255 -0
  535. data/lib/plaid/models/numbers_eft.rb +270 -0
  536. data/lib/plaid/models/numbers_international.rb +255 -0
  537. data/lib/plaid/models/override_accounts.rb +366 -0
  538. data/lib/plaid/models/owner.rb +278 -0
  539. data/lib/plaid/models/owner_override.rb +278 -0
  540. data/lib/plaid/models/pay_frequency.rb +272 -0
  541. data/lib/plaid/models/pay_period_details.rb +265 -0
  542. data/lib/plaid/models/payment_amount.rb +240 -0
  543. data/lib/plaid/models/payment_initiation_address.rb +269 -0
  544. data/lib/plaid/models/payment_initiation_payment_create_request.rb +284 -0
  545. data/lib/plaid/models/payment_initiation_payment_create_response.rb +255 -0
  546. data/lib/plaid/models/payment_initiation_payment_get_request.rb +245 -0
  547. data/lib/plaid/models/payment_initiation_payment_get_response.rb +364 -0
  548. data/lib/plaid/models/payment_initiation_payment_list_request.rb +269 -0
  549. data/lib/plaid/models/payment_initiation_payment_list_response.rb +257 -0
  550. data/lib/plaid/models/payment_initiation_payment_token_create_request.rb +245 -0
  551. data/lib/plaid/models/payment_initiation_payment_token_create_response.rb +255 -0
  552. data/lib/plaid/models/payment_initiation_recipient.rb +273 -0
  553. data/lib/plaid/models/payment_initiation_recipient_create_request.rb +275 -0
  554. data/lib/plaid/models/payment_initiation_recipient_create_response.rb +240 -0
  555. data/lib/plaid/models/payment_initiation_recipient_get_request.rb +245 -0
  556. data/lib/plaid/models/payment_initiation_recipient_get_response.rb +286 -0
  557. data/lib/plaid/models/payment_initiation_recipient_list_request.rb +230 -0
  558. data/lib/plaid/models/payment_initiation_recipient_list_response.rb +242 -0
  559. data/lib/plaid/models/payment_meta.rb +298 -0
  560. data/lib/plaid/models/payment_status_update_webhook.rb +400 -0
  561. data/lib/plaid/models/paystub.rb +306 -0
  562. data/lib/plaid/models/paystub_deduction.rb +242 -0
  563. data/lib/plaid/models/paystub_ytd_details.rb +239 -0
  564. data/lib/plaid/models/pending_expiration_webhook.rb +270 -0
  565. data/lib/plaid/models/phone_number.rb +281 -0
  566. data/lib/plaid/models/processor_apex_processor_token_create_request.rb +260 -0
  567. data/lib/plaid/models/processor_auth_get_request.rb +245 -0
  568. data/lib/plaid/models/processor_auth_get_response.rb +253 -0
  569. data/lib/plaid/models/processor_balance_get_request.rb +245 -0
  570. data/lib/plaid/models/processor_balance_get_response.rb +239 -0
  571. data/lib/plaid/models/processor_identity_get_request.rb +245 -0
  572. data/lib/plaid/models/processor_identity_get_response.rb +239 -0
  573. data/lib/plaid/models/processor_number.rb +250 -0
  574. data/lib/plaid/models/processor_stripe_bank_account_token_create_request.rb +260 -0
  575. data/lib/plaid/models/processor_stripe_bank_account_token_create_response.rb +240 -0
  576. data/lib/plaid/models/processor_token_create_request.rb +275 -0
  577. data/lib/plaid/models/processor_token_create_response.rb +240 -0
  578. data/lib/plaid/models/product_status.rb +288 -0
  579. data/lib/plaid/models/product_status_breakdown.rb +300 -0
  580. data/lib/plaid/models/products.rb +46 -0
  581. data/lib/plaid/models/projected_income_summary_field_number.rb +245 -0
  582. data/lib/plaid/models/pslf_status.rb +243 -0
  583. data/lib/plaid/models/recaptcha_required_error.rb +314 -0
  584. data/lib/plaid/models/recipient_bacs.rb +230 -0
  585. data/lib/plaid/models/sandbox_bank_transfer_fire_webhook_request.rb +245 -0
  586. data/lib/plaid/models/sandbox_bank_transfer_fire_webhook_response.rb +225 -0
  587. data/lib/plaid/models/sandbox_bank_transfer_simulate_request.rb +270 -0
  588. data/lib/plaid/models/sandbox_bank_transfer_simulate_response.rb +225 -0
  589. data/lib/plaid/models/sandbox_item_fire_webhook_request.rb +289 -0
  590. data/lib/plaid/models/sandbox_item_fire_webhook_response.rb +240 -0
  591. data/lib/plaid/models/sandbox_item_reset_login_request.rb +245 -0
  592. data/lib/plaid/models/sandbox_item_reset_login_response.rb +240 -0
  593. data/lib/plaid/models/sandbox_item_set_verification_status_request.rb +309 -0
  594. data/lib/plaid/models/sandbox_item_set_verification_status_response.rb +225 -0
  595. data/lib/plaid/models/sandbox_processor_token_create_request.rb +253 -0
  596. data/lib/plaid/models/sandbox_processor_token_create_request_options.rb +236 -0
  597. data/lib/plaid/models/sandbox_processor_token_create_response.rb +239 -0
  598. data/lib/plaid/models/sandbox_public_token_create_request.rb +292 -0
  599. data/lib/plaid/models/sandbox_public_token_create_request_options.rb +255 -0
  600. data/lib/plaid/models/sandbox_public_token_create_request_options_transactions.rb +230 -0
  601. data/lib/plaid/models/sandbox_public_token_create_response.rb +240 -0
  602. data/lib/plaid/models/security.rb +382 -0
  603. data/lib/plaid/models/servicer_address_data.rb +265 -0
  604. data/lib/plaid/models/standalone_account_type.rb +285 -0
  605. data/lib/plaid/models/standalone_currency_code_list.rb +240 -0
  606. data/lib/plaid/models/standalone_investment_transaction_subtype.rb +650 -0
  607. data/lib/plaid/models/standalone_investment_transaction_type.rb +300 -0
  608. data/lib/plaid/models/student_loan.rb +483 -0
  609. data/lib/plaid/models/student_loan_repayment_model.rb +255 -0
  610. data/lib/plaid/models/student_loan_status.rb +266 -0
  611. data/lib/plaid/models/student_repayment_plan.rb +266 -0
  612. data/lib/plaid/models/transaction.rb +500 -0
  613. data/lib/plaid/models/transaction_code.rb +48 -0
  614. data/lib/plaid/models/transaction_data.rb +285 -0
  615. data/lib/plaid/models/transaction_override.rb +280 -0
  616. data/lib/plaid/models/transactions_get_request.rb +284 -0
  617. data/lib/plaid/models/transactions_get_request_options.rb +289 -0
  618. data/lib/plaid/models/transactions_get_response.rb +288 -0
  619. data/lib/plaid/models/transactions_refresh_request.rb +245 -0
  620. data/lib/plaid/models/transactions_refresh_response.rb +225 -0
  621. data/lib/plaid/models/transactions_removed_webhook.rb +282 -0
  622. data/lib/plaid/models/user_custom_password.rb +297 -0
  623. data/lib/plaid/models/user_permission_revoked_webhook.rb +265 -0
  624. data/lib/plaid/models/verification_expired_webhook.rb +270 -0
  625. data/lib/plaid/models/verification_status.rb +40 -0
  626. data/lib/plaid/models/warning.rb +254 -0
  627. data/lib/plaid/models/webhook_update_acknowledged_webhook.rb +280 -0
  628. data/lib/plaid/models/webhook_verification_key_get_request.rb +245 -0
  629. data/lib/plaid/models/webhook_verification_key_get_response.rb +239 -0
  630. data/lib/plaid/models/ytd_gross_income_summary_field_number.rb +245 -0
  631. data/lib/plaid/models/ytd_net_income_summary_field_number.rb +245 -0
  632. data/lib/plaid/version.rb +13 -2
  633. data/pkg/plaid-14.0.0.beta.4.gem +0 -0
  634. data/plaid.gemspec +44 -49
  635. data/templates/ruby/api_client.mustache +266 -0
  636. data/templates/ruby/api_client_faraday_partial.mustache +120 -0
  637. data/templates/ruby/configuration.mustache +353 -0
  638. data/templates/ruby/gemspec.mustache +41 -0
  639. data/templates/ruby/partial_model_generic.mustache +362 -0
  640. data/test/test_accounts.rb +103 -0
  641. data/test/test_asset_report.rb +147 -0
  642. data/test/test_auth.rb +61 -0
  643. data/test/test_bank_transfers.rb +220 -0
  644. data/test/test_categories.rb +10 -0
  645. data/test/test_configuration.rb +26 -0
  646. data/test/test_deposit_switch.rb +73 -0
  647. data/test/test_helper.rb +109 -0
  648. data/test/test_identity.rb +38 -0
  649. data/test/test_institutions.rb +159 -0
  650. data/test/test_investments.rb +208 -0
  651. data/test/test_item.rb +285 -0
  652. data/test/test_liabilities.rb +45 -0
  653. data/test/test_link_token.rb +97 -0
  654. data/test/test_payment_initiation.rb +95 -0
  655. data/test/test_processor.rb +67 -0
  656. data/test/test_transactions.rb +168 -0
  657. data/test/test_webhooks.rb +22 -0
  658. metadata +683 -98
  659. data/.circleci/config.yml +0 -21
  660. data/.env.sample +0 -3
  661. data/.github/workflows/add_to_project.yml +0 -21
  662. data/.rubocop.yml +0 -18
  663. data/bin/console +0 -14
  664. data/bin/setup +0 -8
  665. data/lib/plaid/client.rb +0 -190
  666. data/lib/plaid/errors.rb +0 -89
  667. data/lib/plaid/middleware.rb +0 -31
  668. data/lib/plaid/models.rb +0 -2144
  669. data/lib/plaid/products/accounts.rb +0 -63
  670. data/lib/plaid/products/asset_report.rb +0 -199
  671. data/lib/plaid/products/auth.rb +0 -42
  672. data/lib/plaid/products/base_product.rb +0 -64
  673. data/lib/plaid/products/categories.rb +0 -21
  674. data/lib/plaid/products/credit_details.rb +0 -40
  675. data/lib/plaid/products/deposit_switch.rb +0 -99
  676. data/lib/plaid/products/identity.rb +0 -31
  677. data/lib/plaid/products/income.rb +0 -31
  678. data/lib/plaid/products/institutions.rb +0 -91
  679. data/lib/plaid/products/investments.rb +0 -127
  680. data/lib/plaid/products/item.rb +0 -209
  681. data/lib/plaid/products/liabilities.rb +0 -39
  682. data/lib/plaid/products/link_token.rb +0 -74
  683. data/lib/plaid/products/payment_initiation.rb +0 -237
  684. data/lib/plaid/products/processor.rb +0 -190
  685. data/lib/plaid/products/sandbox.rb +0 -148
  686. data/lib/plaid/products/transactions.rb +0 -81
  687. data/lib/plaid/products/webhooks.rb +0 -23
@@ -0,0 +1,246 @@
1
+ =begin
2
+ #The Plaid API
3
+
4
+ #The Plaid REST API. Please see https://plaid.com/docs/api for more details.
5
+
6
+ The version of the OpenAPI document: 2020-09-14_1.11.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 5.1.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module Plaid
17
+ # By default, Link will only display account types that are compatible with all products supplied in the `products` parameter of `/link/token/create`. You can further limit the accounts shown in Link by using `account_filters` to specify the account subtypes to be shown in Link. Only the specified subtypes will be shown. This filtering applies to both the Account Select view (if enabled) and the Institution Select view. Institutions that do not support the selected subtypes will be omitted from Link. To indicate that all subtypes should be shown, use the value `\"all\"`. If the `account_filters` filter is used, any account type for which a filter is not specified will be entirely omitted from Link. For a full list of valid types and subtypes, see the [Account schema](/docs/api/accounts#accounts-schema). For institutions using OAuth, the filter will not affect the list of institutions or accounts shown by the bank in the OAuth window.
18
+ class LinkTokenAccountFilters
19
+ attr_accessor :depository
20
+
21
+ attr_accessor :credit
22
+
23
+ attr_accessor :loan
24
+
25
+ attr_accessor :investment
26
+
27
+ # Attribute mapping from ruby-style variable name to JSON key.
28
+ def self.attribute_map
29
+ {
30
+ :'depository' => :'depository',
31
+ :'credit' => :'credit',
32
+ :'loan' => :'loan',
33
+ :'investment' => :'investment'
34
+ }
35
+ end
36
+
37
+ # Returns all the JSON keys this model knows about
38
+ def self.acceptable_attributes
39
+ attribute_map.values
40
+ end
41
+
42
+ # Attribute type mapping.
43
+ def self.openapi_types
44
+ {
45
+ :'depository' => :'DepositoryFilter',
46
+ :'credit' => :'CreditFilter',
47
+ :'loan' => :'LoanFilter',
48
+ :'investment' => :'InvestmentFilter'
49
+ }
50
+ end
51
+
52
+ # List of attributes with nullable: true
53
+ def self.openapi_nullable
54
+ Set.new([
55
+ ])
56
+ end
57
+
58
+ # Initializes the object
59
+ # @param [Hash] attributes Model attributes in the form of hash
60
+ def initialize(attributes = {})
61
+ if (!attributes.is_a?(Hash))
62
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Plaid::LinkTokenAccountFilters` initialize method"
63
+ end
64
+
65
+ # check to see if the attribute exists and convert string to symbol for hash key
66
+ attributes = attributes.each_with_object({}) { |(k, v), h|
67
+ if (!self.class.attribute_map.key?(k.to_sym))
68
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Plaid::LinkTokenAccountFilters`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
69
+ end
70
+ h[k.to_sym] = v
71
+ }
72
+
73
+ if attributes.key?(:'depository')
74
+ self.depository = attributes[:'depository']
75
+ end
76
+
77
+ if attributes.key?(:'credit')
78
+ self.credit = attributes[:'credit']
79
+ end
80
+
81
+ if attributes.key?(:'loan')
82
+ self.loan = attributes[:'loan']
83
+ end
84
+
85
+ if attributes.key?(:'investment')
86
+ self.investment = attributes[:'investment']
87
+ end
88
+ end
89
+
90
+ # Show invalid properties with the reasons. Usually used together with valid?
91
+ # @return Array for valid properties with the reasons
92
+ def list_invalid_properties
93
+ invalid_properties = Array.new
94
+ invalid_properties
95
+ end
96
+
97
+ # Check to see if the all the properties in the model are valid
98
+ # @return true if the model is valid
99
+ def valid?
100
+ true
101
+ end
102
+
103
+ # Checks equality by comparing each attribute.
104
+ # @param [Object] Object to be compared
105
+ def ==(o)
106
+ return true if self.equal?(o)
107
+ self.class == o.class &&
108
+ depository == o.depository &&
109
+ credit == o.credit &&
110
+ loan == o.loan &&
111
+ investment == o.investment
112
+ end
113
+
114
+ # @see the `==` method
115
+ # @param [Object] Object to be compared
116
+ def eql?(o)
117
+ self == o
118
+ end
119
+
120
+ # Calculates hash code according to all attributes.
121
+ # @return [Integer] Hash code
122
+ def hash
123
+ [depository, credit, loan, investment].hash
124
+ end
125
+
126
+ # Builds the object from hash
127
+ # @param [Hash] attributes Model attributes in the form of hash
128
+ # @return [Object] Returns the model itself
129
+ def self.build_from_hash(attributes)
130
+ new.build_from_hash(attributes)
131
+ end
132
+
133
+ # Builds the object from hash
134
+ # @param [Hash] attributes Model attributes in the form of hash
135
+ # @return [Object] Returns the model itself
136
+ def build_from_hash(attributes)
137
+ return nil unless attributes.is_a?(Hash)
138
+ self.class.openapi_types.each_pair do |key, type|
139
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
140
+ self.send("#{key}=", nil)
141
+ elsif type =~ /\AArray<(.*)>/i
142
+ # check to ensure the input is an array given that the attribute
143
+ # is documented as an array but the input is not
144
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
145
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
146
+ end
147
+ elsif !attributes[self.class.attribute_map[key]].nil?
148
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
149
+ end
150
+ end
151
+
152
+ self
153
+ end
154
+
155
+ # Deserializes the data based on type
156
+ # @param string type Data type
157
+ # @param string value Value to be deserialized
158
+ # @return [Object] Deserialized data
159
+ def _deserialize(type, value)
160
+ case type.to_sym
161
+ when :Time
162
+ Time.parse(value)
163
+ when :Date
164
+ Date.parse(value)
165
+ when :String
166
+ value.to_s
167
+ when :Integer
168
+ value.to_i
169
+ when :Float
170
+ value.to_f
171
+ when :Boolean
172
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
173
+ true
174
+ else
175
+ false
176
+ end
177
+ when :Object
178
+ # generic object (usually a Hash), return directly
179
+ value
180
+ when /\AArray<(?<inner_type>.+)>\z/
181
+ inner_type = Regexp.last_match[:inner_type]
182
+ value.map { |v| _deserialize(inner_type, v) }
183
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
184
+ k_type = Regexp.last_match[:k_type]
185
+ v_type = Regexp.last_match[:v_type]
186
+ {}.tap do |hash|
187
+ value.each do |k, v|
188
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
189
+ end
190
+ end
191
+ else # model
192
+ # models (e.g. Pet) or oneOf
193
+ klass = Plaid.const_get(type)
194
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
195
+ end
196
+ end
197
+
198
+ # Returns the string representation of the object
199
+ # @return [String] String presentation of the object
200
+ def to_s
201
+ to_hash.to_s
202
+ end
203
+
204
+ # to_body is an alias to to_hash (backward compatibility)
205
+ # @return [Hash] Returns the object in the form of hash
206
+ def to_body
207
+ to_hash
208
+ end
209
+
210
+ # Returns the object in the form of hash
211
+ # @return [Hash] Returns the object in the form of hash
212
+ def to_hash
213
+ hash = {}
214
+ self.class.attribute_map.each_pair do |attr, param|
215
+ value = self.send(attr)
216
+ if value.nil?
217
+ is_nullable = self.class.openapi_nullable.include?(attr)
218
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
219
+ end
220
+
221
+ hash[param] = _to_hash(value)
222
+ end
223
+ hash
224
+ end
225
+
226
+ # Outputs non-array value in the form of hash
227
+ # For object, use to_hash. Otherwise, just return the value
228
+ # @param [Object] value Any valid value
229
+ # @return [Hash] Returns the value in the form of hash
230
+ def _to_hash(value)
231
+ if value.is_a?(Array)
232
+ value.compact.map { |v| _to_hash(v) }
233
+ elsif value.is_a?(Hash)
234
+ {}.tap do |hash|
235
+ value.each { |k, v| hash[k] = _to_hash(v) }
236
+ end
237
+ elsif value.respond_to? :to_hash
238
+ value.to_hash
239
+ else
240
+ value
241
+ end
242
+ end
243
+
244
+ end
245
+
246
+ end
@@ -0,0 +1,429 @@
1
+ =begin
2
+ #The Plaid API
3
+
4
+ #The Plaid REST API. Please see https://plaid.com/docs/api for more details.
5
+
6
+ The version of the OpenAPI document: 2020-09-14_1.11.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 5.1.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module Plaid
17
+ # LinkTokenCreateRequest defines the request schema for `/link/token/create`
18
+ class LinkTokenCreateRequest
19
+ # Your Plaid API `client_id`. The `client_id` is required and may be provided either in the `PLAID-CLIENT-ID` header or as part of a request body.
20
+ attr_accessor :client_id
21
+
22
+ # Your Plaid API `secret`. The `secret` is required and may be provided either in the `PLAID-SECRET` header or as part of a request body.
23
+ attr_accessor :secret
24
+
25
+ # The name of your application, as it should be displayed in Link.
26
+ attr_accessor :client_name
27
+
28
+ # The language that Link should be displayed in. Supported languages are: - English (`'en'`) - French (`'fr'`) - Spanish (`'es'`) - Dutch (`'nl'`) When using a Link customization, the language configured here must match the setting in the customization, or the customization will not be applied.
29
+ attr_accessor :language
30
+
31
+ # Specify an array of Plaid-supported country codes using the ISO-3166-1 alpha-2 country code standard. Institutions from all listed countries will be shown. Supported country codes are: `US`, `CA`, `ES`, `FR`, `GB`, `IE`, `NL`. Example value: `['US', 'CA']`. If Link is launched with multiple country codes, only products that you are enabled for in all countries will be used by Link. Note that while all countries are enabled by default in Sandbox and Development, in Production only US and Canada are enabled by default. To gain access to European institutions in the Production environment, [file a product access Support ticket](https://dashboard.plaid.com/support/new/product-and-development/product-troubleshooting/request-product-access) via the Plaid dashboard. If you initialize with a European country code, your users will see the European consent panel during the Link flow. If using a Link customization, make sure the country codes in the customization match those specified in `country_codes`. If both `country_codes` and a Link customization are used, the value in `country_codes` may override the value in the customization. If using the Auth features Instant Match, Same-day Micro-deposits, or Automated Micro-deposits, `country_codes` must be set to `['US']`.
32
+ attr_accessor :country_codes
33
+
34
+ attr_accessor :user
35
+
36
+ # List of Plaid product(s) you wish to use. If launching Link in update mode, should be omitted; required otherwise. Valid products are: `transactions`, `auth`, `identity`, `assets`, `investments`, `liabilities`, `payment_initiation`, `deposit_switch` Example: `['auth', 'transactions']` `balance` is *not* a valid value, the Balance product does not require explicit initalization and will automatically be initialized when any other product is initialized. Only institutions that support *all* requested products will be shown in Link; to maximize the number of institutions listed, it is recommended to initialize Link with the minimal product set required for your use case. Additional products can be added after Link initialization by calling the relevant endpoints. For details and exceptions, see [Choosing when to initialize products](/docs/link/best-practices/#choosing-when-to-initialize-products). In Production, you will be billed for each product that you specify when initializing Link. Note that a product cannot be removed from an Item once the Item has been initialized with that product. To stop billing on an Item for subscription-based products, such as Liabilities, Investments, and Transactions, remove the Item via `/item/remove`.
37
+ attr_accessor :products
38
+
39
+ # The destination URL to which any webhooks should be sent.
40
+ attr_accessor :webhook
41
+
42
+ # The `access_token` associated with the Item to update, used when updating or modifying an existing `access_token`. Used when launching Link in update mode, when completing the Same-day (manual) Micro-deposit flow, or (optionally) when initializing Link as part of the Payment Initiation (UK and Europe) flow.
43
+ attr_accessor :access_token
44
+
45
+ # The name of the Link customization from the Plaid Dashboard to be applied to Link. If not specified, the `default` customization will be used. When using a Link customization, the language in the customization must match the language selected via the `language` parameter, and the countries in the customization should match the country codes selected via `country_codes`.
46
+ attr_accessor :link_customization_name
47
+
48
+ # A URI indicating the destination where a user should be forwarded after completing the Link flow; used to support OAuth authentication flows when launching Link in the browser or via a webview. The `redirect_uri` should not contain any query parameters. If `android_package_name` is specified, this field should be left blank. Any redirect URI specified here must also be added under the \"Allowed redirect URIs\" configuration on the [developer dashboard](https://dashboard.plaid.com/team/api). In non-Sandbox (Production and Development) environments, the `redirect_uri` must begin with https.
49
+ attr_accessor :redirect_uri
50
+
51
+ # The name of your app's Android package. Required if using the `link_token` to initialize Link on Android. When creating a `link_token` for initializing Link on other platforms, this field must be left blank. Any package name specified here must also be added to the Allowed Android package names setting on the [developer dashboard](https://dashboard.plaid.com/team/api).
52
+ attr_accessor :android_package_name
53
+
54
+ attr_accessor :account_filters
55
+
56
+ # Used for certain legacy use cases
57
+ attr_accessor :institution_id
58
+
59
+ attr_accessor :payment_initiation
60
+
61
+ attr_accessor :deposit_switch
62
+
63
+ attr_accessor :income_verification
64
+
65
+ attr_accessor :auth
66
+
67
+ # Attribute mapping from ruby-style variable name to JSON key.
68
+ def self.attribute_map
69
+ {
70
+ :'client_id' => :'client_id',
71
+ :'secret' => :'secret',
72
+ :'client_name' => :'client_name',
73
+ :'language' => :'language',
74
+ :'country_codes' => :'country_codes',
75
+ :'user' => :'user',
76
+ :'products' => :'products',
77
+ :'webhook' => :'webhook',
78
+ :'access_token' => :'access_token',
79
+ :'link_customization_name' => :'link_customization_name',
80
+ :'redirect_uri' => :'redirect_uri',
81
+ :'android_package_name' => :'android_package_name',
82
+ :'account_filters' => :'account_filters',
83
+ :'institution_id' => :'institution_id',
84
+ :'payment_initiation' => :'payment_initiation',
85
+ :'deposit_switch' => :'deposit_switch',
86
+ :'income_verification' => :'income_verification',
87
+ :'auth' => :'auth'
88
+ }
89
+ end
90
+
91
+ # Returns all the JSON keys this model knows about
92
+ def self.acceptable_attributes
93
+ attribute_map.values
94
+ end
95
+
96
+ # Attribute type mapping.
97
+ def self.openapi_types
98
+ {
99
+ :'client_id' => :'String',
100
+ :'secret' => :'String',
101
+ :'client_name' => :'String',
102
+ :'language' => :'String',
103
+ :'country_codes' => :'Array<CountryCode>',
104
+ :'user' => :'LinkTokenCreateRequestUser',
105
+ :'products' => :'Array<Products>',
106
+ :'webhook' => :'String',
107
+ :'access_token' => :'String',
108
+ :'link_customization_name' => :'String',
109
+ :'redirect_uri' => :'String',
110
+ :'android_package_name' => :'String',
111
+ :'account_filters' => :'LinkTokenAccountFilters',
112
+ :'institution_id' => :'String',
113
+ :'payment_initiation' => :'LinkTokenCreateRequestPaymentInitiation',
114
+ :'deposit_switch' => :'LinkTokenCreateRequestDepositSwitch',
115
+ :'income_verification' => :'LinkTokenCreateRequestIncomeVerification',
116
+ :'auth' => :'LinkTokenCreateRequestAuth'
117
+ }
118
+ end
119
+
120
+ # List of attributes with nullable: true
121
+ def self.openapi_nullable
122
+ Set.new([
123
+ ])
124
+ end
125
+
126
+ # Initializes the object
127
+ # @param [Hash] attributes Model attributes in the form of hash
128
+ def initialize(attributes = {})
129
+ if (!attributes.is_a?(Hash))
130
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Plaid::LinkTokenCreateRequest` initialize method"
131
+ end
132
+
133
+ # check to see if the attribute exists and convert string to symbol for hash key
134
+ attributes = attributes.each_with_object({}) { |(k, v), h|
135
+ if (!self.class.attribute_map.key?(k.to_sym))
136
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Plaid::LinkTokenCreateRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
137
+ end
138
+ h[k.to_sym] = v
139
+ }
140
+
141
+ if attributes.key?(:'client_id')
142
+ self.client_id = attributes[:'client_id']
143
+ end
144
+
145
+ if attributes.key?(:'secret')
146
+ self.secret = attributes[:'secret']
147
+ end
148
+
149
+ if attributes.key?(:'client_name')
150
+ self.client_name = attributes[:'client_name']
151
+ end
152
+
153
+ if attributes.key?(:'language')
154
+ self.language = attributes[:'language']
155
+ end
156
+
157
+ if attributes.key?(:'country_codes')
158
+ if (value = attributes[:'country_codes']).is_a?(Array)
159
+ self.country_codes = value
160
+ end
161
+ end
162
+
163
+ if attributes.key?(:'user')
164
+ self.user = attributes[:'user']
165
+ end
166
+
167
+ if attributes.key?(:'products')
168
+ if (value = attributes[:'products']).is_a?(Array)
169
+ self.products = value
170
+ end
171
+ end
172
+
173
+ if attributes.key?(:'webhook')
174
+ self.webhook = attributes[:'webhook']
175
+ end
176
+
177
+ if attributes.key?(:'access_token')
178
+ self.access_token = attributes[:'access_token']
179
+ end
180
+
181
+ if attributes.key?(:'link_customization_name')
182
+ self.link_customization_name = attributes[:'link_customization_name']
183
+ end
184
+
185
+ if attributes.key?(:'redirect_uri')
186
+ self.redirect_uri = attributes[:'redirect_uri']
187
+ end
188
+
189
+ if attributes.key?(:'android_package_name')
190
+ self.android_package_name = attributes[:'android_package_name']
191
+ end
192
+
193
+ if attributes.key?(:'account_filters')
194
+ self.account_filters = attributes[:'account_filters']
195
+ end
196
+
197
+ if attributes.key?(:'institution_id')
198
+ self.institution_id = attributes[:'institution_id']
199
+ end
200
+
201
+ if attributes.key?(:'payment_initiation')
202
+ self.payment_initiation = attributes[:'payment_initiation']
203
+ end
204
+
205
+ if attributes.key?(:'deposit_switch')
206
+ self.deposit_switch = attributes[:'deposit_switch']
207
+ end
208
+
209
+ if attributes.key?(:'income_verification')
210
+ self.income_verification = attributes[:'income_verification']
211
+ end
212
+
213
+ if attributes.key?(:'auth')
214
+ self.auth = attributes[:'auth']
215
+ end
216
+ end
217
+
218
+ # Show invalid properties with the reasons. Usually used together with valid?
219
+ # @return Array for valid properties with the reasons
220
+ def list_invalid_properties
221
+ invalid_properties = Array.new
222
+ if @client_name.nil?
223
+ invalid_properties.push('invalid value for "client_name", client_name cannot be nil.')
224
+ end
225
+
226
+ if @language.nil?
227
+ invalid_properties.push('invalid value for "language", language cannot be nil.')
228
+ end
229
+
230
+ if @country_codes.nil?
231
+ invalid_properties.push('invalid value for "country_codes", country_codes cannot be nil.')
232
+ end
233
+
234
+
235
+ if @country_codes.length < 1
236
+ invalid_properties.push('invalid value for "country_codes", number of items must be greater than or equal to 1.')
237
+ end
238
+
239
+ if @user.nil?
240
+ invalid_properties.push('invalid value for "user", user cannot be nil.')
241
+ end
242
+
243
+ invalid_properties
244
+ end
245
+
246
+ # Check to see if the all the properties in the model are valid
247
+ # @return true if the model is valid
248
+ def valid?
249
+ return false if @client_name.nil?
250
+ return false if @language.nil?
251
+ return false if @country_codes.nil?
252
+ return false if @country_codes.length < 1
253
+ return false if @user.nil?
254
+ true
255
+ end
256
+
257
+ # Custom attribute writer method with validation
258
+ # @param [Object] country_codes Value to be assigned
259
+ def country_codes=(country_codes)
260
+ if country_codes.nil?
261
+ fail ArgumentError, 'country_codes cannot be nil'
262
+ end
263
+
264
+
265
+ if country_codes.length < 1
266
+ fail ArgumentError, 'invalid value for "country_codes", number of items must be greater than or equal to 1.'
267
+ end
268
+
269
+ @country_codes = country_codes
270
+ end
271
+
272
+ # Checks equality by comparing each attribute.
273
+ # @param [Object] Object to be compared
274
+ def ==(o)
275
+ return true if self.equal?(o)
276
+ self.class == o.class &&
277
+ client_id == o.client_id &&
278
+ secret == o.secret &&
279
+ client_name == o.client_name &&
280
+ language == o.language &&
281
+ country_codes == o.country_codes &&
282
+ user == o.user &&
283
+ products == o.products &&
284
+ webhook == o.webhook &&
285
+ access_token == o.access_token &&
286
+ link_customization_name == o.link_customization_name &&
287
+ redirect_uri == o.redirect_uri &&
288
+ android_package_name == o.android_package_name &&
289
+ account_filters == o.account_filters &&
290
+ institution_id == o.institution_id &&
291
+ payment_initiation == o.payment_initiation &&
292
+ deposit_switch == o.deposit_switch &&
293
+ income_verification == o.income_verification &&
294
+ auth == o.auth
295
+ end
296
+
297
+ # @see the `==` method
298
+ # @param [Object] Object to be compared
299
+ def eql?(o)
300
+ self == o
301
+ end
302
+
303
+ # Calculates hash code according to all attributes.
304
+ # @return [Integer] Hash code
305
+ def hash
306
+ [client_id, secret, client_name, language, country_codes, user, products, webhook, access_token, link_customization_name, redirect_uri, android_package_name, account_filters, institution_id, payment_initiation, deposit_switch, income_verification, auth].hash
307
+ end
308
+
309
+ # Builds the object from hash
310
+ # @param [Hash] attributes Model attributes in the form of hash
311
+ # @return [Object] Returns the model itself
312
+ def self.build_from_hash(attributes)
313
+ new.build_from_hash(attributes)
314
+ end
315
+
316
+ # Builds the object from hash
317
+ # @param [Hash] attributes Model attributes in the form of hash
318
+ # @return [Object] Returns the model itself
319
+ def build_from_hash(attributes)
320
+ return nil unless attributes.is_a?(Hash)
321
+ self.class.openapi_types.each_pair do |key, type|
322
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
323
+ self.send("#{key}=", nil)
324
+ elsif type =~ /\AArray<(.*)>/i
325
+ # check to ensure the input is an array given that the attribute
326
+ # is documented as an array but the input is not
327
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
328
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
329
+ end
330
+ elsif !attributes[self.class.attribute_map[key]].nil?
331
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
332
+ end
333
+ end
334
+
335
+ self
336
+ end
337
+
338
+ # Deserializes the data based on type
339
+ # @param string type Data type
340
+ # @param string value Value to be deserialized
341
+ # @return [Object] Deserialized data
342
+ def _deserialize(type, value)
343
+ case type.to_sym
344
+ when :Time
345
+ Time.parse(value)
346
+ when :Date
347
+ Date.parse(value)
348
+ when :String
349
+ value.to_s
350
+ when :Integer
351
+ value.to_i
352
+ when :Float
353
+ value.to_f
354
+ when :Boolean
355
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
356
+ true
357
+ else
358
+ false
359
+ end
360
+ when :Object
361
+ # generic object (usually a Hash), return directly
362
+ value
363
+ when /\AArray<(?<inner_type>.+)>\z/
364
+ inner_type = Regexp.last_match[:inner_type]
365
+ value.map { |v| _deserialize(inner_type, v) }
366
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
367
+ k_type = Regexp.last_match[:k_type]
368
+ v_type = Regexp.last_match[:v_type]
369
+ {}.tap do |hash|
370
+ value.each do |k, v|
371
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
372
+ end
373
+ end
374
+ else # model
375
+ # models (e.g. Pet) or oneOf
376
+ klass = Plaid.const_get(type)
377
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
378
+ end
379
+ end
380
+
381
+ # Returns the string representation of the object
382
+ # @return [String] String presentation of the object
383
+ def to_s
384
+ to_hash.to_s
385
+ end
386
+
387
+ # to_body is an alias to to_hash (backward compatibility)
388
+ # @return [Hash] Returns the object in the form of hash
389
+ def to_body
390
+ to_hash
391
+ end
392
+
393
+ # Returns the object in the form of hash
394
+ # @return [Hash] Returns the object in the form of hash
395
+ def to_hash
396
+ hash = {}
397
+ self.class.attribute_map.each_pair do |attr, param|
398
+ value = self.send(attr)
399
+ if value.nil?
400
+ is_nullable = self.class.openapi_nullable.include?(attr)
401
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
402
+ end
403
+
404
+ hash[param] = _to_hash(value)
405
+ end
406
+ hash
407
+ end
408
+
409
+ # Outputs non-array value in the form of hash
410
+ # For object, use to_hash. Otherwise, just return the value
411
+ # @param [Object] value Any valid value
412
+ # @return [Hash] Returns the value in the form of hash
413
+ def _to_hash(value)
414
+ if value.is_a?(Array)
415
+ value.compact.map { |v| _to_hash(v) }
416
+ elsif value.is_a?(Hash)
417
+ {}.tap do |hash|
418
+ value.each { |k, v| hash[k] = _to_hash(v) }
419
+ end
420
+ elsif value.respond_to? :to_hash
421
+ value.to_hash
422
+ else
423
+ value
424
+ end
425
+ end
426
+
427
+ end
428
+
429
+ end