@@ -5,33 +5,67 @@ package com.lithic.api.models
55import com.lithic.api.core.NoAutoDetect
66import com.lithic.api.core.toUnmodifiable
77import com.lithic.api.models.*
8+ import java.time.OffsetDateTime
9+ import java.time.format.DateTimeFormatter
810import java.util.Objects
911import java.util.Optional
1012
1113class AccountHolderListParams
1214constructor (
15+ private val begin: OffsetDateTime ? ,
16+ private val email: String? ,
17+ private val end: OffsetDateTime ? ,
1318 private val endingBefore: String? ,
1419 private val externalId: String? ,
20+ private val firstName: String? ,
21+ private val lastName: String? ,
22+ private val legalBusinessName: String? ,
1523 private val limit: Long? ,
24+ private val phoneNumber: String? ,
1625 private val startingAfter: String? ,
1726 private val additionalQueryParams: Map <String , List <String >>,
1827 private val additionalHeaders: Map <String , List <String >>,
1928) {
2029
30+ fun begin (): Optional <OffsetDateTime > = Optional .ofNullable(begin)
31+
32+ fun email (): Optional <String > = Optional .ofNullable(email)
33+
34+ fun end (): Optional <OffsetDateTime > = Optional .ofNullable(end)
35+
2136 fun endingBefore (): Optional <String > = Optional .ofNullable(endingBefore)
2237
2338 fun externalId (): Optional <String > = Optional .ofNullable(externalId)
2439
40+ fun firstName (): Optional <String > = Optional .ofNullable(firstName)
41+
42+ fun lastName (): Optional <String > = Optional .ofNullable(lastName)
43+
44+ fun legalBusinessName (): Optional <String > = Optional .ofNullable(legalBusinessName)
45+
2546 fun limit (): Optional <Long > = Optional .ofNullable(limit)
2647
48+ fun phoneNumber (): Optional <String > = Optional .ofNullable(phoneNumber)
49+
2750 fun startingAfter (): Optional <String > = Optional .ofNullable(startingAfter)
2851
2952 @JvmSynthetic
3053 internal fun getQueryParams (): Map <String , List <String >> {
3154 val params = mutableMapOf<String , List <String >>()
55+ this .begin?.let {
56+ params.put(" begin" , listOf (DateTimeFormatter .ISO_OFFSET_DATE_TIME .format(it)))
57+ }
58+ this .email?.let { params.put(" email" , listOf (it.toString())) }
59+ this .end?.let {
60+ params.put(" end" , listOf (DateTimeFormatter .ISO_OFFSET_DATE_TIME .format(it)))
61+ }
3262 this .endingBefore?.let { params.put(" ending_before" , listOf (it.toString())) }
3363 this .externalId?.let { params.put(" external_id" , listOf (it.toString())) }
64+ this .firstName?.let { params.put(" first_name" , listOf (it.toString())) }
65+ this .lastName?.let { params.put(" last_name" , listOf (it.toString())) }
66+ this .legalBusinessName?.let { params.put(" legal_business_name" , listOf (it.toString())) }
3467 this .limit?.let { params.put(" limit" , listOf (it.toString())) }
68+ this .phoneNumber?.let { params.put(" phone_number" , listOf (it.toString())) }
3569 this .startingAfter?.let { params.put(" starting_after" , listOf (it.toString())) }
3670 params.putAll(additionalQueryParams)
3771 return params.toUnmodifiable()
@@ -49,27 +83,41 @@ constructor(
4983 }
5084
5185 return other is AccountHolderListParams &&
86+ this .begin == other.begin &&
87+ this .email == other.email &&
88+ this .end == other.end &&
5289 this .endingBefore == other.endingBefore &&
5390 this .externalId == other.externalId &&
91+ this .firstName == other.firstName &&
92+ this .lastName == other.lastName &&
93+ this .legalBusinessName == other.legalBusinessName &&
5494 this .limit == other.limit &&
95+ this .phoneNumber == other.phoneNumber &&
5596 this .startingAfter == other.startingAfter &&
5697 this .additionalQueryParams == other.additionalQueryParams &&
5798 this .additionalHeaders == other.additionalHeaders
5899 }
59100
60101 override fun hashCode (): Int {
61102 return Objects .hash(
103+ begin,
104+ email,
105+ end,
62106 endingBefore,
63107 externalId,
108+ firstName,
109+ lastName,
110+ legalBusinessName,
64111 limit,
112+ phoneNumber,
65113 startingAfter,
66114 additionalQueryParams,
67115 additionalHeaders,
68116 )
69117 }
70118
71119 override fun toString () =
72- " AccountHolderListParams{endingBefore=$endingBefore , externalId=$externalId , limit=$limit , startingAfter=$startingAfter , additionalQueryParams=$additionalQueryParams , additionalHeaders=$additionalHeaders }"
120+ " AccountHolderListParams{begin= $begin , email= $email , end= $end , endingBefore=$endingBefore , externalId=$externalId , firstName= $firstName , lastName= $lastName , legalBusinessName= $legalBusinessName , limit=$limit , phoneNumber= $phoneNumber , startingAfter=$startingAfter , additionalQueryParams=$additionalQueryParams , additionalHeaders=$additionalHeaders }"
73121
74122 fun toBuilder () = Builder ().from(this )
75123
@@ -81,23 +129,54 @@ constructor(
81129 @NoAutoDetect
82130 class Builder {
83131
132+ private var begin: OffsetDateTime ? = null
133+ private var email: String? = null
134+ private var end: OffsetDateTime ? = null
84135 private var endingBefore: String? = null
85136 private var externalId: String? = null
137+ private var firstName: String? = null
138+ private var lastName: String? = null
139+ private var legalBusinessName: String? = null
86140 private var limit: Long? = null
141+ private var phoneNumber: String? = null
87142 private var startingAfter: String? = null
88143 private var additionalQueryParams: MutableMap <String , MutableList <String >> = mutableMapOf ()
89144 private var additionalHeaders: MutableMap <String , MutableList <String >> = mutableMapOf ()
90145
91146 @JvmSynthetic
92147 internal fun from (accountHolderListParams : AccountHolderListParams ) = apply {
148+ this .begin = accountHolderListParams.begin
149+ this .email = accountHolderListParams.email
150+ this .end = accountHolderListParams.end
93151 this .endingBefore = accountHolderListParams.endingBefore
94152 this .externalId = accountHolderListParams.externalId
153+ this .firstName = accountHolderListParams.firstName
154+ this .lastName = accountHolderListParams.lastName
155+ this .legalBusinessName = accountHolderListParams.legalBusinessName
95156 this .limit = accountHolderListParams.limit
157+ this .phoneNumber = accountHolderListParams.phoneNumber
96158 this .startingAfter = accountHolderListParams.startingAfter
97159 additionalQueryParams(accountHolderListParams.additionalQueryParams)
98160 additionalHeaders(accountHolderListParams.additionalHeaders)
99161 }
100162
163+ /* *
164+ * Date string in RFC 3339 format. Only entries created after the specified time will be
165+ * included. UTC time zone.
166+ */
167+ fun begin (begin : OffsetDateTime ) = apply { this .begin = begin }
168+
169+ /* *
170+ * Email address of the account holder. The query must be an exact match, case insensitive.
171+ */
172+ fun email (email : String ) = apply { this .email = email }
173+
174+ /* *
175+ * Date string in RFC 3339 format. Only entries created before the specified time will be
176+ * included. UTC time zone.
177+ */
178+ fun end (end : OffsetDateTime ) = apply { this .end = end }
179+
101180 /* *
102181 * A cursor representing an item's token before which a page of results should end. Used to
103182 * retrieve the previous page of results before this item.
@@ -107,9 +186,32 @@ constructor(
107186 /* * If applicable, represents the external_id associated with the account_holder. */
108187 fun externalId (externalId : String ) = apply { this .externalId = externalId }
109188
189+ /* *
190+ * (Individual Account Holders only) The first name of the account holder. The query is case
191+ * insensitive and supports partial matches.
192+ */
193+ fun firstName (firstName : String ) = apply { this .firstName = firstName }
194+
195+ /* *
196+ * (Individual Account Holders only) The last name of the account holder. The query is case
197+ * insensitive and supports partial matches.
198+ */
199+ fun lastName (lastName : String ) = apply { this .lastName = lastName }
200+
201+ /* *
202+ * (Business Account Holders only) The legal business name of the account holder. The query
203+ * is case insensitive and supports partial matches.
204+ */
205+ fun legalBusinessName (legalBusinessName : String ) = apply {
206+ this .legalBusinessName = legalBusinessName
207+ }
208+
110209 /* * The number of account_holders to limit the response to. */
111210 fun limit (limit : Long ) = apply { this .limit = limit }
112211
212+ /* * Phone number of the account holder. The query must be an exact match. */
213+ fun phoneNumber (phoneNumber : String ) = apply { this .phoneNumber = phoneNumber }
214+
113215 /* *
114216 * A cursor representing an item's token after which a page of results should begin. Used to
115217 * retrieve the next page of results after this item.
@@ -158,9 +260,16 @@ constructor(
158260
159261 fun build (): AccountHolderListParams =
160262 AccountHolderListParams (
263+ begin,
264+ email,
265+ end,
161266 endingBefore,
162267 externalId,
268+ firstName,
269+ lastName,
270+ legalBusinessName,
163271 limit,
272+ phoneNumber,
164273 startingAfter,
165274 additionalQueryParams.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(),
166275 additionalHeaders.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(),
0 commit comments