copyWith method

Invoice copyWith({
  1. String? currency,
  2. List<LabeledPricePart>? priceParts,
  3. int? subscriptionPeriod,
  4. int? maxTipAmount,
  5. List<int>? suggestedTipAmounts,
  6. String? recurringPaymentTermsOfServiceUrl,
  7. String? termsOfServiceUrl,
  8. bool? isTest,
  9. bool? needName,
  10. bool? needPhoneNumber,
  11. bool? needEmailAddress,
  12. bool? needShippingAddress,
  13. bool? sendPhoneNumberToProvider,
  14. bool? sendEmailAddressToProvider,
  15. bool? isFlexible,
})

Implementation

Invoice copyWith({
  String? currency,
  List<LabeledPricePart>? priceParts,
  int? subscriptionPeriod,
  int? maxTipAmount,
  List<int>? suggestedTipAmounts,
  String? recurringPaymentTermsOfServiceUrl,
  String? termsOfServiceUrl,
  bool? isTest,
  bool? needName,
  bool? needPhoneNumber,
  bool? needEmailAddress,
  bool? needShippingAddress,
  bool? sendPhoneNumberToProvider,
  bool? sendEmailAddressToProvider,
  bool? isFlexible,
}) =>
    Invoice(
      currency: currency ?? this.currency,
      priceParts: priceParts ?? this.priceParts,
      subscriptionPeriod: subscriptionPeriod ?? this.subscriptionPeriod,
      maxTipAmount: maxTipAmount ?? this.maxTipAmount,
      suggestedTipAmounts: suggestedTipAmounts ?? this.suggestedTipAmounts,
      recurringPaymentTermsOfServiceUrl: recurringPaymentTermsOfServiceUrl ??
          this.recurringPaymentTermsOfServiceUrl,
      termsOfServiceUrl: termsOfServiceUrl ?? this.termsOfServiceUrl,
      isTest: isTest ?? this.isTest,
      needName: needName ?? this.needName,
      needPhoneNumber: needPhoneNumber ?? this.needPhoneNumber,
      needEmailAddress: needEmailAddress ?? this.needEmailAddress,
      needShippingAddress: needShippingAddress ?? this.needShippingAddress,
      sendPhoneNumberToProvider:
          sendPhoneNumberToProvider ?? this.sendPhoneNumberToProvider,
      sendEmailAddressToProvider:
          sendEmailAddressToProvider ?? this.sendEmailAddressToProvider,
      isFlexible: isFlexible ?? this.isFlexible,
    );