diff --git a/types/googlepay/googlepay-tests.ts b/types/googlepay/googlepay-tests.ts index 6c99453fbe24fc..8b60c1542d9e5b 100644 --- a/types/googlepay/googlepay-tests.ts +++ b/types/googlepay/googlepay-tests.ts @@ -201,6 +201,10 @@ function getGooglePaymentDataConfiguration(): google.payments.api.PaymentDataReq }, allowedPaymentMethods, shippingAddressRequired: true, + shippingAddressParameters: { + phoneNumberRequired: true, + format: "FULL-ISO3166", + }, callbackIntents: ["OFFER", "PAYMENT_AUTHORIZATION", "PAYMENT_METHOD"], }; } diff --git a/types/googlepay/index.d.ts b/types/googlepay/index.d.ts index 56784d45b04e03..1b37bbab81fe97 100644 --- a/types/googlepay/index.d.ts +++ b/types/googlepay/index.d.ts @@ -404,6 +404,15 @@ declare namespace google.payments.api { * @default false */ phoneNumberRequired?: false | true | undefined; + + /** + * Shipping address format. + * + * If omitted, defaults to [[ShippingAddressFormat|`FULL`]]. + * + * * @default "FULL" + */ + format?: ShippingAddressFormat | undefined; } /** @@ -483,6 +492,14 @@ declare namespace google.payments.api { * number be returned. */ phoneNumber?: string | undefined; + + /** + * The ISO 3166-2 administrative area + * + * ISO 3166-2 administrative area corresponding to administrativeArea. + * Only present if the shipping or billing address format is FULL-ISO3166. + */ + iso3166AdministrativeArea?: string | undefined; } /** @@ -516,6 +533,14 @@ declare namespace google.payments.api { * The locality (e.g. city or town). */ locality: string; + + /** + * The ISO 3166-2 administrative area + * + * ISO 3166-2 administrative area corresponding to administrativeArea. + * Only present if the shipping address format is FULL-ISO3166. + */ + iso3166AdministrativeArea?: string | undefined; } /** @@ -1582,8 +1607,35 @@ declare namespace google.payments.api { * Only select this format when it is required to process the order. * Additional form entry or customer data requests can increase friction * during the checkout process and can lead to a lower conversion rate. + * + * - `FULL-ISO3166`: + * Same as `FULL` but includes [[Address.iso3166AdministrativeArea|`Address.iso3166AdministrativeArea`]] + */ + type BillingAddressFormat = "MIN" | "FULL" | "FULL-ISO3166"; + + /** + * Shipping address format enum string. + * + * Options: + * + * - `FULL`: + * Full shipping address + * + * All the fields in [[Address|`Address`]] will + * be returned, with the possible exception of + * [[Address.phoneNumber|`Address.phoneNumber`]] which will only be + * returned if + * [[ShippingAddressParameters.phoneNumberRequired|`ShippingAddressParameters.phoneNumberRequired`]] + * is set to `true`. + * + * Only select this format when it is required to process the order. + * Additional form entry or customer data requests can increase friction + * during the checkout process and can lead to a lower conversion rate. + * + * - `FULL-ISO3166`: + * Same as `FULL` but includes [[Address.iso3166AdministrativeArea|`Address.iso3166AdministrativeArea`]] */ - type BillingAddressFormat = "MIN" | "FULL"; + type ShippingAddressFormat = "FULL" | "FULL-ISO3166"; /** * The status of the total price used. diff --git a/types/googlepay/package.json b/types/googlepay/package.json index 04bf4799cb0772..34aa8b75a8b612 100644 --- a/types/googlepay/package.json +++ b/types/googlepay/package.json @@ -38,6 +38,14 @@ { "name": "Dominik Mengelt", "githubUsername": "dmengelt" + }, + { + "name": "Matthew Class", + "githubUsername": "aikimatthew" + }, + { + "name": "Stephen McDonald", + "githubUsername": "stephenmcd" } ] }