Class: CheckoutSdk::Workflows::WorkflowsClient
- Inherits:
-
Client
- Object
- Client
- CheckoutSdk::Workflows::WorkflowsClient
show all
- Defined in:
- lib/checkout_sdk/workflows/workflows_client.rb
Instance Attribute Summary
Attributes inherited from Client
#api_client, #authorization_type, #configuration
Instance Method Summary
collapse
-
#add_workflow_action(workflow_id, workflow_action) ⇒ Object
-
#add_workflow_condition(workflow_id, workflow_condition) ⇒ Object
-
#create_workflow(create_workflow) ⇒ Object
-
#initialize(api_client, configuration) ⇒ WorkflowsClient
constructor
A new instance of WorkflowsClient.
-
#patch_workflow(workflow_id, patch_workflow) ⇒ Object
-
#reflow(reflow) ⇒ Object
-
#reflow_by_event(event_id) ⇒ Object
-
#reflow_by_event_and_workflow(event_id, workflow_id) ⇒ Object
-
#reflow_by_subject(subject_id) ⇒ Object
-
#reflow_by_subject_and_workflow(subject_id, workflow_id) ⇒ Object
-
#remove_workflow(workflow_id) ⇒ Object
-
#remove_workflow_action(workflow_id, action_id) ⇒ Object
-
#remove_workflow_condition(workflow_id, condition_id) ⇒ Object
-
#retrieve_action_invocations(event_id, action_id) ⇒ Object
-
#retrieve_event(event_id) ⇒ Object
-
#retrieve_event_types ⇒ Object
-
#retrieve_subject_events(subject_id) ⇒ Object
-
#retrieve_workflow(workflow_id) ⇒ Object
-
#retrieve_workflows ⇒ Object
-
#test_workflow(workflow_id, event_types_request) ⇒ Object
-
#update_workflow_action(workflow_id, action_id, workflow_action) ⇒ Object
-
#update_workflow_condition(workflow_id, condition_id, workflow_condition) ⇒ Object
Constructor Details
#initialize(api_client, configuration) ⇒ WorkflowsClient
Returns a new instance of WorkflowsClient.
Instance Method Details
#add_workflow_action(workflow_id, workflow_action) ⇒ Object
52
53
54
|
# File 'lib/checkout_sdk/workflows/workflows_client.rb', line 52
def add_workflow_action(workflow_id, workflow_action)
api_client.invoke_post(build_path(WORKFLOWS, workflow_id, ACTIONS), sdk_authorization, workflow_action)
end
|
#add_workflow_condition(workflow_id, workflow_condition) ⇒ Object
72
73
74
|
# File 'lib/checkout_sdk/workflows/workflows_client.rb', line 72
def add_workflow_condition(workflow_id, workflow_condition)
api_client.invoke_post(build_path(WORKFLOWS, workflow_id, CONDITIONS), sdk_authorization, workflow_condition)
end
|
#create_workflow(create_workflow) ⇒ Object
30
31
32
|
# File 'lib/checkout_sdk/workflows/workflows_client.rb', line 30
def create_workflow(create_workflow)
api_client.invoke_post(WORKFLOWS, sdk_authorization, create_workflow)
end
|
#patch_workflow(workflow_id, patch_workflow) ⇒ Object
46
47
48
|
# File 'lib/checkout_sdk/workflows/workflows_client.rb', line 46
def patch_workflow(workflow_id, patch_workflow)
api_client.invoke_patch(build_path(WORKFLOWS, workflow_id), sdk_authorization, patch_workflow)
end
|
#reflow(reflow) ⇒ Object
124
125
126
|
# File 'lib/checkout_sdk/workflows/workflows_client.rb', line 124
def reflow(reflow)
api_client.invoke_post(build_path(WORKFLOWS, EVENTS, REFLOW), sdk_authorization, reflow)
end
|
#reflow_by_event(event_id) ⇒ Object
112
113
114
|
# File 'lib/checkout_sdk/workflows/workflows_client.rb', line 112
def reflow_by_event(event_id)
api_client.invoke_post(build_path(WORKFLOWS, EVENTS, event_id, REFLOW), sdk_authorization)
end
|
#reflow_by_event_and_workflow(event_id, workflow_id) ⇒ Object
118
119
120
121
|
# File 'lib/checkout_sdk/workflows/workflows_client.rb', line 118
def reflow_by_event_and_workflow(event_id, workflow_id)
api_client.invoke_post(build_path(WORKFLOWS, EVENTS, event_id, WORKFLOW, workflow_id, REFLOW),
sdk_authorization)
end
|
#reflow_by_subject(subject_id) ⇒ Object
134
135
136
|
# File 'lib/checkout_sdk/workflows/workflows_client.rb', line 134
def reflow_by_subject(subject_id)
api_client.invoke_post(build_path(WORKFLOWS, EVENTS, SUBJECT, subject_id, REFLOW), sdk_authorization)
end
|
#reflow_by_subject_and_workflow(subject_id, workflow_id) ⇒ Object
140
141
142
143
|
# File 'lib/checkout_sdk/workflows/workflows_client.rb', line 140
def reflow_by_subject_and_workflow(subject_id, workflow_id)
api_client.invoke_post(build_path(WORKFLOWS, EVENTS, SUBJECT, subject_id, WORKFLOW, workflow_id, REFLOW),
sdk_authorization)
end
|
#remove_workflow(workflow_id) ⇒ Object
40
41
42
|
# File 'lib/checkout_sdk/workflows/workflows_client.rb', line 40
def remove_workflow(workflow_id)
api_client.invoke_delete(build_path(WORKFLOWS, workflow_id), sdk_authorization)
end
|
#remove_workflow_action(workflow_id, action_id) ⇒ Object
66
67
68
|
# File 'lib/checkout_sdk/workflows/workflows_client.rb', line 66
def remove_workflow_action(workflow_id, action_id)
api_client.invoke_delete(build_path(WORKFLOWS, workflow_id, ACTIONS, action_id), sdk_authorization)
end
|
#remove_workflow_condition(workflow_id, condition_id) ⇒ Object
86
87
88
|
# File 'lib/checkout_sdk/workflows/workflows_client.rb', line 86
def remove_workflow_condition(workflow_id, condition_id)
api_client.invoke_delete(build_path(WORKFLOWS, workflow_id, CONDITIONS, condition_id), sdk_authorization)
end
|
#retrieve_action_invocations(event_id, action_id) ⇒ Object
107
108
109
|
# File 'lib/checkout_sdk/workflows/workflows_client.rb', line 107
def retrieve_action_invocations(event_id, action_id)
api_client.invoke_get(build_path(WORKFLOWS, EVENTS, event_id, ACTIONS, action_id), sdk_authorization)
end
|
#retrieve_event(event_id) ⇒ Object
101
102
103
|
# File 'lib/checkout_sdk/workflows/workflows_client.rb', line 101
def retrieve_event(event_id)
api_client.invoke_get(build_path(WORKFLOWS, EVENTS, event_id), sdk_authorization)
end
|
#retrieve_event_types ⇒ Object
96
97
98
|
# File 'lib/checkout_sdk/workflows/workflows_client.rb', line 96
def retrieve_event_types
api_client.invoke_get(build_path(WORKFLOWS, EVENT_TYPES), sdk_authorization)
end
|
#retrieve_subject_events(subject_id) ⇒ Object
129
130
131
|
# File 'lib/checkout_sdk/workflows/workflows_client.rb', line 129
def retrieve_subject_events(subject_id)
api_client.invoke_get(build_path(WORKFLOWS, EVENTS, SUBJECT, subject_id), sdk_authorization)
end
|
#retrieve_workflow(workflow_id) ⇒ Object
35
36
37
|
# File 'lib/checkout_sdk/workflows/workflows_client.rb', line 35
def retrieve_workflow(workflow_id)
api_client.invoke_get(build_path(WORKFLOWS, workflow_id), sdk_authorization)
end
|
#retrieve_workflows ⇒ Object
25
26
27
|
# File 'lib/checkout_sdk/workflows/workflows_client.rb', line 25
def retrieve_workflows
api_client.invoke_get(WORKFLOWS, sdk_authorization)
end
|
#test_workflow(workflow_id, event_types_request) ⇒ Object
92
93
94
|
# File 'lib/checkout_sdk/workflows/workflows_client.rb', line 92
def test_workflow(workflow_id, event_types_request)
api_client.invoke_post(build_path(WORKFLOWS, workflow_id, TEST), sdk_authorization, event_types_request)
end
|
#update_workflow_action(workflow_id, action_id, workflow_action) ⇒ Object
59
60
61
62
|
# File 'lib/checkout_sdk/workflows/workflows_client.rb', line 59
def update_workflow_action(workflow_id, action_id, workflow_action)
api_client.invoke_put(build_path(WORKFLOWS, workflow_id, ACTIONS, action_id), sdk_authorization,
workflow_action)
end
|
#update_workflow_condition(workflow_id, condition_id, workflow_condition) ⇒ Object
79
80
81
82
|
# File 'lib/checkout_sdk/workflows/workflows_client.rb', line 79
def update_workflow_condition(workflow_id, condition_id, workflow_condition)
api_client.invoke_put(build_path(WORKFLOWS, workflow_id, CONDITIONS, condition_id), sdk_authorization,
workflow_condition)
end
|