I'm receiving the error in the title when sending a Letter. It seems that the problem is with attributes that are mapped to Open API type that is an Ruby Array.
In this error in particular return_envelope is mapped to Array[:ReturnEnvelope, :Boolean]:
|
:'return_envelope' => Array[:'ReturnEnvelope', :'Boolean'], |
The second if in Letter#build_from_hash breaks because a =~ is sent to the array instance:
|
elsif type =~ /\AArray<(.*)>/i |
Maybe the third if should precede the second one and add a check if type responds_to(:=~)? This problem should be present in all the implementations of build_form_hash of other model classes.
Thanks!
I'm receiving the error in the title when sending a Letter. It seems that the problem is with attributes that are mapped to Open API type that is an Ruby Array.
In this error in particular
return_envelopeis mapped toArray[:ReturnEnvelope, :Boolean]:lob-ruby/lib/openapi_client/models/letter.rb
Line 190 in 2591d23
The second if in
Letter#build_from_hashbreaks because a=~is sent to the array instance:lob-ruby/lib/openapi_client/models/letter.rb
Line 624 in 2591d23
Maybe the third if should precede the second one and add a check if
typeresponds_to(:=~)? This problem should be present in all the implementations ofbuild_form_hashof other model classes.Thanks!