class Bfwd::AmendmentsApi

Attributes

api_client[RW]

Public Class Methods

new(api_client = ApiClient.default) click to toggle source
# File lib/bf_ruby2/api/amendments_api.rb, line 19
def initialize(api_client = ApiClient.default)
  @api_client = api_client
end

Public Instance Methods

create_amendment(amendment, opts = {}) click to toggle source

Create an amendment. {"nickname":"Create a new amendment","request":"createAmendmentRequest.html","response":"createAmendmentResponse.html" } @param amendment The amendment object to be created. @param [Hash] opts the optional parameters @return [AmendmentPagedMetadata]

# File lib/bf_ruby2/api/amendments_api.rb, line 28
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 = {}) click to toggle source

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; } @param amendment The amendment object to be created. @param [Hash] opts the optional parameters @return [Array<(AmendmentPagedMetadata, Fixnum, Hash)>] AmendmentPagedMetadata data, response status code and response headers

# File lib/bf_ruby2/api/amendments_api.rb, line 38
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
  if @api_client.config.client_side_validation && amendment.nil?
    fail ArgumentError, "Missing the required parameter 'amendment' when calling AmendmentsApi.create_amendment"
  end
  # resource path
  local_var_path = "/amendments"

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['text/xml', 'application/xml', 'application/json; charset=utf-8'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json; charset=utf-8'])

  # 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 = {}) click to toggle source

Returns a collection of all amendments. By default 10 values are returned. Records are returned in natural order. {"nickname":"Get all amendments","response":"getAmendmentAll.html"} @param [Hash] opts the optional parameters @option opts [Array<String>] :organizations A list of organization-IDs used to restrict the scope of API calls. @option opts [Integer] :offset The offset from the first amendment to return. (default to 0) @option opts [Integer] :records The maximum number of amendments to return. (default to 10) @option opts [String] :order_by Specify a field used to order the result set. (default to created) @option opts [String] :order Ihe direction of any ordering, either ASC or DESC. (default to DESC) @option opts [String] :invoice_id Ihe invoice ID associated with the amendment. @option opts [String] :state Ihe state of the amendment. @option opts [String] :type Ihe type of amendment. @return [AmendmentPagedMetadata]

# File lib/bf_ruby2/api/amendments_api.rb, line 90
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 = {}) click to toggle source

Returns a collection of all amendments. By default 10 values are returned. Records are returned in natural order. {&quot;nickname&quot;:&quot;Get all amendments&quot;,&quot;response&quot;:&quot;getAmendmentAll.html&quot;} @param [Hash] opts the optional parameters @option opts [Array<String>] :organizations A list of organization-IDs used to restrict the scope of API calls. @option opts [Integer] :offset The offset from the first amendment to return. @option opts [Integer] :records The maximum number of amendments to return. @option opts [String] :order_by Specify a field used to order the result set. @option opts [String] :order Ihe direction of any ordering, either ASC or DESC. @option opts [String] :invoice_id Ihe invoice ID associated with the amendment. @option opts [String] :state Ihe state of the amendment. @option opts [String] :type Ihe type of amendment. @return [Array<(AmendmentPagedMetadata, Fixnum, Hash)>] AmendmentPagedMetadata data, response status code and response headers

# File lib/bf_ruby2/api/amendments_api.rb, line 107
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 @api_client.config.client_side_validation && opts[:'order'] && !['ASC', 'DESC'].include?(opts[:'order'])
    fail ArgumentError, 'invalid value for "order", must be one of ASC, DESC'
  end
  if @api_client.config.client_side_validation && 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 @api_client.config.client_side_validation && 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"

  # 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)
  header_params['Accept'] = @api_client.select_header_accept(['application/json; charset=utf-8'])

  # 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 = {}) click to toggle source

Returns a single amendment, specified by the amendment-ID parameter. {"nickname":"Retrieve an existing amendment","response":"getAmendmentByID.html"} @param amendment_id The unique string-ID of the amendment. @param [Hash] opts the optional parameters @option opts [Array<String>] :organizations A list of organization-IDs used to restrict the scope of API calls. @return [AmendmentPagedMetadata]

# File lib/bf_ruby2/api/amendments_api.rb, line 164
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 = {}) click to toggle source

Returns a single amendment, specified by the amendment-ID parameter. {&quot;nickname&quot;:&quot;Retrieve an existing amendment&quot;,&quot;response&quot;:&quot;getAmendmentByID.html&quot;} @param amendment_id The unique string-ID of the amendment. @param [Hash] opts the optional parameters @option opts [Array<String>] :organizations A list of organization-IDs used to restrict the scope of API calls. @return [Array<(AmendmentPagedMetadata, Fixnum, Hash)>] AmendmentPagedMetadata data, response status code and response headers

# File lib/bf_ruby2/api/amendments_api.rb, line 175
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
  if @api_client.config.client_side_validation && amendment_id.nil?
    fail ArgumentError, "Missing the required parameter 'amendment_id' when calling AmendmentsApi.get_amendment_by_id"
  end
  # resource path
  local_var_path = "/amendments/{amendment-ID}".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)
  header_params['Accept'] = @api_client.select_header_accept(['application/json; charset=utf-8'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['text/plain'])

  # 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 = {}) click to toggle source

Returns a collection of amendments, specified by the state parameter. By default 10 values are returned. Records are returned in natural order. {"nickname":"Retrieve by state","response":"getAmendmentsByState.html"} @param state The current state of the amendment, either pending, succeeded, failed or discarded @param [Hash] opts the optional parameters @option opts [Array<String>] :organizations A list of organization-IDs used to restrict the scope of API calls. @option opts [Integer] :offset The offset from the first amendment to return. (default to 0) @option opts [Integer] :records The maximum number of amendments to return. (default to 10) @option opts [String] :order_by Specify a field used to order the result set. (default to id) @option opts [String] :order Ihe direction of any ordering, either ASC or DESC. (default to DESC) @return [AmendmentPagedMetadata]

# File lib/bf_ruby2/api/amendments_api.rb, line 226
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 = {}) click to toggle source

Returns a collection of amendments, specified by the state parameter. By default 10 values are returned. Records are returned in natural order. {&quot;nickname&quot;:&quot;Retrieve by state&quot;,&quot;response&quot;:&quot;getAmendmentsByState.html&quot;} @param state The current state of the amendment, either pending, succeeded, failed or discarded @param [Hash] opts the optional parameters @option opts [Array<String>] :organizations A list of organization-IDs used to restrict the scope of API calls. @option opts [Integer] :offset The offset from the first amendment to return. @option opts [Integer] :records The maximum number of amendments to return. @option opts [String] :order_by Specify a field used to order the result set. @option opts [String] :order Ihe direction of any ordering, either ASC or DESC. @return [Array<(AmendmentPagedMetadata, Fixnum, Hash)>] AmendmentPagedMetadata data, response status code and response headers

# File lib/bf_ruby2/api/amendments_api.rb, line 241
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
  if @api_client.config.client_side_validation && state.nil?
    fail ArgumentError, "Missing the required parameter 'state' when calling AmendmentsApi.get_amendment_by_state"
  end
  # verify enum value
  if @api_client.config.client_side_validation && !['Pending', 'Succeeded', 'Failed', 'Discarded'].include?(state)
    fail ArgumentError, "invalid value for 'state', must be one of Pending, Succeeded, Failed, Discarded"
  end
  if @api_client.config.client_side_validation && 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('{' + '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)
  header_params['Accept'] = @api_client.select_header_accept(['application/json; charset=utf-8'])

  # 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 = {}) click to toggle source

Returns a collection of amendments, specified by the subscription-ID parameter. By default 10 values are returned. Records are returned in natural order. {"nickname":"Retrieve by subscription","response":"getAmendmentsBySubscription.html"} @param subscription_id ID of the subscription @param [Hash] opts the optional parameters @option opts [Array<String>] :organizations A list of organization-IDs used to restrict the scope of API calls. @option opts [Integer] :offset The offset from the first amendment to return. (default to 0) @option opts [Integer] :records The maximum number of amendments to return. (default to 10) @option opts [String] :order_by Specify a field used to order the result set. (default to id) @option opts [String] :order The direction of any ordering, either ASC or DESC. (default to DESC) @return [AmendmentPagedMetadata]

# File lib/bf_ruby2/api/amendments_api.rb, line 301
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 = {}) click to toggle source

Returns a collection of amendments, specified by the subscription-ID parameter. By default 10 values are returned. Records are returned in natural order. {&quot;nickname&quot;:&quot;Retrieve by subscription&quot;,&quot;response&quot;:&quot;getAmendmentsBySubscription.html&quot;} @param subscription_id ID of the subscription @param [Hash] opts the optional parameters @option opts [Array<String>] :organizations A list of organization-IDs used to restrict the scope of API calls. @option opts [Integer] :offset The offset from the first amendment to return. @option opts [Integer] :records The maximum number of amendments to return. @option opts [String] :order_by Specify a field used to order the result set. @option opts [String] :order The direction of any ordering, either ASC or DESC. @return [Array<(AmendmentPagedMetadata, Fixnum, Hash)>] AmendmentPagedMetadata data, response status code and response headers

# File lib/bf_ruby2/api/amendments_api.rb, line 316
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
  if @api_client.config.client_side_validation && subscription_id.nil?
    fail ArgumentError, "Missing the required parameter 'subscription_id' when calling AmendmentsApi.get_amendment_by_subscription_id"
  end
  if @api_client.config.client_side_validation && 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('{' + '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)
  header_params['Accept'] = @api_client.select_header_accept(['application/json; charset=utf-8'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['text/plain'])

  # 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 = {}) click to toggle source

{"nickname":"","response":""} @param query_string The query string used to search. @param [Hash] opts the optional parameters @option opts [Array<String>] :organizations A list of organization-IDs used to restrict the scope of API calls. @option opts [Integer] :offset The starting index of the search results. (default to 0) @option opts [Integer] :records The number of search results to return. (default to 10) @option opts [BOOLEAN] :wildcard Toggle if we search for full words or whether a wildcard is used. (default to false) @option opts [BOOLEAN] :entity Is an entity returned with the search results. (default to false) @return [SwaggerTypeList]

# File lib/bf_ruby2/api/amendments_api.rb, line 374
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 = {}) click to toggle source

{&quot;nickname&quot;:&quot;&quot;,&quot;response&quot;:&quot;&quot;} @param query_string The query string used to search. @param [Hash] opts the optional parameters @option opts [Array<String>] :organizations A list of organization-IDs used to restrict the scope of API calls. @option opts [Integer] :offset The starting index of the search results. @option opts [Integer] :records The number of search results to return. @option opts [BOOLEAN] :wildcard Toggle if we search for full words or whether a wildcard is used. @option opts [BOOLEAN] :entity Is an entity returned with the search results. @return [Array<(SwaggerTypeList, Fixnum, Hash)>] SwaggerTypeList data, response status code and response headers

# File lib/bf_ruby2/api/amendments_api.rb, line 389
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
  if @api_client.config.client_side_validation && query_string.nil?
    fail ArgumentError, "Missing the required parameter 'query_string' when calling AmendmentsApi.get_amendment_swagger"
  end
  # resource path
  local_var_path = "/amendments/swagger-end-point/{query-string}".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)
  header_params['Accept'] = @api_client.select_header_accept(['application/json; charset=utf-8'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['text/plain'])

  # 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 = {}) click to toggle source

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. {"nickname":"Retrieve by actioning","response":"getAmendmentByActioningTime.html"} @param lower_threshold The UTC DateTime specifying the start of the result period. @param upper_threshold The UTC DateTime specifying the end of the result period. @param [Hash] opts the optional parameters @option opts [Array<String>] :organizations A list of organization-IDs used to restrict the scope of API calls. @option opts [Integer] :offset The offset from the first amendment to return. (default to 0) @option opts [Integer] :records The maximum number of amendments to return. (default to 10) @option opts [String] :order_by Specify a field used to order the result set. (default to created) @option opts [String] :order Ihe direction of any ordering, either ASC or DESC. (default to DESC) @return [AmendmentPagedMetadata]

# File lib/bf_ruby2/api/amendments_api.rb, line 445
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 = {}) click to toggle source

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. {&quot;nickname&quot;:&quot;Retrieve by actioning&quot;,&quot;response&quot;:&quot;getAmendmentByActioningTime.html&quot;} @param lower_threshold The UTC DateTime specifying the start of the result period. @param upper_threshold The UTC DateTime specifying the end of the result period. @param [Hash] opts the optional parameters @option opts [Array<String>] :organizations A list of organization-IDs used to restrict the scope of API calls. @option opts [Integer] :offset The offset from the first amendment to return. @option opts [Integer] :records The maximum number of amendments to return. @option opts [String] :order_by Specify a field used to order the result set. @option opts [String] :order Ihe direction of any ordering, either ASC or DESC. @return [Array<(AmendmentPagedMetadata, Fixnum, Hash)>] AmendmentPagedMetadata data, response status code and response headers

# File lib/bf_ruby2/api/amendments_api.rb, line 461
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
  if @api_client.config.client_side_validation && lower_threshold.nil?
    fail ArgumentError, "Missing the required parameter 'lower_threshold' when calling AmendmentsApi.get_amendments_by_actioning_time"
  end
  # verify the required parameter 'upper_threshold' is set
  if @api_client.config.client_side_validation && upper_threshold.nil?
    fail ArgumentError, "Missing the required parameter 'upper_threshold' when calling AmendmentsApi.get_amendments_by_actioning_time"
  end
  if @api_client.config.client_side_validation && 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('{' + '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)
  header_params['Accept'] = @api_client.select_header_accept(['application/json; charset=utf-8'])

  # 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 = {}) click to toggle source

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. {"nickname":"Retrieve by creation","response":"getAmendmentByCreated.html"} @param lower_threshold The UTC DateTime specifying the start of the result period. @param upper_threshold The UTC DateTime specifying the end of the result period. @param [Hash] opts the optional parameters @option opts [Array<String>] :organizations A list of organization-IDs used to restrict the scope of API calls. @option opts [Integer] :offset The offset from the first amendment to return. (default to 0) @option opts [Integer] :records The maximum number of amendments to return. (default to 10) @option opts [String] :order_by Specify a field used to order the result set. (default to created) @option opts [String] :order Ihe direction of any ordering, either ASC or DESC. (default to DESC) @return [AmendmentPagedMetadata]

# File lib/bf_ruby2/api/amendments_api.rb, line 522
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 = {}) click to toggle source

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. {&quot;nickname&quot;:&quot;Retrieve by creation&quot;,&quot;response&quot;:&quot;getAmendmentByCreated.html&quot;} @param lower_threshold The UTC DateTime specifying the start of the result period. @param upper_threshold The UTC DateTime specifying the end of the result period. @param [Hash] opts the optional parameters @option opts [Array<String>] :organizations A list of organization-IDs used to restrict the scope of API calls. @option opts [Integer] :offset The offset from the first amendment to return. @option opts [Integer] :records The maximum number of amendments to return. @option opts [String] :order_by Specify a field used to order the result set. @option opts [String] :order Ihe direction of any ordering, either ASC or DESC. @return [Array<(AmendmentPagedMetadata, Fixnum, Hash)>] AmendmentPagedMetadata data, response status code and response headers

# File lib/bf_ruby2/api/amendments_api.rb, line 538
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
  if @api_client.config.client_side_validation && lower_threshold.nil?
    fail ArgumentError, "Missing the required parameter 'lower_threshold' when calling AmendmentsApi.get_amendments_by_created_date"
  end
  # verify the required parameter 'upper_threshold' is set
  if @api_client.config.client_side_validation && upper_threshold.nil?
    fail ArgumentError, "Missing the required parameter 'upper_threshold' when calling AmendmentsApi.get_amendments_by_created_date"
  end
  if @api_client.config.client_side_validation && 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('{' + '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)
  header_params['Accept'] = @api_client.select_header_accept(['application/json; charset=utf-8'])

  # 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 = {}) click to toggle source

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. {"nickname":"Retrieve by updated","response":"getAmendmentByUpdated.html"} @param lower_threshold The UTC DateTime specifying the start of the result period. @param upper_threshold The UTC DateTime specifying the end of the result period. @param [Hash] opts the optional parameters @option opts [Array<String>] :organizations A list of organization-IDs used to restrict the scope of API calls. @option opts [Integer] :offset The offset from the first amendment to return. (default to 0) @option opts [Integer] :records The maximum number of amendments to return. (default to 10) @option opts [String] :order_by Specify a field used to order the result set. (default to created) @option opts [String] :order Ihe direction of any ordering, either ASC or DESC. (default to DESC) @return [AmendmentPagedMetadata]

# File lib/bf_ruby2/api/amendments_api.rb, line 599
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 = {}) click to toggle source

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. {&quot;nickname&quot;:&quot;Retrieve by updated&quot;,&quot;response&quot;:&quot;getAmendmentByUpdated.html&quot;} @param lower_threshold The UTC DateTime specifying the start of the result period. @param upper_threshold The UTC DateTime specifying the end of the result period. @param [Hash] opts the optional parameters @option opts [Array<String>] :organizations A list of organization-IDs used to restrict the scope of API calls. @option opts [Integer] :offset The offset from the first amendment to return. @option opts [Integer] :records The maximum number of amendments to return. @option opts [String] :order_by Specify a field used to order the result set. @option opts [String] :order Ihe direction of any ordering, either ASC or DESC. @return [Array<(AmendmentPagedMetadata, Fixnum, Hash)>] AmendmentPagedMetadata data, response status code and response headers

# File lib/bf_ruby2/api/amendments_api.rb, line 615
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
  if @api_client.config.client_side_validation && lower_threshold.nil?
    fail ArgumentError, "Missing the required parameter 'lower_threshold' when calling AmendmentsApi.get_amendments_by_updated_date"
  end
  # verify the required parameter 'upper_threshold' is set
  if @api_client.config.client_side_validation && upper_threshold.nil?
    fail ArgumentError, "Missing the required parameter 'upper_threshold' when calling AmendmentsApi.get_amendments_by_updated_date"
  end
  if @api_client.config.client_side_validation && 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('{' + '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)
  header_params['Accept'] = @api_client.select_header_accept(['application/json; charset=utf-8'])

  # 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 = {}) click to toggle source

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. {"nickname":"Delete an amendment","response":"deleteAmendment.html"} @param amendment_id ID of the amendment. @param organizations A list of organization-IDs used to restrict the scope of API calls. @param [Hash] opts the optional parameters @return [AmendmentPagedMetadata]

# File lib/bf_ruby2/api/amendments_api.rb, line 671
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 = {}) click to toggle source

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. {&quot;nickname&quot;:&quot;Delete an amendment&quot;,&quot;response&quot;:&quot;deleteAmendment.html&quot;} @param amendment_id ID of the amendment. @param organizations A list of organization-IDs used to restrict the scope of API calls. @param [Hash] opts the optional parameters @return [Array<(AmendmentPagedMetadata, Fixnum, Hash)>] AmendmentPagedMetadata data, response status code and response headers

# File lib/bf_ruby2/api/amendments_api.rb, line 682
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
  if @api_client.config.client_side_validation && amendment_id.nil?
    fail ArgumentError, "Missing the required parameter 'amendment_id' when calling AmendmentsApi.retire_amendment"
  end
  # verify the required parameter 'organizations' is set
  if @api_client.config.client_side_validation && organizations.nil?
    fail ArgumentError, "Missing the required parameter 'organizations' when calling AmendmentsApi.retire_amendment"
  end
  # resource path
  local_var_path = "/amendments/{amendment-ID}".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)
  header_params['Accept'] = @api_client.select_header_accept(['application/json; charset=utf-8'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['text/plain'])

  # 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 = {}) click to toggle source

Update an amendment. {"nickname":"Update an amendment","request":"updateAmendmentRequest.html","response":"updateAmendmentResponse.html" } @param amendment The amendment object to be updated. @param [Hash] opts the optional parameters @return [AmendmentPagedMetadata]

# File lib/bf_ruby2/api/amendments_api.rb, line 732
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 = {}) click to toggle source

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; } @param amendment The amendment object to be updated. @param [Hash] opts the optional parameters @return [Array<(AmendmentPagedMetadata, Fixnum, Hash)>] AmendmentPagedMetadata data, response status code and response headers

# File lib/bf_ruby2/api/amendments_api.rb, line 742
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
  if @api_client.config.client_side_validation && amendment.nil?
    fail ArgumentError, "Missing the required parameter 'amendment' when calling AmendmentsApi.update_amendment"
  end
  # resource path
  local_var_path = "/amendments"

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['text/xml', 'application/xml', 'application/json; charset=utf-8'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json; charset=utf-8'])

  # 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