copyWith method

UserResponseModel copyWith({
  1. String? userId,
  2. SubscriptionResponseModel? subscription,
  3. dynamic subscriptionExtras,
  4. bool? isNewUser,
  5. dynamic xiApiKey,
  6. bool? canUseDelayedPaymentMethods,
  7. bool? isOnboardingCompleted,
  8. bool? isOnboardingChecklistCompleted,
  9. dynamic firstName,
  10. bool? isApiKeyHashed,
  11. dynamic xiApiKeyPreview,
  12. dynamic referralLinkCode,
  13. dynamic partnerstackPartnerDefaultLink,
})

Implementation

UserResponseModel copyWith(
    {String? userId,
    SubscriptionResponseModel? subscription,
    dynamic subscriptionExtras,
    bool? isNewUser,
    dynamic xiApiKey,
    bool? canUseDelayedPaymentMethods,
    bool? isOnboardingCompleted,
    bool? isOnboardingChecklistCompleted,
    dynamic firstName,
    bool? isApiKeyHashed,
    dynamic xiApiKeyPreview,
    dynamic referralLinkCode,
    dynamic partnerstackPartnerDefaultLink}) {
  return UserResponseModel(
      userId: userId ?? this.userId,
      subscription: subscription ?? this.subscription,
      subscriptionExtras: subscriptionExtras ?? this.subscriptionExtras,
      isNewUser: isNewUser ?? this.isNewUser,
      xiApiKey: xiApiKey ?? this.xiApiKey,
      canUseDelayedPaymentMethods:
          canUseDelayedPaymentMethods ?? this.canUseDelayedPaymentMethods,
      isOnboardingCompleted:
          isOnboardingCompleted ?? this.isOnboardingCompleted,
      isOnboardingChecklistCompleted: isOnboardingChecklistCompleted ??
          this.isOnboardingChecklistCompleted,
      firstName: firstName ?? this.firstName,
      isApiKeyHashed: isApiKeyHashed ?? this.isApiKeyHashed,
      xiApiKeyPreview: xiApiKeyPreview ?? this.xiApiKeyPreview,
      referralLinkCode: referralLinkCode ?? this.referralLinkCode,
      partnerstackPartnerDefaultLink: partnerstackPartnerDefaultLink ??
          this.partnerstackPartnerDefaultLink);
}