Class: UltracartClient::IntegrationLogApi

Inherits:
Object
  • Object
show all
Defined in:
lib/ultracart_api/api/integration_log_api.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ IntegrationLogApi

Returns a new instance of IntegrationLogApi.



19
20
21
# File 'lib/ultracart_api/api/integration_log_api.rb', line 19

def initialize(api_client = ApiClient.default)
  @api_client = api_client
end

Instance Attribute Details

#api_clientObject

Returns the value of attribute api_client.



17
18
19
# File 'lib/ultracart_api/api/integration_log_api.rb', line 17

def api_client
  @api_client
end

Class Method Details

.new_using_api_key(simple_key, verify_ssl = true, debugging = false) ⇒ Object



23
24
25
26
27
28
29
30
31
32
33
# File 'lib/ultracart_api/api/integration_log_api.rb', line 23

def self.new_using_api_key(simple_key, verify_ssl = true, debugging = false)
  api_config = Configuration.new
  api_config.api_key_prefix['x-ultracart-simple-key'] = simple_key
  api_config.api_version = '2017-03-01'
  api_config.verify_ssl = verify_ssl

  api_client = ApiClient.new(api_config)
  api_client.config.debugging = debugging

  UltracartClient::IntegrationLogApi.new(api_client)
end

Instance Method Details

#get_integration_log(pk, sk, opts = {}) ⇒ IntegrationLogResponse

Retrieve an integration log Retrieve an integration logs from the account based identifiers

Parameters:

  • pk
  • sk
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



41
42
43
44
# File 'lib/ultracart_api/api/integration_log_api.rb', line 41

def get_integration_log(pk, sk, opts = {})
  data, _status_code, _headers = get_integration_log_with_http_info(pk, sk, opts)
  data
end

#get_integration_log_file(pk, sk, uuid, opts = {}) ⇒ File

Retrieve an integration log file Retrieve an integration log file from the account based identifiers

Parameters:

  • pk
  • sk
  • uuid
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (File)


103
104
105
106
# File 'lib/ultracart_api/api/integration_log_api.rb', line 103

def get_integration_log_file(pk, sk, uuid, opts = {})
  data, _status_code, _headers = get_integration_log_file_with_http_info(pk, sk, uuid, opts)
  data
end

#get_integration_log_file_with_http_info(pk, sk, uuid, opts = {}) ⇒ Array<(File, Fixnum, Hash)>

Retrieve an integration log file Retrieve an integration log file from the account based identifiers

Parameters:

  • pk
  • sk
  • uuid
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(File, Fixnum, Hash)>)

    File data, response status code and response headers



115
116
117
118
119
120
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/ultracart_api/api/integration_log_api.rb', line 115

