我正在使用 savonrb 作为 SOAP 客户端来发出 api 请求来回显以生成小部件。
似乎 savon 只用最后一个的值覆盖了我的 mergeField,而不是将它们作为数组传递。
我用来进行 api 调用的参数:
call_api(:create_personal_embedded_widget, senderInfo: {email: sender_email}, widgetInfo: {
"callbackInfo" => {
"signedDocumentUrl" => signed_document_url
},
"fileInfos" => {
"FileInfo" => {
"file" =>encoded_file,
"fileName" =>"simple_text.docx",
"mimeType "=>"application/msword"
}
},
"formFieldLayerTemplates" => "",
"locale" => "",
"mergeFieldInfo" => {
"mergeFields" => {
"MergeField" =>
{
"defaultValue" => "Foo Bar",
"fieldName" => "fullName"
},
"MergeField" =>
{
"defaultValue" => "01-01-1980",
"fieldName" => "dob"
}
}
},
"name" => document_name,
"securityOptions" => "",
"signatureFlow" =>"SENDER_SIGNS_LAST",
"widgetAuthFailureInfo" => {
"deframe" =>"true",
"delay" =>"10",
"url" => error_call_back_url
},
"widgetCompletionInfo" => {
"deframe" =>"true",
"delay" =>"10",
"url" => success_call_back_url
}
}, personalizationInfo: "")
实际传递给 echosign 的内容:
<ins2:mergeFieldInfo>
<ins3:mergeFields>
<ins3:MergeField>
<ins3:defaultValue>01-01-1980</ins3:defaultValue>
<ins3:fieldName>dob</ins3:fieldName>
</ins3:MergeField>
</ins3:mergeFields>
</ins2:mergeFieldInfo>
我一直在用这个无济于事,我知道它会覆盖这些值,但不明白为什么,并且不知道如何索引它们以便这些字段是增量的。
提前致谢!