fromJson static method
Creates a new RevenueWithdrawalState object. This method decides which RevenueWithdrawalState subclass to use based on the type field.
Implementation
static RevenueWithdrawalState fromJson(Map<String, dynamic> json) {
return switch (RevenueWithdrawalStateType.fromJson(json['type'])) {
RevenueWithdrawalStateType.pending =>
RevenueWithdrawalStatePending.fromJson(json),
RevenueWithdrawalStateType.succeeded =>
RevenueWithdrawalStateSucceeded.fromJson(json),
RevenueWithdrawalStateType.failed =>
RevenueWithdrawalStateFailed.fromJson(json),
};
}