Class: Bfwd::MetadataApi

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ MetadataApi



30
31
32
# File 'lib/bf_ruby2/api/metadata_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/metadata_api.rb', line 28

def api_client
  @api_client
end

Instance Method Details

#delete_metadata_key_values(opts = {}) ⇒ DynamicMetadata

Remove any associated metadata. metadata from organization","request" :"deleteOrganizationMetadataRequest.html","response":"deleteOrganizationMetadataResponse.html"

Options Hash (opts):

  • :organizations (Array<String>)

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



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

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

#delete_metadata_key_values_with_http_info(opts = {}) ⇒ Array<(DynamicMetadata, Fixnum, Hash)>

Remove any associated metadata. metadata from organization&quot;,&quot;request&quot; :&quot;deleteOrganizationMetadataRequest.html&quot;,&quot;response&quot;:&quot;deleteOrganizationMetadataResponse.html&quot;

Options Hash (opts):

  • :organizations (Array<String>)

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



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
# File 'lib/bf_ruby2/api/metadata_api.rb', line 49

def (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".sub('{format}','json')

  # 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(: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 = {}) ⇒ DynamicMetadata

Retrieve any associated metadata. metadata on organization","request":"getOrganizationMetadataRequest.html","response":"getOrganizationMetadataResponse.html"

Options Hash (opts):

  • :organizations (Array<String>)

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



95
96
97
98
# File 'lib/bf_ruby2/api/metadata_api.rb', line 95

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

#get_metadata_key_values_with_http_info(opts = {}) ⇒ Array<(DynamicMetadata, Fixnum, Hash)>

Retrieve any associated metadata. metadata on organization&quot;,&quot;request&quot;:&quot;getOrganizationMetadataRequest.html&quot;,&quot;response&quot;:&quot;getOrganizationMetadataResponse.html&quot;

Options Hash (opts):

  • :organizations (Array<String>)

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



105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
# File 'lib/bf_ruby2/api/metadata_api.rb', line 105

def (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".sub('{format}','json')

  # 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 => '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 = {}) ⇒ DynamicMetadata

Remove any existing metadata keys and create the provided data. metadata on organization","request":"setOrganizationMetadataRequest.html","response":"setOrganizationMetadataResponse.html"

Options Hash (opts):

  • :organizations (Array<String>)

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



152
153
154
155
# File 'lib/bf_ruby2/api/metadata_api.rb', line 152

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

#set_metadata_key_values_with_http_info(metadata, opts = {}) ⇒ Array<(DynamicMetadata, Fixnum, Hash)>

Remove any existing metadata keys and create the provided data. metadata on organization&quot;,&quot;request&quot;:&quot;setOrganizationMetadataRequest.html&quot;,&quot;response&quot;:&quot;setOrganizationMetadataResponse.html&quot;

Options Hash (opts):

  • :organizations (Array<String>)

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



163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
# File 'lib/bf_ruby2/api/metadata_api.rb', line 163

def (, 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
  fail ArgumentError, "Missing the required parameter 'metadata' when calling MetadataApi.set_metadata_key_values" if .nil?
  # resource path
  local_var_path = "/metadata".sub('{format}','json')

  # 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 = ['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()
  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 = {}) ⇒ DynamicMetadata

Update any existing metadata key-values and insert any new key-values, no keys will be removed. metadata on organization","request":"upsertOrganizationMetadataRequest.html","response":"upsertOrganizationMetadataResponse.html"

Options Hash (opts):

  • :organizations (Array<String>)

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



212
213
214
215
# File 'lib/bf_ruby2/api/metadata_api.rb', line 212

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

#upsert_metadata_key_values_with_http_info(metadata, opts = {}) ⇒ Array<(DynamicMetadata, Fixnum, Hash)>

Update any existing metadata key-values and insert any new key-values, no keys will be removed. metadata on organization&quot;,&quot;request&quot;:&quot;upsertOrganizationMetadataRequest.html&quot;,&quot;response&quot;:&quot;upsertOrganizationMetadataResponse.html&quot;

Options Hash (opts):

  • :organizations (Array<String>)

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



223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
# File 'lib/bf_ruby2/api/metadata_api.rb', line 223

def (, 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
  fail ArgumentError, "Missing the required parameter 'metadata' when calling MetadataApi.upsert_metadata_key_values" if .nil?
  # resource path
  local_var_path = "/metadata".sub('{format}','json')

  # 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 = ['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()
  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