@@ -371,6 +371,7 @@ marshal(
371371 ExternalID = maps :get (<<" externalID" >>, Params , undefined ),
372372 Metadata = maps :get (<<" metadata" >>, Params , undefined ),
373373 Quote = maps :get (<<" quote" >>, Params , undefined ),
374+ ContactInfo = maps :get (<<" contactInfo" >>, Params , undefined ),
374375 PartyID = maps :get (<<" party" >>, Params , <<>>),
375376 # wthd_WithdrawalParams {
376377 id = marshal (id , ID ),
@@ -380,7 +381,15 @@ marshal(
380381 quote = Quote ,
381382 external_id = maybe_marshal (id , ExternalID ),
382383 metadata = maybe_marshal (context , Metadata ),
383- party_id = PartyID
384+ party_id = PartyID ,
385+ contact_info = maybe_marshal (contact_info , ContactInfo )
386+ };
387+ marshal (contact_info , ContactInfo ) ->
388+ PhoneNumber = maps :get (<<" phoneNumber" >>, ContactInfo , undefined ),
389+ Email = maps :get (<<" email" >>, ContactInfo , undefined ),
390+ # fistful_base_ContactInfo {
391+ phone_number = PhoneNumber ,
392+ email = Email
384393 };
385394marshal (
386395 create_quote_params ,
@@ -445,7 +454,8 @@ unmarshal(withdrawal, #wthd_WithdrawalState{
445454 status = Status ,
446455 created_at = CreatedAt ,
447456 metadata = Metadata ,
448- quote = Quote
457+ quote = Quote ,
458+ contact_info = ContactInfo
449459}) ->
450460 UnmarshaledMetadata = maybe_unmarshal (context , Metadata ),
451461 genlib_map :compact (
@@ -459,7 +469,8 @@ unmarshal(withdrawal, #wthd_WithdrawalState{
459469 <<" createdAt" >> => CreatedAt ,
460470 <<" externalID" >> => ExternalID ,
461471 <<" metadata" >> => UnmarshaledMetadata ,
462- <<" quote" >> => maybe_unmarshal (quote_state , Quote )
472+ <<" quote" >> => maybe_unmarshal (quote_state , Quote ),
473+ <<" contactInfo" >> => maybe_unmarshal (contact_info , ContactInfo )
463474 },
464475 unmarshal_status (Status )
465476 )
@@ -488,6 +499,14 @@ unmarshal(quote_state, #wthd_QuoteState{
488499 <<" createdAt" >> => CreatedAt ,
489500 <<" expiresOn" >> => ExpiresOn
490501 };
502+ unmarshal (contact_info , # fistful_base_ContactInfo {
503+ phone_number = PhoneNumber ,
504+ email = Email
505+ }) ->
506+ genlib_map :compact (#{
507+ <<" phoneNumber" >> => maybe_unmarshal (string , PhoneNumber ),
508+ <<" email" >> => maybe_unmarshal (string , Email )
509+ });
491510unmarshal (event , ? EVENT (EventId , OccuredAt , ? STATUS_CHANGE (Status ))) ->
492511 genlib_map :compact (#{
493512 <<" eventID" >> => EventId ,
0 commit comments