@fluid-app/portal-sdk 0.1.289 → 0.1.290

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -5163,11 +5163,22 @@ function PortalSubscriptionPaymentMethodSection({ paymentMethod: currentPaymentM
5163
5163
  onError: (err) => onError?.("Failed to update payment method", err)
5164
5164
  });
5165
5165
  const addCardMutation = (0, _tanstack_react_query.useMutation)({
5166
- mutationFn: (data) => payApi.createPaymentMethod({ payment_method: {
5167
- type: "card",
5168
- token: data.payment_method.token,
5169
- default: data.default_payment_method
5170
- } }),
5166
+ mutationFn: (data) => payApi.createPaymentMethod({
5167
+ payment_method: {
5168
+ type: "card",
5169
+ token: data.payment_method.token,
5170
+ default: data.default_payment_method
5171
+ },
5172
+ ...data.billing_address && { billing_address: {
5173
+ country: data.billing_address.country_code,
5174
+ name: data.billing_address.name ?? null,
5175
+ street1: data.billing_address.address1,
5176
+ street2: data.billing_address.address2 ?? null,
5177
+ city: data.billing_address.city,
5178
+ state: data.billing_address.state,
5179
+ zip: data.billing_address.zip
5180
+ } }
5181
+ }),
5171
5182
  onSuccess: async () => {
5172
5183
  await queryClient.invalidateQueries({ queryKey: require_query_keys.payKeys.paymentMethods.all });
5173
5184
  onSuccess?.("Payment method added");
@@ -5788,4 +5799,4 @@ Object.defineProperty(exports, "subscriptionsScreenPropertySchema", {
5788
5799
  }
5789
5800
  });
5790
5801
 
5791
- //# sourceMappingURL=SubscriptionsScreen-5IsYJnvc.cjs.map
5802
+ //# sourceMappingURL=SubscriptionsScreen-yN3hvtab.cjs.map