@@ -33,7 +33,9 @@ private constructor(
3333 private val productCart: JsonField <List <ProductCart >>,
3434 private val totalPrice: JsonField <Int >,
3535 private val recurringBreakup: JsonField <RecurringBreakup >,
36+ private val taxIdBusinessName: JsonField <String >,
3637 private val taxIdErrMsg: JsonField <String >,
38+ private val taxIdFormatName: JsonField <String >,
3739 private val totalTax: JsonField <Int >,
3840 private val additionalProperties: MutableMap <String , JsonValue >,
3941) {
@@ -55,9 +57,15 @@ private constructor(
5557 @JsonProperty(" recurring_breakup" )
5658 @ExcludeMissing
5759 recurringBreakup: JsonField <RecurringBreakup > = JsonMissing .of(),
60+ @JsonProperty(" tax_id_business_name" )
61+ @ExcludeMissing
62+ taxIdBusinessName: JsonField <String > = JsonMissing .of(),
5863 @JsonProperty(" tax_id_err_msg" )
5964 @ExcludeMissing
6065 taxIdErrMsg: JsonField <String > = JsonMissing .of(),
66+ @JsonProperty(" tax_id_format_name" )
67+ @ExcludeMissing
68+ taxIdFormatName: JsonField <String > = JsonMissing .of(),
6169 @JsonProperty(" total_tax" ) @ExcludeMissing totalTax: JsonField <Int > = JsonMissing .of(),
6270 ) : this (
6371 billingCountry,
@@ -67,7 +75,9 @@ private constructor(
6775 productCart,
6876 totalPrice,
6977 recurringBreakup,
78+ taxIdBusinessName,
7079 taxIdErrMsg,
80+ taxIdFormatName,
7181 totalTax,
7282 mutableMapOf (),
7383 )
@@ -131,6 +141,15 @@ private constructor(
131141 fun recurringBreakup (): Optional <RecurringBreakup > =
132142 recurringBreakup.getOptional(" recurring_breakup" )
133143
144+ /* *
145+ * Registered business name from the official registry (EU/GB/AU) when found
146+ *
147+ * @throws DodoPaymentsInvalidDataException if the JSON field has an unexpected type (e.g. if
148+ * the server responded with an unexpected value).
149+ */
150+ fun taxIdBusinessName (): Optional <String > =
151+ taxIdBusinessName.getOptional(" tax_id_business_name" )
152+
134153 /* *
135154 * Error message if tax ID validation failed
136155 *
@@ -139,6 +158,14 @@ private constructor(
139158 */
140159 fun taxIdErrMsg (): Optional <String > = taxIdErrMsg.getOptional(" tax_id_err_msg" )
141160
161+ /* *
162+ * The matched tax ID notation (e.g. "VAT Number", "GSTIN") when valid
163+ *
164+ * @throws DodoPaymentsInvalidDataException if the JSON field has an unexpected type (e.g. if
165+ * the server responded with an unexpected value).
166+ */
167+ fun taxIdFormatName (): Optional <String > = taxIdFormatName.getOptional(" tax_id_format_name" )
168+
142169 /* *
143170 * Total tax
144171 *
@@ -205,6 +232,16 @@ private constructor(
205232 @ExcludeMissing
206233 fun _recurringBreakup (): JsonField <RecurringBreakup > = recurringBreakup
207234
235+ /* *
236+ * Returns the raw JSON value of [taxIdBusinessName].
237+ *
238+ * Unlike [taxIdBusinessName], this method doesn't throw if the JSON field has an unexpected
239+ * type.
240+ */
241+ @JsonProperty(" tax_id_business_name" )
242+ @ExcludeMissing
243+ fun _taxIdBusinessName (): JsonField <String > = taxIdBusinessName
244+
208245 /* *
209246 * Returns the raw JSON value of [taxIdErrMsg].
210247 *
@@ -214,6 +251,15 @@ private constructor(
214251 @ExcludeMissing
215252 fun _taxIdErrMsg (): JsonField <String > = taxIdErrMsg
216253
254+ /* *
255+ * Returns the raw JSON value of [taxIdFormatName].
256+ *
257+ * Unlike [taxIdFormatName], this method doesn't throw if the JSON field has an unexpected type.
258+ */
259+ @JsonProperty(" tax_id_format_name" )
260+ @ExcludeMissing
261+ fun _taxIdFormatName (): JsonField <String > = taxIdFormatName
262+
217263 /* *
218264 * Returns the raw JSON value of [totalTax].
219265 *
@@ -262,7 +308,9 @@ private constructor(
262308 private var productCart: JsonField <MutableList <ProductCart >>? = null
263309 private var totalPrice: JsonField <Int >? = null
264310 private var recurringBreakup: JsonField <RecurringBreakup > = JsonMissing .of()
311+ private var taxIdBusinessName: JsonField <String > = JsonMissing .of()
265312 private var taxIdErrMsg: JsonField <String > = JsonMissing .of()
313+ private var taxIdFormatName: JsonField <String > = JsonMissing .of()
266314 private var totalTax: JsonField <Int > = JsonMissing .of()
267315 private var additionalProperties: MutableMap <String , JsonValue > = mutableMapOf ()
268316
@@ -275,7 +323,9 @@ private constructor(
275323 productCart = checkoutSessionPreviewResponse.productCart.map { it.toMutableList() }
276324 totalPrice = checkoutSessionPreviewResponse.totalPrice
277325 recurringBreakup = checkoutSessionPreviewResponse.recurringBreakup
326+ taxIdBusinessName = checkoutSessionPreviewResponse.taxIdBusinessName
278327 taxIdErrMsg = checkoutSessionPreviewResponse.taxIdErrMsg
328+ taxIdFormatName = checkoutSessionPreviewResponse.taxIdFormatName
279329 totalTax = checkoutSessionPreviewResponse.totalTax
280330 additionalProperties =
281331 checkoutSessionPreviewResponse.additionalProperties.toMutableMap()
@@ -394,6 +444,25 @@ private constructor(
394444 this .recurringBreakup = recurringBreakup
395445 }
396446
447+ /* * Registered business name from the official registry (EU/GB/AU) when found */
448+ fun taxIdBusinessName (taxIdBusinessName : String? ) =
449+ taxIdBusinessName(JsonField .ofNullable(taxIdBusinessName))
450+
451+ /* * Alias for calling [Builder.taxIdBusinessName] with `taxIdBusinessName.orElse(null)`. */
452+ fun taxIdBusinessName (taxIdBusinessName : Optional <String >) =
453+ taxIdBusinessName(taxIdBusinessName.getOrNull())
454+
455+ /* *
456+ * Sets [Builder.taxIdBusinessName] to an arbitrary JSON value.
457+ *
458+ * You should usually call [Builder.taxIdBusinessName] with a well-typed [String] value
459+ * instead. This method is primarily for setting the field to an undocumented or not yet
460+ * supported value.
461+ */
462+ fun taxIdBusinessName (taxIdBusinessName : JsonField <String >) = apply {
463+ this .taxIdBusinessName = taxIdBusinessName
464+ }
465+
397466 /* * Error message if tax ID validation failed */
398467 fun taxIdErrMsg (taxIdErrMsg : String? ) = taxIdErrMsg(JsonField .ofNullable(taxIdErrMsg))
399468
@@ -409,6 +478,25 @@ private constructor(
409478 */
410479 fun taxIdErrMsg (taxIdErrMsg : JsonField <String >) = apply { this .taxIdErrMsg = taxIdErrMsg }
411480
481+ /* * The matched tax ID notation (e.g. "VAT Number", "GSTIN") when valid */
482+ fun taxIdFormatName (taxIdFormatName : String? ) =
483+ taxIdFormatName(JsonField .ofNullable(taxIdFormatName))
484+
485+ /* * Alias for calling [Builder.taxIdFormatName] with `taxIdFormatName.orElse(null)`. */
486+ fun taxIdFormatName (taxIdFormatName : Optional <String >) =
487+ taxIdFormatName(taxIdFormatName.getOrNull())
488+
489+ /* *
490+ * Sets [Builder.taxIdFormatName] to an arbitrary JSON value.
491+ *
492+ * You should usually call [Builder.taxIdFormatName] with a well-typed [String] value
493+ * instead. This method is primarily for setting the field to an undocumented or not yet
494+ * supported value.
495+ */
496+ fun taxIdFormatName (taxIdFormatName : JsonField <String >) = apply {
497+ this .taxIdFormatName = taxIdFormatName
498+ }
499+
412500 /* * Total tax */
413501 fun totalTax (totalTax : Int? ) = totalTax(JsonField .ofNullable(totalTax))
414502
@@ -475,7 +563,9 @@ private constructor(
475563 checkRequired(" productCart" , productCart).map { it.toImmutable() },
476564 checkRequired(" totalPrice" , totalPrice),
477565 recurringBreakup,
566+ taxIdBusinessName,
478567 taxIdErrMsg,
568+ taxIdFormatName,
479569 totalTax,
480570 additionalProperties.toMutableMap(),
481571 )
@@ -503,7 +593,9 @@ private constructor(
503593 productCart().forEach { it.validate() }
504594 totalPrice()
505595 recurringBreakup().ifPresent { it.validate() }
596+ taxIdBusinessName()
506597 taxIdErrMsg()
598+ taxIdFormatName()
507599 totalTax()
508600 validated = true
509601 }
@@ -530,7 +622,9 @@ private constructor(
530622 (productCart.asKnown().getOrNull()?.sumOf { it.validity().toInt() } ? : 0 ) +
531623 (if (totalPrice.asKnown().isPresent) 1 else 0 ) +
532624 (recurringBreakup.asKnown().getOrNull()?.validity() ? : 0 ) +
625+ (if (taxIdBusinessName.asKnown().isPresent) 1 else 0 ) +
533626 (if (taxIdErrMsg.asKnown().isPresent) 1 else 0 ) +
627+ (if (taxIdFormatName.asKnown().isPresent) 1 else 0 ) +
534628 (if (totalTax.asKnown().isPresent) 1 else 0 )
535629
536630 /* * Breakup of the current payment */
@@ -3574,7 +3668,9 @@ private constructor(
35743668 productCart == other.productCart &&
35753669 totalPrice == other.totalPrice &&
35763670 recurringBreakup == other.recurringBreakup &&
3671+ taxIdBusinessName == other.taxIdBusinessName &&
35773672 taxIdErrMsg == other.taxIdErrMsg &&
3673+ taxIdFormatName == other.taxIdFormatName &&
35783674 totalTax == other.totalTax &&
35793675 additionalProperties == other.additionalProperties
35803676 }
@@ -3588,7 +3684,9 @@ private constructor(
35883684 productCart,
35893685 totalPrice,
35903686 recurringBreakup,
3687+ taxIdBusinessName,
35913688 taxIdErrMsg,
3689+ taxIdFormatName,
35923690 totalTax,
35933691 additionalProperties,
35943692 )
@@ -3597,5 +3695,5 @@ private constructor(
35973695 override fun hashCode (): Int = hashCode
35983696
35993697 override fun toString () =
3600- " CheckoutSessionPreviewResponse{billingCountry=$billingCountry , currency=$currency , currentBreakup=$currentBreakup , isByop=$isByop , productCart=$productCart , totalPrice=$totalPrice , recurringBreakup=$recurringBreakup , taxIdErrMsg=$taxIdErrMsg , totalTax=$totalTax , additionalProperties=$additionalProperties }"
3698+ " CheckoutSessionPreviewResponse{billingCountry=$billingCountry , currency=$currency , currentBreakup=$currentBreakup , isByop=$isByop , productCart=$productCart , totalPrice=$totalPrice , recurringBreakup=$recurringBreakup , taxIdBusinessName= $taxIdBusinessName , taxIdErrMsg=$taxIdErrMsg , taxIdFormatName= $taxIdFormatName , totalTax=$totalTax , additionalProperties=$additionalProperties }"
36013699}
0 commit comments