@@ -26,6 +26,7 @@ private constructor(
2626 private val forceLanguage: ForceLanguage ? ,
2727 private val maxSpeed: Boolean? ,
2828 private val mcc: String? ,
29+ private val phone: Double? ,
2930 private val timeoutMs: Long? ,
3031 private val additionalHeaders: Headers ,
3132 private val additionalQueryParams: QueryParams ,
@@ -55,6 +56,9 @@ private constructor(
5556 /* * Optional Merchant Category Code (MCC) to help identify the business category/industry. */
5657 fun mcc (): Optional <String > = Optional .ofNullable(mcc)
5758
59+ /* * Optional phone number from the transaction to help verify brand match. */
60+ fun phone (): Optional <Double > = Optional .ofNullable(phone)
61+
5862 /* *
5963 * Optional timeout in milliseconds for the request. If the request takes longer than this
6064 * value, it will be aborted with a 408 status code. Maximum allowed value is 300000ms (5
@@ -93,6 +97,7 @@ private constructor(
9397 private var forceLanguage: ForceLanguage ? = null
9498 private var maxSpeed: Boolean? = null
9599 private var mcc: String? = null
100+ private var phone: Double? = null
96101 private var timeoutMs: Long? = null
97102 private var additionalHeaders: Headers .Builder = Headers .builder()
98103 private var additionalQueryParams: QueryParams .Builder = QueryParams .builder()
@@ -106,6 +111,7 @@ private constructor(
106111 forceLanguage = brandIdentifyFromTransactionParams.forceLanguage
107112 maxSpeed = brandIdentifyFromTransactionParams.maxSpeed
108113 mcc = brandIdentifyFromTransactionParams.mcc
114+ phone = brandIdentifyFromTransactionParams.phone
109115 timeoutMs = brandIdentifyFromTransactionParams.timeoutMs
110116 additionalHeaders = brandIdentifyFromTransactionParams.additionalHeaders.toBuilder()
111117 additionalQueryParams =
@@ -166,6 +172,19 @@ private constructor(
166172 /* * Alias for calling [Builder.mcc] with `mcc.orElse(null)`. */
167173 fun mcc (mcc : Optional <String >) = mcc(mcc.getOrNull())
168174
175+ /* * Optional phone number from the transaction to help verify brand match. */
176+ fun phone (phone : Double? ) = apply { this .phone = phone }
177+
178+ /* *
179+ * Alias for [Builder.phone].
180+ *
181+ * This unboxed primitive overload exists for backwards compatibility.
182+ */
183+ fun phone (phone : Double ) = phone(phone as Double? )
184+
185+ /* * Alias for calling [Builder.phone] with `phone.orElse(null)`. */
186+ fun phone (phone : Optional <Double >) = phone(phone.getOrNull())
187+
169188 /* *
170189 * Optional timeout in milliseconds for the request. If the request takes longer than this
171190 * value, it will be aborted with a 408 status code. Maximum allowed value is 300000ms (5
@@ -301,6 +320,7 @@ private constructor(
301320 forceLanguage,
302321 maxSpeed,
303322 mcc,
323+ phone,
304324 timeoutMs,
305325 additionalHeaders.build(),
306326 additionalQueryParams.build(),
@@ -318,6 +338,7 @@ private constructor(
318338 forceLanguage?.let { put(" force_language" , it.toString()) }
319339 maxSpeed?.let { put(" maxSpeed" , it.toString()) }
320340 mcc?.let { put(" mcc" , it) }
341+ phone?.let { put(" phone" , it.toString()) }
321342 timeoutMs?.let { put(" timeoutMS" , it.toString()) }
322343 putAll(additionalQueryParams)
323344 }
@@ -2322,6 +2343,7 @@ private constructor(
23222343 forceLanguage == other.forceLanguage &&
23232344 maxSpeed == other.maxSpeed &&
23242345 mcc == other.mcc &&
2346+ phone == other.phone &&
23252347 timeoutMs == other.timeoutMs &&
23262348 additionalHeaders == other.additionalHeaders &&
23272349 additionalQueryParams == other.additionalQueryParams
@@ -2335,11 +2357,12 @@ private constructor(
23352357 forceLanguage,
23362358 maxSpeed,
23372359 mcc,
2360+ phone,
23382361 timeoutMs,
23392362 additionalHeaders,
23402363 additionalQueryParams,
23412364 )
23422365
23432366 override fun toString () =
2344- " BrandIdentifyFromTransactionParams{transactionInfo=$transactionInfo , city=$city , countryGl=$countryGl , forceLanguage=$forceLanguage , maxSpeed=$maxSpeed , mcc=$mcc , timeoutMs=$timeoutMs , additionalHeaders=$additionalHeaders , additionalQueryParams=$additionalQueryParams }"
2367+ " BrandIdentifyFromTransactionParams{transactionInfo=$transactionInfo , city=$city , countryGl=$countryGl , forceLanguage=$forceLanguage , maxSpeed=$maxSpeed , mcc=$mcc , phone= $phone , timeoutMs=$timeoutMs , additionalHeaders=$additionalHeaders , additionalQueryParams=$additionalQueryParams }"
23452368}
0 commit comments