Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/ruby-on-rails/56.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ruby on rails Docusign Rails正在获取状态_Ruby On Rails_Ruby_Docusignapi - Fatal编程技术网

Ruby on rails Docusign Rails正在获取状态

Ruby on rails Docusign Rails正在获取状态,ruby-on-rails,ruby,docusignapi,Ruby On Rails,Ruby,Docusignapi,我已经在Ruby on Rails应用程序中实现了Docusign。 我正在尝试获取发送文档的状态。 我可以很容易地得到它一个一个使用信封id像这样 response = client.get_envelope_recipients( envelope_id: envelope_id ) 问题是,我有一个页面显示发送的文档列表,我想显示每个文档的状态以及该列表。因此,使用信封id逐个获取每个文档的状态既困难又耗时 是否有任何方法可以获取从同一帐户发送的信封列表的状态。 我还想知道我是否可

我已经在Ruby on Rails应用程序中实现了Docusign。 我正在尝试获取发送文档的状态。 我可以很容易地得到它一个一个使用信封id像这样

response = client.get_envelope_recipients(
   envelope_id: envelope_id
)
问题是,我有一个页面显示发送的文档列表,我想显示每个文档的状态以及该列表。因此,使用信封id逐个获取每个文档的状态既困难又耗时

是否有任何方法可以获取从同一帐户发送的信封列表的状态。
我还想知道我是否可以做些什么,以便在用户签署文档后,它被重定向到特定的url(然后,我可以在用户签署文档后立即用状态更新数据库)是的,DocuSign平台确实允许您在单个API调用中查询一组信封,而不是在每个信封ID中逐个查询,您只需要进行正确的API调用。看一下,它看起来已经包含了呼叫,它被称为
get_envelope_status
,它允许您通过日期范围和状态查询信封:

# Public retrieves the statuses of envelopes matching the given query
#
# from_date      - Docusign formatted Date/DateTime. Only return items after this date.
#
# to_date        - Docusign formatted Date/DateTime. Only return items up to this date.
#                  Defaults to the time of the call.
#
# from_to_status - The status of the envelope checked for in the from_date - to_date period.
#                  Defaults to 'changed'
#
# status         - The current status of the envelope. Defaults to any status.
#
# Returns an array of hashes containing envelope statuses, ids, and similar information.
def get_envelope_statuses(options={})
  content_type = { 'Content-Type' => 'application/json' }
  content_type.merge(options[:headers]) if options[:headers]

  query_params = options.slice(:from_date, :to_date, :from_to_status, :status)
  uri = build_uri("/accounts/#{acct_id}/envelopes?#{query_params.to_query}")

  http     = initialize_net_http_ssl(uri)
  request  = Net::HTTP::Get.new(uri.request_uri, headers(content_type))
  response = http.request(request)

  JSON.parse(response.body)
end

下面是来自.

的相应API调用,您使用的是哪个DocuSign Ruby客户端或SDK?你能发一个链接供参考吗?确实有一个API调用根据日期或状态请求多个信封,但不确定您使用的库是否支持该调用。你可能需要把它加进去。@Ergin忘了提那个。。使用docusign\u rest查看我刚才添加的帖子。。。