class Bfwd::MetadataApi

Attributes

api_client[RW]

Public Class Methods

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

Public Instance Methods

delete_metadata_key_values(opts = {}) click to toggle source

Remove any associated metadata. {"nickname":"Clear metadata from organization","request" :"deleteOrganizationMetadataRequest.html","response":"deleteOrganizationMetadataResponse.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. @return [DynamicMetadata]

# File lib/bf_ruby2/api/metadata_api.rb, line 28
def delete_metadata_key_values(opts = {})
  data, _status_code, _headers = delete_metadata_key_values_with_http_info(opts)
  return data
end
delete_metadata_key_values_with_http_info(opts = {}) click to toggle source

Remove any associated metadata. {&quot;nickname&quot;:&quot;Clear metadata from organization&quot;,&quot;request&quot; :&quot;deleteOrganizationMetadataRequest.html&quot;,&quot;response&quot;:&quot;deleteOrganizationMetadataResponse.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. @return [Array<(DynamicMetadata, Fixnum, Hash)>] DynamicMetadata data, response status code and response headers

# File lib/bf_ruby2/api/metadata_api.rb, line 38
def delete_metadata_key_values_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: MetadataApi.delete_metadata_key_values ..."
  end
  # resource path
  local_var_path = "/metadata"

  # 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(: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 => 'DynamicMetadata')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: MetadataApi#delete_metadata_key_values\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_metadata_key_values(opts = {}) click to toggle source

Retrieve any associated metadata. {"nickname":"Retrieve metadata on organization","request":"getOrganizationMetadataRequest.html","response":"getOrganizationMetadataResponse.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. @return [DynamicMetadata]

# File lib/bf_ruby2/api/metadata_api.rb, line 80
def get_metadata_key_values(opts = {})
  data, _status_code, _headers = get_metadata_key_values_with_http_info(opts)
  return data
end
get_metadata_key_values_with_http_info(opts = {}) click to toggle source

Retrieve any associated metadata. {&quot;nickname&quot;:&quot;Retrieve metadata on organization&quot;,&quot;request&quot;:&quot;getOrganizationMetadataRequest.html&quot;,&quot;response&quot;:&quot;getOrganizationMetadataResponse.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. @return [Array<(DynamicMetadata, Fixnum, Hash)>] DynamicMetadata data, response status code and response headers

# File lib/bf_ruby2/api/metadata_api.rb, line 90
def get_metadata_key_values_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: MetadataApi.get_metadata_key_values ..."
  end
  # resource path
  local_var_path = "/metadata"

  # 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 => 'DynamicMetadata')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: MetadataApi#get_metadata_key_values\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
set_metadata_key_values(metadata, opts = {}) click to toggle source

Remove any existing metadata keys and create the provided data. {"nickname":"Set metadata on organization","request":"setOrganizationMetadataRequest.html","response":"setOrganizationMetadataResponse.html"} @param metadata @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 [DynamicMetadata]

# File lib/bf_ruby2/api/metadata_api.rb, line 133
def set_metadata_key_values(metadata, opts = {})
  data, _status_code, _headers = set_metadata_key_values_with_http_info(metadata, opts)
  return data
end
set_metadata_key_values_with_http_info(metadata, opts = {}) click to toggle source

Remove any existing metadata keys and create the provided data. {&quot;nickname&quot;:&quot;Set metadata on organization&quot;,&quot;request&quot;:&quot;setOrganizationMetadataRequest.html&quot;,&quot;response&quot;:&quot;setOrganizationMetadataResponse.html&quot;} @param metadata @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<(DynamicMetadata, Fixnum, Hash)>] DynamicMetadata data, response status code and response headers

# File lib/bf_ruby2/api/metadata_api.rb, line 144
def set_metadata_key_values_with_http_info(metadata, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: MetadataApi.set_metadata_key_values ..."
  end
  # verify the required parameter 'metadata' is set
  if @api_client.config.client_side_validation && metadata.nil?
    fail ArgumentError, "Missing the required parameter 'metadata' when calling MetadataApi.set_metadata_key_values"
  end
  # resource path
  local_var_path = "/metadata"

  # 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(['application/json; charset=utf-8'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(metadata)
  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 => 'DynamicMetadata')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: MetadataApi#set_metadata_key_values\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
upsert_metadata_key_values(metadata, opts = {}) click to toggle source

Update any existing metadata key-values and insert any new key-values, no keys will be removed. {"nickname":"Upsert metadata on organization","request":"upsertOrganizationMetadataRequest.html","response":"upsertOrganizationMetadataResponse.html"} @param metadata @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 [DynamicMetadata]

# File lib/bf_ruby2/api/metadata_api.rb, line 191
def upsert_metadata_key_values(metadata, opts = {})
  data, _status_code, _headers = upsert_metadata_key_values_with_http_info(metadata, opts)
  return data
end
upsert_metadata_key_values_with_http_info(metadata, opts = {}) click to toggle source

Update any existing metadata key-values and insert any new key-values, no keys will be removed. {&quot;nickname&quot;:&quot;Upsert metadata on organization&quot;,&quot;request&quot;:&quot;upsertOrganizationMetadataRequest.html&quot;,&quot;response&quot;:&quot;upsertOrganizationMetadataResponse.html&quot;} @param metadata @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<(DynamicMetadata, Fixnum, Hash)>] DynamicMetadata data, response status code and response headers

# File lib/bf_ruby2/api/metadata_api.rb, line 202
def upsert_metadata_key_values_with_http_info(metadata, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: MetadataApi.upsert_metadata_key_values ..."
  end
  # verify the required parameter 'metadata' is set
  if @api_client.config.client_side_validation && metadata.nil?
    fail ArgumentError, "Missing the required parameter 'metadata' when calling MetadataApi.upsert_metadata_key_values"
  end
  # resource path
  local_var_path = "/metadata"

  # 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(['application/json; charset=utf-8'])

  # form parameters
  form_params = {}

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