def get_integration_log_file_with_http_info(pk, sk, uuid, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: IntegrationLogApi.get_integration_log_file ...'
  end
  # verify the required parameter 'pk' is set
  if @api_client.config.client_side_validation && pk.nil?
    fail ArgumentError, "Missing the required parameter 'pk' when calling IntegrationLogApi.get_integration_log_file"
  end
  # verify the required parameter 'sk' is set
  if @api_client.config.client_side_validation && sk.nil?
    fail ArgumentError, "Missing the required parameter 'sk' when calling IntegrationLogApi.get_integration_log_file"
  end
  # verify the required parameter 'uuid' is set
  if @api_client.config.client_side_validation && uuid.nil?
    fail ArgumentError, "Missing the required parameter 'uuid' when calling IntegrationLogApi.get_integration_log_file"
  end
  # resource path
  local_var_path = '/integration_log/query/{pk}/{sk}/{uuid}'.sub('{' + 'pk' + '}', pk.to_s).sub('{' + 'sk' + '}', sk.to_s).sub('{' + 'uuid' + '}', uuid.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['ultraCartOauth', 'ultraCartSimpleApiKey']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'File')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: IntegrationLogApi#get_integration_log_file\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_integration_log_summaries_query(integration_log_summaries_query, opts = {}) ⇒ IntegrationLogSummaryQueryResponse

Retrieve integration log summaries Retrieves a set of integration log summaries from the account based on a query object.

Parameters:

  • integration_log_summaries_query

    Integration log summaries query

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



168
169
170
171
# File 'lib/ultracart_api/api/integration_log_api.rb', line 168

def get_integration_log_summaries_query(integration_log_summaries_query, opts = {})
  data, _status_code, _headers = get_integration_log_summaries_query_with_http_info(integration_log_summaries_query, opts)
  data
end

#get_integration_log_summaries_query_with_http_info(integration_log_summaries_query, opts = {}) ⇒ Array<(IntegrationLogSummaryQueryResponse, Fixnum, Hash)>

Retrieve integration log summaries Retrieves a set of integration log summaries from the account based on a query object.

Parameters:

  • integration_log_summaries_query

    Integration log summaries query

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



178
179
180
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
# File 'lib/ultracart_api/api/integration_log_api.rb', line 178

def get_integration_log_summaries_query_with_http_info(integration_log_summaries_query, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: IntegrationLogApi.get_integration_log_summaries_query ...'
  end
  # verify the required parameter 'integration_log_summaries_query' is set
  if @api_client.config.client_side_validation && integration_log_summaries_query.nil?
    fail ArgumentError, "Missing the required parameter 'integration_log_summaries_query' when calling IntegrationLogApi.get_integration_log_summaries_query"
  end
  # resource path
  local_var_path = '/integration_log/summary/query'

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(integration_log_summaries_query)
  auth_names = ['ultraCartOauth', 'ultraCartSimpleApiKey']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'IntegrationLogSummaryQueryResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: IntegrationLogApi#get_integration_log_summaries_query\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_integration_log_with_http_info(pk, sk, opts = {}) ⇒ Array<(IntegrationLogResponse, Fixnum, Hash)>

Retrieve an integration log Retrieve an integration logs from the account based identifiers

Parameters:

  • pk
  • sk
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(IntegrationLogResponse, Fixnum, Hash)>)

    IntegrationLogResponse data, response status code and response headers



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
# File 'lib/ultracart_api/api/integration_log_api.rb', line 52

def get_integration_log_with_http_info(pk, sk, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: IntegrationLogApi.get_integration_log ...'
  end
  # verify the required parameter 'pk' is set
  if @api_client.config.client_side_validation && pk.nil?
    fail ArgumentError, "Missing the required parameter 'pk' when calling IntegrationLogApi.get_integration_log"
  end
  # verify the required parameter 'sk' is set
  if @api_client.config.client_side_validation && sk.nil?
    fail ArgumentError, "Missing the required parameter 'sk' when calling IntegrationLogApi.get_integration_log"
  end
  # resource path
  local_var_path = '/integration_log/query/{pk}/{sk}'.sub('{' + 'pk' + '}', pk.to_s).sub('{' + 'sk' + '}', sk.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['ultraCartOauth', 'ultraCartSimpleApiKey']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'IntegrationLogResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: IntegrationLogApi#get_integration_log\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_integration_logs_query(integration_log_query, opts = {}) ⇒ IntegrationLogQueryResponse

Retrieve integration logs Retrieves a set of integration logs from the account based on a query object.

Parameters:

  • integration_log_query

    Integration log query

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :_limit (Integer)

    The maximum number of records to return on this one API call. (Default 100, Max 500) (default to 100)

  • :_offset (Integer)

    Pagination of the record set. Offset is a zero based index. (default to 0)

  • :_sort (String)

    The sort order of the items. See Sorting documentation for examples of using multiple values and sorting by ascending and descending.

Returns:



226
227
228
229
# File 'lib/ultracart_api/api/integration_log_api.rb', line 226

def get_integration_logs_query(integration_log_query, opts = {})
  data, _status_code, _headers = get_integration_logs_query_with_http_info(integration_log_query, opts)
  data
end

#get_integration_logs_query_with_http_info(integration_log_query, opts = {}) ⇒ Array<(IntegrationLogQueryResponse, Fixnum, Hash)>

Retrieve integration logs Retrieves a set of integration logs from the account based on a query object.

Parameters:

  • integration_log_query

    Integration log query

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :_limit (Integer)

    The maximum number of records to return on this one API call. (Default 100, Max 500)

  • :_offset (Integer)

    Pagination of the record set. Offset is a zero based index.

  • :_sort (String)

    The sort order of the items. See Sorting documentation for examples of using multiple values and sorting by ascending and descending.

Returns:



239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
# File 'lib/ultracart_api/api/integration_log_api.rb', line 239

def get_integration_logs_query_with_http_info(integration_log_query, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: IntegrationLogApi.get_integration_logs_query ...'
  end
  # verify the required parameter 'integration_log_query' is set
  if @api_client.config.client_side_validation && integration_log_query.nil?
    fail ArgumentError, "Missing the required parameter 'integration_log_query' when calling IntegrationLogApi.get_integration_logs_query"
  end
  # resource path
  local_var_path = '/integration_log/query'

  # query parameters
  query_params = {}
  query_params[:'_limit'] = opts[:'_limit'] if !opts[:'_limit'].nil?
  query_params[:'_offset'] = opts[:'_offset'] if !opts[:'_offset'].nil?
  query_params[:'_sort'] = opts[:'_sort'] if !opts[:'_sort'].nil?

  # header parameters
  header_params = {}
  header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(integration_log_query)
  auth_names = ['ultraCartOauth', 'ultraCartSimpleApiKey']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'IntegrationLogQueryResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: IntegrationLogApi#get_integration_logs_query\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end