Class: PureCloud::ArchitectApi
- Inherits:
-
Object
- Object
- PureCloud::ArchitectApi
- Defined in:
- lib/purecloud/api/architect_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#delete_flows(id, opts = {}) ⇒ nil
Batch-delete a list of flows Multiple IDs can be specified, in which case all specified flows will be deleted.
-
#delete_flows_with_http_info(id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Batch-delete a list of flows Multiple IDs can be specified, in which case all specified flows will be deleted.
-
#get_flows(opts = {}) ⇒ FlowEntityListing
Get a pageable list of flows, filtered by query parameters Multiple IDs can be specified, in which case all matching flows will be returned, and no other parameters will be evaluated.
-
#get_flows_with_http_info(opts = {}) ⇒ Array<(FlowEntityListing, Fixnum, Hash)>
Get a pageable list of flows, filtered by query parameters Multiple IDs can be specified, in which case all matching flows will be returned, and no other parameters will be evaluated.
-
#initialize(api_client = ApiClient.default) ⇒ ArchitectApi
constructor
A new instance of ArchitectApi.
-
#post_flows(opts = {}) ⇒ Flow
Create flow.
-
#post_flows_with_http_info(opts = {}) ⇒ Array<(Flow, Fixnum, Hash)>
Create flow.
Constructor Details
permalink #initialize(api_client = ApiClient.default) ⇒ ArchitectApi
Returns a new instance of ArchitectApi.
7 8 9 |
# File 'lib/purecloud/api/architect_api.rb', line 7 def initialize(api_client = ApiClient.default) @api_client = api_client end |
Instance Attribute Details
permalink #api_client ⇒ Object
Returns the value of attribute api_client.
5 6 7 |
# File 'lib/purecloud/api/architect_api.rb', line 5 def api_client @api_client end |
Instance Method Details
permalink #delete_flows(id, opts = {}) ⇒ nil
Batch-delete a list of flows Multiple IDs can be specified, in which case all specified flows will be deleted.
170 171 172 173 |
# File 'lib/purecloud/api/architect_api.rb', line 170 def delete_flows(id, opts = {}) delete_flows_with_http_info(id, opts) return nil end |
permalink #delete_flows_with_http_info(id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Batch-delete a list of flows Multiple IDs can be specified, in which case all specified flows will be deleted.
181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 |
# File 'lib/purecloud/api/architect_api.rb', line 181 def delete_flows_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ArchitectApi#delete_flows ..." end # verify the required parameter 'id' is set fail "Missing the required parameter 'id' when calling delete_flows" if id.nil? # resource path path = "/api/v1/flows".sub('{format}','json') # query parameters query_params = {} query_params[:'id'] = @api_client.build_collection_param(id, :multi) query_params[:'ignoreDependencies'] = opts[:'ignore_dependencies'] if opts[:'ignore_dependencies'] # header parameters header_params = {} # HTTP header 'Accept' (if needed) _header_accept = ['application/json'] _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result # HTTP header 'Content-Type' _header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud Auth'] data, status_code, headers = @api_client.call_api(:DELETE, path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names) if @api_client.config.debugging @api_client.config.logger.debug "API called: ArchitectApi#delete_flows\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
permalink #get_flows(opts = {}) ⇒ FlowEntityListing
Get a pageable list of flows, filtered by query parameters Multiple IDs can be specified, in which case all matching flows will be returned, and no other parameters will be evaluated.
28 29 30 31 |
# File 'lib/purecloud/api/architect_api.rb', line 28 def get_flows(opts = {}) data, status_code, headers = get_flows_with_http_info(opts) return data end |
permalink #get_flows_with_http_info(opts = {}) ⇒ Array<(FlowEntityListing, Fixnum, Hash)>
Get a pageable list of flows, filtered by query parameters Multiple IDs can be specified, in which case all matching flows will be returned, and no other parameters will be evaluated.
50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 |
# File 'lib/purecloud/api/architect_api.rb', line 50 def get_flows_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ArchitectApi#get_flows ..." end # resource path path = "/api/v1/flows".sub('{format}','json') # query parameters query_params = {} query_params[:'type'] = opts[:'type'] if opts[:'type'] query_params[:'pageNumber'] = opts[:'page_number'] if opts[:'page_number'] query_params[:'pageSize'] = opts[:'page_size'] if opts[:'page_size'] query_params[:'sortBy'] = opts[:'sort_by'] if opts[:'sort_by'] query_params[:'sortOrder'] = opts[:'sort_order'] if opts[:'sort_order'] query_params[:'id'] = @api_client.build_collection_param(opts[:'id'], :multi) if opts[:'id'] query_params[:'name'] = opts[:'name'] if opts[:'name'] query_params[:'description'] = opts[:'description'] if opts[:'description'] query_params[:'nameOrDescription'] = opts[:'name_or_description'] if opts[:'name_or_description'] query_params[:'publishVersionId'] = opts[:'publish_version_id'] if opts[:'publish_version_id'] query_params[:'editableBy'] = opts[:'editable_by'] if opts[:'editable_by'] query_params[:'lockedBy'] = opts[:'locked_by'] if opts[:'locked_by'] query_params[:'deleted'] = opts[:'deleted'] if opts[:'deleted'] # header parameters header_params = {} # HTTP header 'Accept' (if needed) _header_accept = ['application/json'] _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result # HTTP header 'Content-Type' _header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud Auth'] data, status_code, headers = @api_client.call_api(:GET, path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'FlowEntityListing') if @api_client.config.debugging @api_client.config.logger.debug "API called: ArchitectApi#get_flows\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
permalink #post_flows(opts = {}) ⇒ Flow
Create flow
111 112 113 114 |
# File 'lib/purecloud/api/architect_api.rb', line 111 def post_flows(opts = {}) data, status_code, headers = post_flows_with_http_info(opts) return data end |
permalink #post_flows_with_http_info(opts = {}) ⇒ Array<(Flow, Fixnum, Hash)>
Create flow
121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 |
# File 'lib/purecloud/api/architect_api.rb', line 121 def post_flows_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ArchitectApi#post_flows ..." end # resource path path = "/api/v1/flows".sub('{format}','json') # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) _header_accept = ['application/json'] _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result # HTTP header 'Content-Type' _header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(opts[:'body']) auth_names = ['PureCloud Auth'] data, status_code, headers = @api_client.call_api(:POST, path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'Flow') if @api_client.config.debugging @api_client.config.logger.debug "API called: ArchitectApi#post_flows\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |