Class: BillForward::AmendmentsApi

Inherits:
Object
  • Object
show all
Defined in:
lib/bf_ruby2/api/amendments_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ AmendmentsApi

Returns a new instance of AmendmentsApi.



30
31
32
# File 'lib/bf_ruby2/api/amendments_api.rb', line 30

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

Instance Attribute Details

#api_clientObject

Returns the value of attribute api_client.



28
29
30
# File 'lib/bf_ruby2/api/amendments_api.rb', line 28

def api_client
  @api_client
end

Instance Method Details

#create_amendment(amendment, opts = {}) ⇒ AmendmentPagedMetadata

Create an amendment. {"nickname":"Create a new amendment","request":"createAmendmentRequest.html","response":"createAmendmentResponse.html" }

Parameters:

  • amendment

    The amendment object to be created.

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

    the optional parameters

Returns:



39
40
41
42
# File 'lib/bf_ruby2/api/amendments_api.rb', line 39

def create_amendment(amendment, opts = {})
  data, _status_code, _headers = create_amendment_with_http_info(amendment, opts)
  return data
end

#create_amendment_with_http_info(amendment, opts = {}) ⇒ Array<(AmendmentPagedMetadata, Fixnum, Hash)>

Create an amendment. {&quot;nickname&quot;:&quot;Create a new amendment&quot;,&quot;request&quot;:&quot;createAmendmentRequest.html&quot;,&quot;response&quot;:&quot;createAmendmentResponse.html&quot; }

Parameters:

  • amendment

    The amendment object to be created.

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

    the optional parameters

Returns:

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

    AmendmentPagedMetadata data, response status code and response headers



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
80
81
82
83
84
85
86
87
88
89
# File 'lib/bf_ruby2/api/amendments_api.rb', line 49

def create_amendment_with_http_info(amendment, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: AmendmentsApi.create_amendment ..."
  end
  # verify the required parameter 'amendment' is set
  fail ArgumentError, "Missing the required parameter 'amendment' when calling AmendmentsApi.create_amendment" if amendment.nil?
  # resource path
  local_var_path = "/amendments".sub('{format}','json')

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  local_header_accept = ['text/xml', 'application/xml', 'application/json; charset=utf-8']
  local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result

  # HTTP header 'Content-Type'
  local_header_content_type = ['application/json; charset=utf-8']
  header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(amendment)
  auth_names = []
  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 => 'AmendmentPagedMetadata')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AmendmentsApi#create_amendment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_all_amendments(opts = {}) ⇒ AmendmentPagedMetadata

Returns a collection of all amendments. By default 10 values are returned. Records are returned in natural order. all amendments","response":"getAmendmentAll.html"

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :organizations (Array<String>)

    A list of organization-IDs used to restrict the scope of API calls.

  • :offset (Integer)

    The offset from the first amendment to return. (default to 0)

  • :records (Integer)

    The maximum number of amendments to return. (default to 10)

  • :order_by (String)

    Specify a field used to order the result set. (default to created)

  • :order (String)

    Ihe direction of any ordering, either ASC or DESC. (default to DESC)

  • :invoice_id (String)

    Ihe invoice ID associated with the amendment.

  • :state (String)

    Ihe state of the amendment.

  • :type (String)

    Ihe type of amendment.

Returns:



103
104
105
106
# File 'lib/bf_ruby2/api/amendments_api.rb', line 103

def get_all_amendments(opts = {})
  data, _status_code, _headers = get_all_amendments_with_http_info(opts)
  return data
end

#get_all_amendments_with_http_info(opts = {}) ⇒ Array<(AmendmentPagedMetadata, Fixnum, Hash)>

Returns a collection of all amendments. By default 10 values are returned. Records are returned in natural order. all amendments&quot;,&quot;response&quot;:&quot;getAmendmentAll.html&quot;

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :organizations (Array<String>)

    A list of organization-IDs used to restrict the scope of API calls.

  • :offset (Integer)

    The offset from the first amendment to return.

  • :records (Integer)

    The maximum number of amendments to return.

  • :order_by (String)

    Specify a field used to order the result set.

  • :order (String)

    Ihe direction of any ordering, either ASC or DESC.

  • :invoice_id (String)

    Ihe invoice ID associated with the amendment.

  • :state (String)

    Ihe state of the amendment.

  • :type (String)

    Ihe type of amendment.

Returns:

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

    AmendmentPagedMetadata data, response status code and response headers



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
163
164
165
166
167
168
169
170
171
172
173
174
175
# File 'lib/bf_ruby2/api/amendments_api.rb', line 120

def get_all_amendments_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: AmendmentsApi.get_all_amendments ..."
  end
  if opts[:'order'] && !['ASC', 'DESC'].include?(opts[:'order'])
    fail ArgumentError, 'invalid value for "order", must be one of ASC, DESC'
  end
  if opts[:'state'] && !['Pending', 'Succeeded', 'Failed', 'Discarded'].include?(opts[:'state'])
    fail ArgumentError, 'invalid value for "state", must be one of Pending, Succeeded, Failed, Discarded'
  end
  if opts[:'type'] && !['InvoiceNextExecutionAttempt', 'Cancellation', 'PricingComponentValue', 'AmendmentDiscard', 'Compound', 'FixedTermExpiry', 'InvoiceRecalculation', 'EndTrial', 'InvoiceOutstandingCharges', 'IssueInvoice', 'ProductRatePlanMigration', 'UpdateComponentValue', 'ServiceEnd', 'ResumeSubscription', 'CreateSubscriptionCharge', 'Timer'].include?(opts[:'type'])
    fail ArgumentError, 'invalid value for "type", must be one of InvoiceNextExecutionAttempt, Cancellation, PricingComponentValue, AmendmentDiscard, Compound, FixedTermExpiry, InvoiceRecalculation, EndTrial, InvoiceOutstandingCharges, IssueInvoice, ProductRatePlanMigration, UpdateComponentValue, ServiceEnd, ResumeSubscription, CreateSubscriptionCharge, Timer'
  end
  # resource path
  local_var_path = "/amendments".sub('{format}','json')

  # query parameters
  query_params = {}
  query_params[:'organizations'] = @api_client.build_collection_param(opts[:'organizations'], :multi) if !opts[:'organizations'].nil?
  query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
  query_params[:'records'] = opts[:'records'] if !opts[:'records'].nil?
  query_params[:'order_by'] = opts[:'order_by'] if !opts[:'order_by'].nil?
  query_params[:'order'] = opts[:'order'] if !opts[:'order'].nil?
  query_params[:'invoice_id'] = opts[:'invoice_id'] if !opts[:'invoice_id'].nil?
  query_params[:'state'] = opts[:'state'] if !opts[:'state'].nil?
  query_params[:'type'] = opts[:'type'] if !opts[:'type'].nil?

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  local_header_accept = ['application/json; charset=utf-8']
  local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result

  # HTTP header 'Content-Type'
  local_header_content_type = []
  header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = []
  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 => 'AmendmentPagedMetadata')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AmendmentsApi#get_all_amendments\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_amendment_by_id(amendment_id, opts = {}) ⇒ AmendmentPagedMetadata

Returns a single amendment, specified by the amendment-ID parameter. an existing amendment","response":"getAmendmentByID.html"

Parameters:

  • amendment_id

    The unique string-ID of the amendment.

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

    the optional parameters

Options Hash (opts):

  • :organizations (Array<String>)

    A list of organization-IDs used to restrict the scope of API calls.

Returns:



183
184
185
186
# File 'lib/bf_ruby2/api/amendments_api.rb', line 183

def get_amendment_by_id(amendment_id, opts = {})
  data, _status_code, _headers = get_amendment_by_id_with_http_info(amendment_id, opts)
  return data
end

#get_amendment_by_id_with_http_info(amendment_id, opts = {}) ⇒ Array<(AmendmentPagedMetadata, Fixnum, Hash)>

Returns a single amendment, specified by the amendment-ID parameter. an existing amendment&quot;,&quot;response&quot;:&quot;getAmendmentByID.html&quot;

Parameters:

  • amendment_id

    The unique string-ID of the amendment.

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

    the optional parameters

Options Hash (opts):

  • :organizations (Array<String>)

    A list of organization-IDs used to restrict the scope of API calls.

Returns:

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

    AmendmentPagedMetadata data, response status code and response headers



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
227
228
229
230
231
232
233
234
235
# File 'lib/bf_ruby2/api/amendments_api.rb', line 194

def get_amendment_by_id_with_http_info(amendment_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: AmendmentsApi.get_amendment_by_id ..."
  end
  # verify the required parameter 'amendment_id' is set
  fail ArgumentError, "Missing the required parameter 'amendment_id' when calling AmendmentsApi.get_amendment_by_id" if amendment_id.nil?
  # resource path
  local_var_path = "/amendments/{amendment-ID}".sub('{format}','json').sub('{' + 'amendment-ID' + '}', amendment_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'organizations'] = @api_client.build_collection_param(opts[:'organizations'], :multi) if !opts[:'organizations'].nil?

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  local_header_accept = ['application/json; charset=utf-8']
  local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result

  # HTTP header 'Content-Type'
  local_header_content_type = ['text/plain']
  header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = []
  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 => 'AmendmentPagedMetadata')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AmendmentsApi#get_amendment_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_amendment_by_state(state, opts = {}) ⇒ AmendmentPagedMetadata

Returns a collection of amendments, specified by the state parameter. By default 10 values are returned. Records are returned in natural order. by state","response":"getAmendmentsByState.html"

Parameters:

  • state

    The current state of the amendment, either pending, succeeded, failed or discarded

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

    the optional parameters

Options Hash (opts):

  • :organizations (Array<String>)

    A list of organization-IDs used to restrict the scope of API calls.

  • :offset (Integer)

    The offset from the first amendment to return. (default to 0)

  • :records (Integer)

    The maximum number of amendments to return. (default to 10)

  • :order_by (String)

    Specify a field used to order the result set. (default to id)

  • :order (String)

    Ihe direction of any ordering, either ASC or DESC. (default to DESC)

Returns:



247
248
249
250
# File 'lib/bf_ruby2/api/amendments_api.rb', line 247

def get_amendment_by_state(state, opts = {})
  data, _status_code, _headers = get_amendment_by_state_with_http_info(state, opts)
  return data
end

#get_amendment_by_state_with_http_info(state, opts = {}) ⇒ Array<(AmendmentPagedMetadata, Fixnum, Hash)>

Returns a collection of amendments, specified by the state parameter. By default 10 values are returned. Records are returned in natural order. by state&quot;,&quot;response&quot;:&quot;getAmendmentsByState.html&quot;

Parameters:

  • state

    The current state of the amendment, either pending, succeeded, failed or discarded

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

    the optional parameters

Options Hash (opts):

  • :organizations (Array<String>)

    A list of organization-IDs used to restrict the scope of API calls.

  • :offset (Integer)

    The offset from the first amendment to return.

  • :records (Integer)

    The maximum number of amendments to return.

  • :order_by (String)

    Specify a field used to order the result set.

  • :order (String)

    Ihe direction of any ordering, either ASC or DESC.

Returns:

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

    AmendmentPagedMetadata data, response status code and response headers



262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
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
# File 'lib/bf_ruby2/api/amendments_api.rb', line 262

def get_amendment_by_state_with_http_info(state, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: AmendmentsApi.get_amendment_by_state ..."
  end
  # verify the required parameter 'state' is set
  fail ArgumentError, "Missing the required parameter 'state' when calling AmendmentsApi.get_amendment_by_state" if state.nil?
  # verify enum value
  unless ['Pending', 'Succeeded', 'Failed', 'Discarded'].include?(state)
    fail ArgumentError, "invalid value for 'state', must be one of Pending, Succeeded, Failed, Discarded"
  end
  if opts[:'order'] && !['ASC', 'DESC'].include?(opts[:'order'])
    fail ArgumentError, 'invalid value for "order", must be one of ASC, DESC'
  end
  # resource path
  local_var_path = "/amendments/state/{state}".sub('{format}','json').sub('{' + 'state' + '}', state.to_s)

  # query parameters
  query_params = {}
  query_params[:'organizations'] = @api_client.build_collection_param(opts[:'organizations'], :multi) if !opts[:'organizations'].nil?
  query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
  query_params[:'records'] = opts[:'records'] if !opts[:'records'].nil?
  query_params[:'order_by'] = opts[:'order_by'] if !opts[:'order_by'].nil?
  query_params[:'order'] = opts[:'order'] if !opts[:'order'].nil?

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  local_header_accept = ['application/json; charset=utf-8']
  local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result

  # HTTP header 'Content-Type'
  local_header_content_type = []
  header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = []
  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 => 'AmendmentPagedMetadata')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AmendmentsApi#get_amendment_by_state\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_amendment_by_subscription_id(subscription_id, opts = {}) ⇒ AmendmentPagedMetadata

Returns a collection of amendments, specified by the subscription-ID parameter. By default 10 values are returned. Records are returned in natural order. by subscription","response":"getAmendmentsBySubscription.html"

Parameters:

  • subscription_id

    ID of the subscription

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

    the optional parameters

Options Hash (opts):

  • :organizations (Array<String>)

    A list of organization-IDs used to restrict the scope of API calls.

  • :offset (Integer)

    The offset from the first amendment to return. (default to 0)

  • :records (Integer)

    The maximum number of amendments to return. (default to 10)

  • :order_by (String)

    Specify a field used to order the result set. (default to id)

  • :order (String)

    The direction of any ordering, either ASC or DESC. (default to DESC)

Returns:



326
327
328
329
# File 'lib/bf_ruby2/api/amendments_api.rb', line 326

def get_amendment_by_subscription_id(subscription_id, opts = {})
  data, _status_code, _headers = get_amendment_by_subscription_id_with_http_info(subscription_id, opts)
  return data
end

#get_amendment_by_subscription_id_with_http_info(subscription_id, opts = {}) ⇒ Array<(AmendmentPagedMetadata, Fixnum, Hash)>

Returns a collection of amendments, specified by the subscription-ID parameter. By default 10 values are returned. Records are returned in natural order. by subscription&quot;,&quot;response&quot;:&quot;getAmendmentsBySubscription.html&quot;

Parameters:

  • subscription_id

    ID of the subscription

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

    the optional parameters

Options Hash (opts):

  • :organizations (Array<String>)

    A list of organization-IDs used to restrict the scope of API calls.

  • :offset (Integer)

    The offset from the first amendment to return.

  • :records (Integer)

    The maximum number of amendments to return.

  • :order_by (String)

    Specify a field used to order the result set.

  • :order (String)

    The direction of any ordering, either ASC or DESC.

Returns:

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

    AmendmentPagedMetadata data, response status code and response headers



341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
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
# File 'lib/bf_ruby2/api/amendments_api.rb', line 341

def get_amendment_by_subscription_id_with_http_info(subscription_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: AmendmentsApi.get_amendment_by_subscription_id ..."
  end
  # verify the required parameter 'subscription_id' is set
  fail ArgumentError, "Missing the required parameter 'subscription_id' when calling AmendmentsApi.get_amendment_by_subscription_id" if subscription_id.nil?
  if opts[:'order'] && !['ASC', 'DESC'].include?(opts[:'order'])
    fail ArgumentError, 'invalid value for "order", must be one of ASC, DESC'
  end
  # resource path
  local_var_path = "/amendments/subscription/{subscription-ID}".sub('{format}','json').sub('{' + 'subscription-ID' + '}', subscription_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'organizations'] = @api_client.build_collection_param(opts[:'organizations'], :multi) if !opts[:'organizations'].nil?
  query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
  query_params[:'records'] = opts[:'records'] if !opts[:'records'].nil?
  query_params[:'order_by'] = opts[:'order_by'] if !opts[:'order_by'].nil?
  query_params[:'order'] = opts[:'order'] if !opts[:'order'].nil?

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  local_header_accept = ['application/json; charset=utf-8']
  local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result

  # HTTP header 'Content-Type'
  local_header_content_type = ['text/plain']
  header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = []
  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 => 'AmendmentPagedMetadata')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AmendmentsApi#get_amendment_by_subscription_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_amendment_swagger(query_string, opts = {}) ⇒ SwaggerTypeList

"nickname":"","response":""

Parameters:

  • query_string

    The query string used to search.

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

    the optional parameters

Options Hash (opts):

  • :organizations (Array<String>)

    A list of organization-IDs used to restrict the scope of API calls.

  • :offset (Integer)

    The starting index of the search results. (default to 0)

  • :records (Integer)

    The number of search results to return. (default to 10)

  • :wildcard (BOOLEAN)

    Toggle if we search for full words or whether a wildcard is used. (default to false)

  • :entity (BOOLEAN)

    Is an entity returned with the search results. (default to false)

Returns:



401
402
403
404
# File 'lib/bf_ruby2/api/amendments_api.rb', line 401

def get_amendment_swagger(query_string, opts = {})
  data, _status_code, _headers = get_amendment_swagger_with_http_info(query_string, opts)
  return data
end

#get_amendment_swagger_with_http_info(query_string, opts = {}) ⇒ Array<(SwaggerTypeList, Fixnum, Hash)>

&quot;nickname&quot;:&quot;&quot;,&quot;response&quot;:&quot;&quot;

Parameters:

  • query_string

    The query string used to search.

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

    the optional parameters

Options Hash (opts):

  • :organizations (Array<String>)

    A list of organization-IDs used to restrict the scope of API calls.

  • :offset (Integer)

    The starting index of the search results.

  • :records (Integer)

    The number of search results to return.

  • :wildcard (BOOLEAN)

    Toggle if we search for full words or whether a wildcard is used.

  • :entity (BOOLEAN)

    Is an entity returned with the search results.

Returns:

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

    SwaggerTypeList data, response status code and response headers



416
417
418
419
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
# File 'lib/bf_ruby2/api/amendments_api.rb', line 416

def get_amendment_swagger_with_http_info(query_string, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: AmendmentsApi.get_amendment_swagger ..."
  end
  # verify the required parameter 'query_string' is set
  fail ArgumentError, "Missing the required parameter 'query_string' when calling AmendmentsApi.get_amendment_swagger" if query_string.nil?
  # resource path
  local_var_path = "/amendments/swagger-end-point/{query-string}".sub('{format}','json').sub('{' + 'query-string' + '}', query_string.to_s)

  # query parameters
  query_params = {}
  query_params[:'organizations'] = @api_client.build_collection_param(opts[:'organizations'], :multi) if !opts[:'organizations'].nil?
  query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
  query_params[:'records'] = opts[:'records'] if !opts[:'records'].nil?
  query_params[:'wildcard'] = opts[:'wildcard'] if !opts[:'wildcard'].nil?
  query_params[:'entity'] = opts[:'entity'] if !opts[:'entity'].nil?

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  local_header_accept = ['application/json; charset=utf-8']
  local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result

  # HTTP header 'Content-Type'
  local_header_content_type = ['text/plain']
  header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = []
  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 => 'SwaggerTypeList')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AmendmentsApi#get_amendment_swagger\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_amendments_by_actioning_time(lower_threshold, upper_threshold, opts = {}) ⇒ AmendmentPagedMetadata

Returns a collection of amendment objects with an actioning-time within the period specified by the lower-threshold and upper-threshold parameters. By default 10 values are returned. Records are returned in natural order. by actioning","response":"getAmendmentByActioningTime.html"

Parameters:

  • lower_threshold

    The UTC DateTime specifying the start of the result period.

  • upper_threshold

    The UTC DateTime specifying the end of the result period.

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

    the optional parameters

Options Hash (opts):

  • :organizations (Array<String>)

    A list of organization-IDs used to restrict the scope of API calls.

  • :offset (Integer)

    The offset from the first amendment to return. (default to 0)

  • :records (Integer)

    The maximum number of amendments to return. (default to 10)

  • :order_by (String)

    Specify a field used to order the result set. (default to created)

  • :order (String)

    Ihe direction of any ordering, either ASC or DESC. (default to DESC)

Returns:



474
475
476
477
# File 'lib/bf_ruby2/api/amendments_api.rb', line 474

def get_amendments_by_actioning_time(lower_threshold, upper_threshold, opts = {})
  data, _status_code, _headers = get_amendments_by_actioning_time_with_http_info(lower_threshold, upper_threshold, opts)
  return data
end

#get_amendments_by_actioning_time_with_http_info(lower_threshold, upper_threshold, opts = {}) ⇒ Array<(AmendmentPagedMetadata, Fixnum, Hash)>

Returns a collection of amendment objects with an actioning-time within the period specified by the lower-threshold and upper-threshold parameters. By default 10 values are returned. Records are returned in natural order. by actioning&quot;,&quot;response&quot;:&quot;getAmendmentByActioningTime.html&quot;

Parameters:

  • lower_threshold

    The UTC DateTime specifying the start of the result period.

  • upper_threshold

    The UTC DateTime specifying the end of the result period.

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

    the optional parameters

Options Hash (opts):

  • :organizations (Array<String>)

    A list of organization-IDs used to restrict the scope of API calls.

  • :offset (Integer)

    The offset from the first amendment to return.

  • :records (Integer)

    The maximum number of amendments to return.

  • :order_by (String)

    Specify a field used to order the result set.

  • :order (String)

    Ihe direction of any ordering, either ASC or DESC.

Returns:

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

    AmendmentPagedMetadata data, response status code and response headers



490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
# File 'lib/bf_ruby2/api/amendments_api.rb', line 490

def get_amendments_by_actioning_time_with_http_info(lower_threshold, upper_threshold, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: AmendmentsApi.get_amendments_by_actioning_time ..."
  end
  # verify the required parameter 'lower_threshold' is set
  fail ArgumentError, "Missing the required parameter 'lower_threshold' when calling AmendmentsApi.get_amendments_by_actioning_time" if lower_threshold.nil?
  # verify the required parameter 'upper_threshold' is set
  fail ArgumentError, "Missing the required parameter 'upper_threshold' when calling AmendmentsApi.get_amendments_by_actioning_time" if upper_threshold.nil?
  if opts[:'order'] && !['ASC', 'DESC'].include?(opts[:'order'])
    fail ArgumentError, 'invalid value for "order", must be one of ASC, DESC'
  end
  # resource path
  local_var_path = "/amendments/actioning-time/{lower-threshold}/{upper-threshold}".sub('{format}','json').sub('{' + 'lower-threshold' + '}', lower_threshold.to_s).sub('{' + 'upper-threshold' + '}', upper_threshold.to_s)

  # query parameters
  query_params = {}
  query_params[:'organizations'] = @api_client.build_collection_param(opts[:'organizations'], :multi) if !opts[:'organizations'].nil?
  query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
  query_params[:'records'] = opts[:'records'] if !opts[:'records'].nil?
  query_params[:'order_by'] = opts[:'order_by'] if !opts[:'order_by'].nil?
  query_params[:'order'] = opts[:'order'] if !opts[:'order'].nil?

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  local_header_accept = ['application/json; charset=utf-8']
  local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result

  # HTTP header 'Content-Type'
  local_header_content_type = []
  header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = []
  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 => 'AmendmentPagedMetadata')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AmendmentsApi#get_amendments_by_actioning_time\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_amendments_by_created_date(lower_threshold, upper_threshold, opts = {}) ⇒ AmendmentPagedMetadata

Returns a collection of amendment objects with created times within the period specified by the lower-threshold and upper-threshold parameters. By default 10 values are returned. Records are returned in natural order. by creation","response":"getAmendmentByCreated.html"

Parameters:

  • lower_threshold

    The UTC DateTime specifying the start of the result period.

  • upper_threshold

    The UTC DateTime specifying the end of the result period.

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

    the optional parameters

Options Hash (opts):

  • :organizations (Array<String>)

    A list of organization-IDs used to restrict the scope of API calls.

  • :offset (Integer)

    The offset from the first amendment to return. (default to 0)

  • :records (Integer)

    The maximum number of amendments to return. (default to 10)

  • :order_by (String)

    Specify a field used to order the result set. (default to created)

  • :order (String)

    Ihe direction of any ordering, either ASC or DESC. (default to DESC)

Returns:



553
554
555
556
# File 'lib/bf_ruby2/api/amendments_api.rb', line 553

def get_amendments_by_created_date(lower_threshold, upper_threshold, opts = {})
  data, _status_code, _headers = get_amendments_by_created_date_with_http_info(lower_threshold, upper_threshold, opts)
  return data
end

#get_amendments_by_created_date_with_http_info(lower_threshold, upper_threshold, opts = {}) ⇒ Array<(AmendmentPagedMetadata, Fixnum, Hash)>

Returns a collection of amendment objects with created times within the period specified by the lower-threshold and upper-threshold parameters. By default 10 values are returned. Records are returned in natural order. by creation&quot;,&quot;response&quot;:&quot;getAmendmentByCreated.html&quot;

Parameters:

  • lower_threshold

    The UTC DateTime specifying the start of the result period.

  • upper_threshold

    The UTC DateTime specifying the end of the result period.

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

    the optional parameters

Options Hash (opts):

  • :organizations (Array<String>)

    A list of organization-IDs used to restrict the scope of API calls.

  • :offset (Integer)

    The offset from the first amendment to return.

  • :records (Integer)

    The maximum number of amendments to return.

  • :order_by (String)

    Specify a field used to order the result set.

  • :order (String)

    Ihe direction of any ordering, either ASC or DESC.

Returns:

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

    AmendmentPagedMetadata data, response status code and response headers



569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
# File 'lib/bf_ruby2/api/amendments_api.rb', line 569

def get_amendments_by_created_date_with_http_info(lower_threshold, upper_threshold, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: AmendmentsApi.get_amendments_by_created_date ..."
  end
  # verify the required parameter 'lower_threshold' is set
  fail ArgumentError, "Missing the required parameter 'lower_threshold' when calling AmendmentsApi.get_amendments_by_created_date" if lower_threshold.nil?
  # verify the required parameter 'upper_threshold' is set
  fail ArgumentError, "Missing the required parameter 'upper_threshold' when calling AmendmentsApi.get_amendments_by_created_date" if upper_threshold.nil?
  if opts[:'order'] && !['ASC', 'DESC'].include?(opts[:'order'])
    fail ArgumentError, 'invalid value for "order", must be one of ASC, DESC'
  end
  # resource path
  local_var_path = "/amendments/created/{lower-threshold}/{upper-threshold}".sub('{format}','json').sub('{' + 'lower-threshold' + '}', lower_threshold.to_s).sub('{' + 'upper-threshold' + '}', upper_threshold.to_s)

  # query parameters
  query_params = {}
  query_params[:'organizations'] = @api_client.build_collection_param(opts[:'organizations'], :multi) if !opts[:'organizations'].nil?
  query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
  query_params[:'records'] = opts[:'records'] if !opts[:'records'].nil?
  query_params[:'order_by'] = opts[:'order_by'] if !opts[:'order_by'].nil?
  query_params[:'order'] = opts[:'order'] if !opts[:'order'].nil?

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  local_header_accept = ['application/json; charset=utf-8']
  local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result

  # HTTP header 'Content-Type'
  local_header_content_type = []
  header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = []
  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 => 'AmendmentPagedMetadata')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AmendmentsApi#get_amendments_by_created_date\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_amendments_by_updated_date(lower_threshold, upper_threshold, opts = {}) ⇒ AmendmentPagedMetadata

Returns a collection of amendment objects with updated times within the period specified by the lower-threshold and upper-threshold parameters. By default 10 values are returned. Records are returned in natural order. by updated","response":"getAmendmentByUpdated.html"

Parameters:

  • lower_threshold

    The UTC DateTime specifying the start of the result period.

  • upper_threshold

    The UTC DateTime specifying the end of the result period.

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

    the optional parameters

Options Hash (opts):

  • :organizations (Array<String>)

    A list of organization-IDs used to restrict the scope of API calls.

  • :offset (Integer)

    The offset from the first amendment to return. (default to 0)

  • :records (Integer)

    The maximum number of amendments to return. (default to 10)

  • :order_by (String)

    Specify a field used to order the result set. (default to created)

  • :order (String)

    Ihe direction of any ordering, either ASC or DESC. (default to DESC)

Returns:



632
633
634
635
# File 'lib/bf_ruby2/api/amendments_api.rb', line 632

def get_amendments_by_updated_date(lower_threshold, upper_threshold, opts = {})
  data, _status_code, _headers = get_amendments_by_updated_date_with_http_info(lower_threshold, upper_threshold, opts)
  return data
end

#get_amendments_by_updated_date_with_http_info(lower_threshold, upper_threshold, opts = {}) ⇒ Array<(AmendmentPagedMetadata, Fixnum, Hash)>

Returns a collection of amendment objects with updated times within the period specified by the lower-threshold and upper-threshold parameters. By default 10 values are returned. Records are returned in natural order. by updated&quot;,&quot;response&quot;:&quot;getAmendmentByUpdated.html&quot;

Parameters:

  • lower_threshold

    The UTC DateTime specifying the start of the result period.

  • upper_threshold

    The UTC DateTime specifying the end of the result period.

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

    the optional parameters

Options Hash (opts):

  • :organizations (Array<String>)

    A list of organization-IDs used to restrict the scope of API calls.

  • :offset (Integer)

    The offset from the first amendment to return.

  • :records (Integer)

    The maximum number of amendments to return.

  • :order_by (String)

    Specify a field used to order the result set.

  • :order (String)

    Ihe direction of any ordering, either ASC or DESC.

Returns:

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

    AmendmentPagedMetadata data, response status code and response headers



648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
# File 'lib/bf_ruby2/api/amendments_api.rb', line 648

def get_amendments_by_updated_date_with_http_info(lower_threshold, upper_threshold, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: AmendmentsApi.get_amendments_by_updated_date ..."
  end
  # verify the required parameter 'lower_threshold' is set
  fail ArgumentError, "Missing the required parameter 'lower_threshold' when calling AmendmentsApi.get_amendments_by_updated_date" if lower_threshold.nil?
  # verify the required parameter 'upper_threshold' is set
  fail ArgumentError, "Missing the required parameter 'upper_threshold' when calling AmendmentsApi.get_amendments_by_updated_date" if upper_threshold.nil?
  if opts[:'order'] && !['ASC', 'DESC'].include?(opts[:'order'])
    fail ArgumentError, 'invalid value for "order", must be one of ASC, DESC'
  end
  # resource path
  local_var_path = "/amendments/updated/{lower-threshold}/{upper-threshold}".sub('{format}','json').sub('{' + 'lower-threshold' + '}', lower_threshold.to_s).sub('{' + 'upper-threshold' + '}', upper_threshold.to_s)

  # query parameters
  query_params = {}
  query_params[:'organizations'] = @api_client.build_collection_param(opts[:'organizations'], :multi) if !opts[:'organizations'].nil?
  query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
  query_params[:'records'] = opts[:'records'] if !opts[:'records'].nil?
  query_params[:'order_by'] = opts[:'order_by'] if !opts[:'order_by'].nil?
  query_params[:'order'] = opts[:'order'] if !opts[:'order'].nil?

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  local_header_accept = ['application/json; charset=utf-8']
  local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result

  # HTTP header 'Content-Type'
  local_header_content_type = []
  header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = []
  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 => 'AmendmentPagedMetadata')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AmendmentsApi#get_amendments_by_updated_date\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#retire_amendment(amendment_id, organizations, opts = {}) ⇒ AmendmentPagedMetadata

Retires the amendment specified by the amendment-ID parameter. Retiring a amendment causes it to cancel based on the specificed retirement settings for the product. an amendment","response":"deleteAmendment.html"

Parameters:

  • amendment_id

    ID of the amendment.

  • organizations

    A list of organization-IDs used to restrict the scope of API calls.

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

    the optional parameters

Returns:



706
707
708
709
# File 'lib/bf_ruby2/api/amendments_api.rb', line 706

def retire_amendment(amendment_id, organizations, opts = {})
  data, _status_code, _headers = retire_amendment_with_http_info(amendment_id, organizations, opts)
  return data
end

#retire_amendment_with_http_info(amendment_id, organizations, opts = {}) ⇒ Array<(AmendmentPagedMetadata, Fixnum, Hash)>

Retires the amendment specified by the amendment-ID parameter. Retiring a amendment causes it to cancel based on the specificed retirement settings for the product. an amendment&quot;,&quot;response&quot;:&quot;deleteAmendment.html&quot;

Parameters:

  • amendment_id

    ID of the amendment.

  • organizations

    A list of organization-IDs used to restrict the scope of API calls.

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

    the optional parameters

Returns:

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

    AmendmentPagedMetadata data, response status code and response headers



717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
# File 'lib/bf_ruby2/api/amendments_api.rb', line 717

def retire_amendment_with_http_info(amendment_id, organizations, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: AmendmentsApi.retire_amendment ..."
  end
  # verify the required parameter 'amendment_id' is set
  fail ArgumentError, "Missing the required parameter 'amendment_id' when calling AmendmentsApi.retire_amendment" if amendment_id.nil?
  # verify the required parameter 'organizations' is set
  fail ArgumentError, "Missing the required parameter 'organizations' when calling AmendmentsApi.retire_amendment" if organizations.nil?
  # resource path
  local_var_path = "/amendments/{amendment-ID}".sub('{format}','json').sub('{' + 'amendment-ID' + '}', amendment_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'organizations'] = @api_client.build_collection_param(organizations, :multi)

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  local_header_accept = ['application/json; charset=utf-8']
  local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result

  # HTTP header 'Content-Type'
  local_header_content_type = ['text/plain']
  header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)

  # form parameters
  form_params = {}

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

#update_amendment(amendment, opts = {}) ⇒ AmendmentPagedMetadata

Update an amendment. {"nickname":"Update an amendment","request":"updateAmendmentRequest.html","response":"updateAmendmentResponse.html" }

Parameters:

  • amendment

    The amendment object to be updated.

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

    the optional parameters

Returns:



767
768
769
770
# File 'lib/bf_ruby2/api/amendments_api.rb', line 767

def update_amendment(amendment, opts = {})
  data, _status_code, _headers = update_amendment_with_http_info(amendment, opts)
  return data
end

#update_amendment_with_http_info(amendment, opts = {}) ⇒ Array<(AmendmentPagedMetadata, Fixnum, Hash)>

Update an amendment. {&quot;nickname&quot;:&quot;Update an amendment&quot;,&quot;request&quot;:&quot;updateAmendmentRequest.html&quot;,&quot;response&quot;:&quot;updateAmendmentResponse.html&quot; }

Parameters:

  • amendment

    The amendment object to be updated.

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

    the optional parameters

Returns:

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

    AmendmentPagedMetadata data, response status code and response headers



777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
# File 'lib/bf_ruby2/api/amendments_api.rb', line 777

def update_amendment_with_http_info(amendment, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: AmendmentsApi.update_amendment ..."
  end
  # verify the required parameter 'amendment' is set
  fail ArgumentError, "Missing the required parameter 'amendment' when calling AmendmentsApi.update_amendment" if amendment.nil?
  # resource path
  local_var_path = "/amendments".sub('{format}','json')

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  local_header_accept = ['text/xml', 'application/xml', 'application/json; charset=utf-8']
  local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result

  # HTTP header 'Content-Type'
  local_header_content_type = ['application/json; charset=utf-8']
  header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(amendment)
  auth_names = []
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'AmendmentPagedMetadata')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AmendmentsApi#update_amendment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end