Class: SamplifyAPIClient::LineItemsApi
- Inherits:
-
Object
- Object
- SamplifyAPIClient::LineItemsApi
- Defined in:
- lib/samplify_api_client/api/line_items_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#initialize(api_client = ApiClient.default) ⇒ LineItemsApi
constructor
A new instance of LineItemsApi.
-
#line_items_close(ext_line_item_id, ext_project_id, opts = {}) ⇒ CreateLineItem
close lineItems.
-
#line_items_close_with_http_info(ext_line_item_id, ext_project_id, opts = {}) ⇒ Array<(CreateLineItem, Fixnum, Hash)>
close lineItems.
-
#line_items_create(ext_project_id, payload, opts = {}) ⇒ CreateLineItem
create lineItems.
-
#line_items_create_with_http_info(ext_project_id, payload, opts = {}) ⇒ Array<(CreateLineItem, Fixnum, Hash)>
create lineItems.
-
#line_items_get(ext_line_item_id, ext_project_id, opts = {}) ⇒ CreateLineItem
get lineItems.
-
#line_items_get_with_http_info(ext_line_item_id, ext_project_id, opts = {}) ⇒ Array<(CreateLineItem, Fixnum, Hash)>
get lineItems.
-
#line_items_launch(ext_line_item_id, ext_project_id, opts = {}) ⇒ CreateLineItem
launch lineItems.
-
#line_items_launch_with_http_info(ext_line_item_id, ext_project_id, opts = {}) ⇒ Array<(CreateLineItem, Fixnum, Hash)>
launch lineItems.
-
#line_items_list_line_items(ext_project_id, opts = {}) ⇒ LineItems
listLineItems lineItems.
-
#line_items_list_line_items_with_http_info(ext_project_id, opts = {}) ⇒ Array<(LineItems, Fixnum, Hash)>
listLineItems lineItems.
-
#line_items_pause(ext_line_item_id, ext_project_id, opts = {}) ⇒ CreateLineItem
pause lineItems.
-
#line_items_pause_with_http_info(ext_line_item_id, ext_project_id, opts = {}) ⇒ Array<(CreateLineItem, Fixnum, Hash)>
pause lineItems.
-
#line_items_update(ext_line_item_id, ext_project_id, payload, opts = {}) ⇒ CreateLineItem
update lineItems.
-
#line_items_update_with_http_info(ext_line_item_id, ext_project_id, payload, opts = {}) ⇒ Array<(CreateLineItem, Fixnum, Hash)>
update lineItems.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ LineItemsApi
Returns a new instance of LineItemsApi.
19 20 21 |
# File 'lib/samplify_api_client/api/line_items_api.rb', line 19 def initialize(api_client = ApiClient.default) @api_client = api_client end |
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
17 18 19 |
# File 'lib/samplify_api_client/api/line_items_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#line_items_close(ext_line_item_id, ext_project_id, opts = {}) ⇒ CreateLineItem
close lineItems
27 28 29 30 |
# File 'lib/samplify_api_client/api/line_items_api.rb', line 27 def line_items_close(ext_line_item_id, ext_project_id, opts = {}) data, _status_code, _headers = line_items_close_with_http_info(ext_line_item_id, ext_project_id, opts) data end |
#line_items_close_with_http_info(ext_line_item_id, ext_project_id, opts = {}) ⇒ Array<(CreateLineItem, Fixnum, Hash)>
close lineItems
37 38 39 40 41 42 43 44 45 46 47 48 49 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 |
# File 'lib/samplify_api_client/api/line_items_api.rb', line 37 def line_items_close_with_http_info(ext_line_item_id, ext_project_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: LineItemsApi.line_items_close ...' end # verify the required parameter 'ext_line_item_id' is set if @api_client.config.client_side_validation && ext_line_item_id.nil? fail ArgumentError, "Missing the required parameter 'ext_line_item_id' when calling LineItemsApi.line_items_close" end # verify the required parameter 'ext_project_id' is set if @api_client.config.client_side_validation && ext_project_id.nil? fail ArgumentError, "Missing the required parameter 'ext_project_id' when calling LineItemsApi.line_items_close" end # resource path local_var_path = '/sample/v1/projects/{extProjectId}/lineItems/{extLineItemId}/close'.sub('{' + 'extLineItemId' + '}', ext_line_item_id.to_s).sub('{' + 'extProjectId' + '}', ext_project_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/vnd.createlineitem+json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'application/xml', 'application/gob', 'application/x-gob']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['jwt'] 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 => 'CreateLineItem') if @api_client.config.debugging @api_client.config.logger.debug "API called: LineItemsApi#line_items_close\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#line_items_create(ext_project_id, payload, opts = {}) ⇒ CreateLineItem
create lineItems
85 86 87 88 |
# File 'lib/samplify_api_client/api/line_items_api.rb', line 85 def line_items_create(ext_project_id, payload, opts = {}) data, _status_code, _headers = line_items_create_with_http_info(ext_project_id, payload, opts) data end |
#line_items_create_with_http_info(ext_project_id, payload, opts = {}) ⇒ Array<(CreateLineItem, Fixnum, Hash)>
create lineItems
95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 |
# File 'lib/samplify_api_client/api/line_items_api.rb', line 95 def line_items_create_with_http_info(ext_project_id, payload, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: LineItemsApi.line_items_create ...' end # verify the required parameter 'ext_project_id' is set if @api_client.config.client_side_validation && ext_project_id.nil? fail ArgumentError, "Missing the required parameter 'ext_project_id' when calling LineItemsApi.line_items_create" end # verify the required parameter 'payload' is set if @api_client.config.client_side_validation && payload.nil? fail ArgumentError, "Missing the required parameter 'payload' when calling LineItemsApi.line_items_create" end # resource path local_var_path = '/sample/v1/projects/{extProjectId}/lineItems'.sub('{' + 'extProjectId' + '}', ext_project_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/vnd.createlineitem+json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'application/xml', 'application/gob', 'application/x-gob']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(payload) auth_names = ['jwt'] 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 => 'CreateLineItem') if @api_client.config.debugging @api_client.config.logger.debug "API called: LineItemsApi#line_items_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#line_items_get(ext_line_item_id, ext_project_id, opts = {}) ⇒ CreateLineItem
get lineItems
143 144 145 146 |
# File 'lib/samplify_api_client/api/line_items_api.rb', line 143 def line_items_get(ext_line_item_id, ext_project_id, opts = {}) data, _status_code, _headers = line_items_get_with_http_info(ext_line_item_id, ext_project_id, opts) data end |
#line_items_get_with_http_info(ext_line_item_id, ext_project_id, opts = {}) ⇒ Array<(CreateLineItem, Fixnum, Hash)>
get lineItems
153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 |
# File 'lib/samplify_api_client/api/line_items_api.rb', line 153 def line_items_get_with_http_info(ext_line_item_id, ext_project_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: LineItemsApi.line_items_get ...' end # verify the required parameter 'ext_line_item_id' is set if @api_client.config.client_side_validation && ext_line_item_id.nil? fail ArgumentError, "Missing the required parameter 'ext_line_item_id' when calling LineItemsApi.line_items_get" end # verify the required parameter 'ext_project_id' is set if @api_client.config.client_side_validation && ext_project_id.nil? fail ArgumentError, "Missing the required parameter 'ext_project_id' when calling LineItemsApi.line_items_get" end # resource path local_var_path = '/sample/v1/projects/{extProjectId}/lineItems/{extLineItemId}'.sub('{' + 'extLineItemId' + '}', ext_line_item_id.to_s).sub('{' + 'extProjectId' + '}', ext_project_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/vnd.createlineitem+json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'application/xml', 'application/gob', 'application/x-gob']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['jwt'] 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 => 'CreateLineItem') if @api_client.config.debugging @api_client.config.logger.debug "API called: LineItemsApi#line_items_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#line_items_launch(ext_line_item_id, ext_project_id, opts = {}) ⇒ CreateLineItem
launch lineItems
201 202 203 204 |
# File 'lib/samplify_api_client/api/line_items_api.rb', line 201 def line_items_launch(ext_line_item_id, ext_project_id, opts = {}) data, _status_code, _headers = line_items_launch_with_http_info(ext_line_item_id, ext_project_id, opts) data end |
#line_items_launch_with_http_info(ext_line_item_id, ext_project_id, opts = {}) ⇒ Array<(CreateLineItem, Fixnum, Hash)>
launch lineItems
211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 |
# File 'lib/samplify_api_client/api/line_items_api.rb', line 211 def line_items_launch_with_http_info(ext_line_item_id, ext_project_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: LineItemsApi.line_items_launch ...' end # verify the required parameter 'ext_line_item_id' is set if @api_client.config.client_side_validation && ext_line_item_id.nil? fail ArgumentError, "Missing the required parameter 'ext_line_item_id' when calling LineItemsApi.line_items_launch" end # verify the required parameter 'ext_project_id' is set if @api_client.config.client_side_validation && ext_project_id.nil? fail ArgumentError, "Missing the required parameter 'ext_project_id' when calling LineItemsApi.line_items_launch" end # resource path local_var_path = '/sample/v1/projects/{extProjectId}/lineItems/{extLineItemId}/launch'.sub('{' + 'extLineItemId' + '}', ext_line_item_id.to_s).sub('{' + 'extProjectId' + '}', ext_project_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/vnd.createlineitem+json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'application/xml', 'application/gob', 'application/x-gob']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['jwt'] 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 => 'CreateLineItem') if @api_client.config.debugging @api_client.config.logger.debug "API called: LineItemsApi#line_items_launch\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#line_items_list_line_items(ext_project_id, opts = {}) ⇒ LineItems
listLineItems lineItems
267 268 269 270 |
# File 'lib/samplify_api_client/api/line_items_api.rb', line 267 def line_items_list_line_items(ext_project_id, opts = {}) data, _status_code, _headers = line_items_list_line_items_with_http_info(ext_project_id, opts) data end |
#line_items_list_line_items_with_http_info(ext_project_id, opts = {}) ⇒ Array<(LineItems, Fixnum, Hash)>
listLineItems lineItems
285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 |
# File 'lib/samplify_api_client/api/line_items_api.rb', line 285 def line_items_list_line_items_with_http_info(ext_project_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: LineItemsApi.line_items_list_line_items ...' end # verify the required parameter 'ext_project_id' is set if @api_client.config.client_side_validation && ext_project_id.nil? fail ArgumentError, "Missing the required parameter 'ext_project_id' when calling LineItemsApi.line_items_list_line_items" end if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 100 fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling LineItemsApi.line_items_list_line_items, must be smaller than or equal to 100.' end if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1 fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling LineItemsApi.line_items_list_line_items, must be greater than or equal to 1.' end if @api_client.config.client_side_validation && !opts[:'offset'].nil? && opts[:'offset'] < 0 fail ArgumentError, 'invalid value for "opts[:"offset"]" when calling LineItemsApi.line_items_list_line_items, must be greater than or equal to 0.' end # resource path local_var_path = '/sample/v1/projects/{extProjectId}/lineItems'.sub('{' + 'extProjectId' + '}', ext_project_id.to_s) # query parameters query_params = {} query_params[:'countryISOCode'] = opts[:'country_iso_code'] if !opts[:'country_iso_code'].nil? query_params[:'extLineItemId'] = opts[:'ext_line_item_id'] if !opts[:'ext_line_item_id'].nil? query_params[:'languageISOCode'] = opts[:'language_iso_code'] if !opts[:'language_iso_code'].nil? query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil? query_params[:'sort'] = @api_client.build_collection_param(opts[:'sort'], :multi) if !opts[:'sort'].nil? query_params[:'state'] = opts[:'state'] if !opts[:'state'].nil? query_params[:'stateReason'] = opts[:'state_reason'] if !opts[:'state_reason'].nil? query_params[:'title'] = opts[:'title'] if !opts[:'title'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/vnd.lineitems+json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'application/xml', 'application/gob', 'application/x-gob']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['jwt'] 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 => 'LineItems') if @api_client.config.debugging @api_client.config.logger.debug "API called: LineItemsApi#line_items_list_line_items\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#line_items_pause(ext_line_item_id, ext_project_id, opts = {}) ⇒ CreateLineItem
pause lineItems
350 351 352 353 |
# File 'lib/samplify_api_client/api/line_items_api.rb', line 350 def line_items_pause(ext_line_item_id, ext_project_id, opts = {}) data, _status_code, _headers = line_items_pause_with_http_info(ext_line_item_id, ext_project_id, opts) data end |
#line_items_pause_with_http_info(ext_line_item_id, ext_project_id, opts = {}) ⇒ Array<(CreateLineItem, Fixnum, Hash)>
pause lineItems
360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 |
# File 'lib/samplify_api_client/api/line_items_api.rb', line 360 def line_items_pause_with_http_info(ext_line_item_id, ext_project_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: LineItemsApi.line_items_pause ...' end # verify the required parameter 'ext_line_item_id' is set if @api_client.config.client_side_validation && ext_line_item_id.nil? fail ArgumentError, "Missing the required parameter 'ext_line_item_id' when calling LineItemsApi.line_items_pause" end # verify the required parameter 'ext_project_id' is set if @api_client.config.client_side_validation && ext_project_id.nil? fail ArgumentError, "Missing the required parameter 'ext_project_id' when calling LineItemsApi.line_items_pause" end # resource path local_var_path = '/sample/v1/projects/{extProjectId}/lineItems/{extLineItemId}/pause'.sub('{' + 'extLineItemId' + '}', ext_line_item_id.to_s).sub('{' + 'extProjectId' + '}', ext_project_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/vnd.createlineitem+json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'application/xml', 'application/gob', 'application/x-gob']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['jwt'] 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 => 'CreateLineItem') if @api_client.config.debugging @api_client.config.logger.debug "API called: LineItemsApi#line_items_pause\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#line_items_update(ext_line_item_id, ext_project_id, payload, opts = {}) ⇒ CreateLineItem
update lineItems
409 410 411 412 |
# File 'lib/samplify_api_client/api/line_items_api.rb', line 409 def line_items_update(ext_line_item_id, ext_project_id, payload, opts = {}) data, _status_code, _headers = line_items_update_with_http_info(ext_line_item_id, ext_project_id, payload, opts) data end |
#line_items_update_with_http_info(ext_line_item_id, ext_project_id, payload, opts = {}) ⇒ Array<(CreateLineItem, Fixnum, Hash)>
update lineItems
420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 |
# File 'lib/samplify_api_client/api/line_items_api.rb', line 420 def line_items_update_with_http_info(ext_line_item_id, ext_project_id, payload, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: LineItemsApi.line_items_update ...' end # verify the required parameter 'ext_line_item_id' is set if @api_client.config.client_side_validation && ext_line_item_id.nil? fail ArgumentError, "Missing the required parameter 'ext_line_item_id' when calling LineItemsApi.line_items_update" end # verify the required parameter 'ext_project_id' is set if @api_client.config.client_side_validation && ext_project_id.nil? fail ArgumentError, "Missing the required parameter 'ext_project_id' when calling LineItemsApi.line_items_update" end # verify the required parameter 'payload' is set if @api_client.config.client_side_validation && payload.nil? fail ArgumentError, "Missing the required parameter 'payload' when calling LineItemsApi.line_items_update" end # resource path local_var_path = '/sample/v1/projects/{extProjectId}/lineItems/{extLineItemId}'.sub('{' + 'extLineItemId' + '}', ext_line_item_id.to_s).sub('{' + 'extProjectId' + '}', ext_project_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/vnd.createlineitem+json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'application/xml', 'application/gob', 'application/x-gob']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(payload) auth_names = ['jwt'] 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 => 'CreateLineItem') if @api_client.config.debugging @api_client.config.logger.debug "API called: LineItemsApi#line_items_update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |