Class: SDM::ApprovalWorkflowStepsHistory
- Inherits:
-
Object
- Object
- SDM::ApprovalWorkflowStepsHistory
- Extended by:
- Gem::Deprecate
- Defined in:
- lib/svc.rb
Overview
ApprovalWorkflowStepsHistory records all changes to the state of an ApprovalWorkflowStep.
Instance Method Summary collapse
-
#initialize(channel, parent) ⇒ ApprovalWorkflowStepsHistory
constructor
A new instance of ApprovalWorkflowStepsHistory.
-
#list(filter, *args, deadline: nil) ⇒ Object
List gets a list of ApprovalWorkflowStepHistory records matching a given set of criteria.
Constructor Details
#initialize(channel, parent) ⇒ ApprovalWorkflowStepsHistory
Returns a new instance of ApprovalWorkflowStepsHistory.
1695 1696 1697 1698 1699 1700 1701 1702 |
# File 'lib/svc.rb', line 1695 def initialize(channel, parent) begin @stub = V1::ApprovalWorkflowStepsHistory::Stub.new(nil, nil, channel_override: channel) rescue => exception raise Plumbing::convert_error_to_porcelain(exception) end @parent = parent end |
Instance Method Details
#list(filter, *args, deadline: nil) ⇒ Object
List gets a list of ApprovalWorkflowStepHistory records matching a given set of criteria.
1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 |
# File 'lib/svc.rb', line 1705 def list( filter, *args, deadline: nil ) req = V1::ApprovalWorkflowStepHistoryListRequest.new() req. = V1::ListRequestMetadata.new() if @parent.page_limit > 0 req..limit = @parent.page_limit end if not @parent.snapshot_time.nil? req..snapshot_at = @parent.snapshot_time end req.filter = Plumbing::quote_filter_args(filter, *args) resp = Enumerator::Generator.new { |g| tries = 0 loop do begin plumbing_response = @stub.list(req, metadata: @parent.("ApprovalWorkflowStepsHistory.List", req), deadline: deadline) rescue => exception if (@parent.shouldRetry(tries, exception)) tries + +@parent.jitterSleep(tries) next end raise Plumbing::convert_error_to_porcelain(exception) end tries = 0 plumbing_response.history.each do |plumbing_item| g.yield Plumbing::convert_approval_workflow_step_history_to_porcelain(plumbing_item) end break if plumbing_response..next_cursor == "" req..cursor = plumbing_response..next_cursor end } resp end |