Class: Bfwd::ProductrateplansApi

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ ProductrateplansApi

Returns a new instance of ProductrateplansApi.



19
20
21
# File 'lib/bf_ruby2/api/productrateplans_api.rb', line 19

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

Instance Attribute Details

#api_clientObject

Returns the value of attribute api_client.



17
18
19
# File 'lib/bf_ruby2/api/productrateplans_api.rb', line 17

def api_client
  @api_client
end

Instance Method Details

#add_taxation_strategy_to_rate_plan(product_rate_plan_id, taxation_strategy, opts = {}) ⇒ TaxationStrategyPagedMetadata

Adds or re-enables the specified taxation-strategy for the given product-rate-plan. tax","response":"addTaxationStrategy.html","request":"addTaxationStrategy.request.html"

Parameters:

  • product_rate_plan_id
  • taxation_strategy

    The taxation-strategy

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

    the optional parameters

Returns:



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

def add_taxation_strategy_to_rate_plan(product_rate_plan_id, taxation_strategy, opts = {})
  data, _status_code, _headers = add_taxation_strategy_to_rate_plan_with_http_info(product_rate_plan_id, taxation_strategy, opts)
  return data
end

#add_taxation_strategy_to_rate_plan_with_http_info(product_rate_plan_id, taxation_strategy, opts = {}) ⇒ Array<(TaxationStrategyPagedMetadata, Fixnum, Hash)>

Adds or re-enables the specified taxation-strategy for the given product-rate-plan. tax&quot;,&quot;response&quot;:&quot;addTaxationStrategy.html&quot;,&quot;request&quot;:&quot;addTaxationStrategy.request.html&quot;

Parameters:

  • product_rate_plan_id
  • taxation_strategy

    The taxation-strategy

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

    the optional parameters

Returns:



40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
# File 'lib/bf_ruby2/api/productrateplans_api.rb', line 40

def add_taxation_strategy_to_rate_plan_with_http_info(product_rate_plan_id, taxation_strategy, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: ProductrateplansApi.add_taxation_strategy_to_rate_plan ..."
  end
  # verify the required parameter 'product_rate_plan_id' is set
  if @api_client.config.client_side_validation && product_rate_plan_id.nil?
    fail ArgumentError, "Missing the required parameter 'product_rate_plan_id' when calling ProductrateplansApi.add_taxation_strategy_to_rate_plan"
  end
  # verify the required parameter 'taxation_strategy' is set
  if @api_client.config.client_side_validation && taxation_strategy.nil?
    fail ArgumentError, "Missing the required parameter 'taxation_strategy' when calling ProductrateplansApi.add_taxation_strategy_to_rate_plan"
  end
  # resource path
  local_var_path = "/product-rate-plans/{product-rate-plan-ID}/tax".sub('{' + 'product-rate-plan-ID' + '}', product_rate_plan_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/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(taxation_strategy)
  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 => 'TaxationStrategyPagedMetadata')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProductrateplansApi#add_taxation_strategy_to_rate_plan\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#create_rate_plan(product_rate_plan, opts = {}) ⇒ ProductRatePlanPagedMetadata

Create a new rate-plan. a new rate-plan","request":"createPRPRequest.html","response":"createPRPResponse.html"

Parameters:

  • product_rate_plan

    The product-rate-plan object to be created.

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

    the optional parameters

Returns:



89
90
91
92
# File 'lib/bf_ruby2/api/productrateplans_api.rb', line 89

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

#create_rate_plan_with_http_info(product_rate_plan, opts = {}) ⇒ Array<(ProductRatePlanPagedMetadata, Fixnum, Hash)>

Create a new rate-plan. a new rate-plan&quot;,&quot;request&quot;:&quot;createPRPRequest.html&quot;,&quot;response&quot;:&quot;createPRPResponse.html&quot;

Parameters:

  • product_rate_plan

    The product-rate-plan object to be created.

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

    the optional parameters

Returns:



99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
# File 'lib/bf_ruby2/api/productrateplans_api.rb', line 99

def create_rate_plan_with_http_info(product_rate_plan, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: ProductrateplansApi.create_rate_plan ..."
  end
  # verify the required parameter 'product_rate_plan' is set
  if @api_client.config.client_side_validation && product_rate_plan.nil?
    fail ArgumentError, "Missing the required parameter 'product_rate_plan' when calling ProductrateplansApi.create_rate_plan"
  end
  # resource path
  local_var_path = "/product-rate-plans"

  # 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(product_rate_plan)
  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 => 'ProductRatePlanPagedMetadata')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProductrateplansApi#create_rate_plan\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#delete_metadata_for_rate_plan(product_rate_plan_id, opts = {}) ⇒ DynamicMetadata

Remove any associated metadata. metadata from rate-plan","request" :"deleteRatePlanMetadataRequest.html","response":"deleteRatePlanMetadataResponse.html"

Parameters:

  • product_rate_plan_id
  • 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:



145
146
147
148
# File 'lib/bf_ruby2/api/productrateplans_api.rb', line 145

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

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

Remove any associated metadata. metadata from rate-plan&quot;,&quot;request&quot; :&quot;deleteRatePlanMetadataRequest.html&quot;,&quot;response&quot;:&quot;deleteRatePlanMetadataResponse.html&quot;

Parameters:

  • product_rate_plan_id
  • 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<(DynamicMetadata, Fixnum, Hash)>)

    DynamicMetadata data, response status code and response headers



156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
# File 'lib/bf_ruby2/api/productrateplans_api.rb', line 156

def (product_rate_plan_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: ProductrateplansApi.delete_metadata_for_rate_plan ..."
  end
  # verify the required parameter 'product_rate_plan_id' is set
  if @api_client.config.client_side_validation && product_rate_plan_id.nil?
    fail ArgumentError, "Missing the required parameter 'product_rate_plan_id' when calling ProductrateplansApi.delete_metadata_for_rate_plan"
  end
  # resource path
  local_var_path = "/product-rate-plans/{product-rate-plan-ID}/metadata".sub('{' + 'product-rate-plan-ID' + '}', product_rate_plan_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', '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(: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: ProductrateplansApi#delete_metadata_for_rate_plan\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_all_rate_plans(opts = {}) ⇒ ProductRatePlanPagedMetadata

Returns a collection of product-rate-plans. By default 10 values are returned. Records are returned in natural order. all rate-plans","response":"getPRPAll.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 product-rate-plan to return. (default to 0)

  • :records (Integer)

    The maximum number of product-rate-plans 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)

  • :include_retired (BOOLEAN)

    Whether retired products should be returned. (default to false)

  • :metadata (String)

Returns:



208
209
210
211
# File 'lib/bf_ruby2/api/productrateplans_api.rb', line 208

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

#get_all_rate_plans_with_http_info(opts = {}) ⇒ Array<(ProductRatePlanPagedMetadata, Fixnum, Hash)>

Returns a collection of product-rate-plans. By default 10 values are returned. Records are returned in natural order. all rate-plans&quot;,&quot;response&quot;:&quot;getPRPAll.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 product-rate-plan to return.

  • :records (Integer)

    The maximum number of product-rate-plans 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.

  • :include_retired (BOOLEAN)

    Whether retired products should be returned.

  • :metadata (String)

Returns:



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
265
266
# File 'lib/bf_ruby2/api/productrateplans_api.rb', line 224

def get_all_rate_plans_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: ProductrateplansApi.get_all_rate_plans ..."
  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 = "/product-rate-plans"

  # 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[:'include_retired'] = opts[:'include_retired'] if !opts[:'include_retired'].nil?
  query_params[:'metadata'] = opts[:'metadata'] if !opts[:'metadata'].nil?

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json; charset=utf-8', '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 => 'ProductRatePlanPagedMetadata')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProductrateplansApi#get_all_rate_plans\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_available_taxation_strategies_for_rate_plan(product_rate_plan_id, opts = {}) ⇒ TaxationStrategyPagedMetadata

Returns all available taxes for the specified product-rate-plan. By default 10 values are returned. Records are returned in natural order. taxes","response":"getAvailableTaxationStrategies.html"

Parameters:

  • product_rate_plan_id
  • 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 subscription to return. (default to 0)

  • :records (Integer)

    The maximum number of subscriptions 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:



278
279
280
281
# File 'lib/bf_ruby2/api/productrateplans_api.rb', line 278

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

#get_available_taxation_strategies_for_rate_plan_with_http_info(product_rate_plan_id, opts = {}) ⇒ Array<(TaxationStrategyPagedMetadata, Fixnum, Hash)>

Returns all available taxes for the specified product-rate-plan. By default 10 values are returned. Records are returned in natural order. taxes&quot;,&quot;response&quot;:&quot;getAvailableTaxationStrategies.html&quot;

Parameters:

  • product_rate_plan_id
  • 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 subscription to return.

  • :records (Integer)

    The maximum number of subscriptions 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:



293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
# File 'lib/bf_ruby2/api/productrateplans_api.rb', line 293

def get_available_taxation_strategies_for_rate_plan_with_http_info(product_rate_plan_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: ProductrateplansApi.get_available_taxation_strategies_for_rate_plan ..."
  end
  # verify the required parameter 'product_rate_plan_id' is set
  if @api_client.config.client_side_validation && product_rate_plan_id.nil?
    fail ArgumentError, "Missing the required parameter 'product_rate_plan_id' when calling ProductrateplansApi.get_available_taxation_strategies_for_rate_plan"
  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 = "/product-rate-plans/{product-rate-plan-ID}/tax".sub('{' + 'product-rate-plan-ID' + '}', product_rate_plan_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', '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 => 'TaxationStrategyPagedMetadata')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProductrateplansApi#get_available_taxation_strategies_for_rate_plan\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_metadata_for_rate_plan(product_rate_plan_id, opts = {}) ⇒ DynamicMetadata

Retrieve any associated metadata. metadata on rate-plan","request":"getRatePlanMetadataRequest.html","response":"getRatePlanMetadataResponse.html"

Parameters:

  • product_rate_plan_id
  • 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:



347
348
349
350
# File 'lib/bf_ruby2/api/productrateplans_api.rb', line 347

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

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

Retrieve any associated metadata. metadata on rate-plan&quot;,&quot;request&quot;:&quot;getRatePlanMetadataRequest.html&quot;,&quot;response&quot;:&quot;getRatePlanMetadataResponse.html&quot;

Parameters:

  • product_rate_plan_id
  • 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<(DynamicMetadata, Fixnum, Hash)>)

    DynamicMetadata data, response status code and response headers



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
390
391
392
393
394
395
396
397
# File 'lib/bf_ruby2/api/productrateplans_api.rb', line 358

def (product_rate_plan_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: ProductrateplansApi.get_metadata_for_rate_plan ..."
  end
  # verify the required parameter 'product_rate_plan_id' is set
  if @api_client.config.client_side_validation && product_rate_plan_id.nil?
    fail ArgumentError, "Missing the required parameter 'product_rate_plan_id' when calling ProductrateplansApi.get_metadata_for_rate_plan"
  end
  # resource path
  local_var_path = "/product-rate-plans/{product-rate-plan-ID}/metadata".sub('{' + 'product-rate-plan-ID' + '}', product_rate_plan_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(['application/json; charset=utf-8', '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: ProductrateplansApi#get_metadata_for_rate_plan\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_product_rate_plan_by_id(product_rate_plan_id, opts = {}) ⇒ ProductRatePlanPagedMetadata

Returns product-rate-plans, specified by the product-rate-plan id or name. an existing rate-plan","response":"getPRPByID.html"

Parameters:

  • product_rate_plan_id

    id or name of the product-rate-plan.

  • 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 product-rate-plan to return. (default to 0)

  • :records (Integer)

    The maximum number of product-rate-plans 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)

  • :include_retired (BOOLEAN)

    Whether retired products should be returned. (default to false)

Returns:



410
411
412
413
# File 'lib/bf_ruby2/api/productrateplans_api.rb', line 410

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

#get_product_rate_plan_by_id_with_http_info(product_rate_plan_id, opts = {}) ⇒ Array<(ProductRatePlanPagedMetadata, Fixnum, Hash)>

Returns product-rate-plans, specified by the product-rate-plan id or name. an existing rate-plan&quot;,&quot;response&quot;:&quot;getPRPByID.html&quot;

Parameters:

  • product_rate_plan_id

    id or name of the product-rate-plan.

  • 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 product-rate-plan to return.

  • :records (Integer)

    The maximum number of product-rate-plans 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.

  • :include_retired (BOOLEAN)

    Whether retired products should be returned.

Returns:



426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
# File 'lib/bf_ruby2/api/productrateplans_api.rb', line 426

def get_product_rate_plan_by_id_with_http_info(product_rate_plan_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: ProductrateplansApi.get_product_rate_plan_by_id ..."
  end
  # verify the required parameter 'product_rate_plan_id' is set
  if @api_client.config.client_side_validation && product_rate_plan_id.nil?
    fail ArgumentError, "Missing the required parameter 'product_rate_plan_id' when calling ProductrateplansApi.get_product_rate_plan_by_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 = "/product-rate-plans/{product-rate-plan-ID}".sub('{' + 'product-rate-plan-ID' + '}', product_rate_plan_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?
  query_params[:'include_retired'] = opts[:'include_retired'] if !opts[:'include_retired'].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', '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 => 'ProductRatePlanPagedMetadata')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProductrateplansApi#get_product_rate_plan_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_rate_plan_by_product(product_id, opts = {}) ⇒ ProductRatePlanPagedMetadata

Returns a collection of product-rate-plans, specified by the product-ID parameter. By default 10 values are returned. Records are returned in natural order. by product","response":"getPRPByProductID.html"

Parameters:

  • product_id
  • 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 product-rate-plan to return. (default to 0)

  • :records (Integer)

    The maximum number of product-rate-plans 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)

  • :include_retired (BOOLEAN)

    Whether retired products should be returned. (default to true)

Returns:



486
487
488
489
# File 'lib/bf_ruby2/api/productrateplans_api.rb', line 486

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

#get_rate_plan_by_product_and_rate_plan(product_id, rate_plan_id, opts = {}) ⇒ ProductRatePlanPagedMetadata

Returns a collection of product-rate-plans, specified by the product-ID parameter. By default 10 values are returned. Records are returned in natural order. by name","response":"getPRPByNameAndProduct.html"

Parameters:

  • product_id
  • rate_plan_id
  • 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 product-rate-plan to return. (default to 0)

  • :records (Integer)

    The maximum number of product-rate-plans 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)

  • :include_retired (BOOLEAN)

    Whether retired products should be returned. (default to false)

Returns:



563
564
565
566
# File 'lib/bf_ruby2/api/productrateplans_api.rb', line 563

def get_rate_plan_by_product_and_rate_plan(product_id, rate_plan_id, opts = {})
  data, _status_code, _headers = get_rate_plan_by_product_and_rate_plan_with_http_info(product_id, rate_plan_id, opts)
  return data
end

#get_rate_plan_by_product_and_rate_plan_with_http_info(product_id, rate_plan_id, opts = {}) ⇒ Array<(ProductRatePlanPagedMetadata, Fixnum, Hash)>

Returns a collection of product-rate-plans, specified by the product-ID parameter. By default 10 values are returned. Records are returned in natural order. by name&quot;,&quot;response&quot;:&quot;getPRPByNameAndProduct.html&quot;

Parameters:

  • product_id
  • rate_plan_id
  • 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 product-rate-plan to return.

  • :records (Integer)

    The maximum number of product-rate-plans 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.

  • :include_retired (BOOLEAN)

    Whether retired products should be returned.

Returns:



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
620
621
622
623
624
625
626
627
628
629
630
631
# File 'lib/bf_ruby2/api/productrateplans_api.rb', line 580

def get_rate_plan_by_product_and_rate_plan_with_http_info(product_id, rate_plan_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: ProductrateplansApi.get_rate_plan_by_product_and_rate_plan ..."
  end
  # verify the required parameter 'product_id' is set
  if @api_client.config.client_side_validation && product_id.nil?
    fail ArgumentError, "Missing the required parameter 'product_id' when calling ProductrateplansApi.get_rate_plan_by_product_and_rate_plan"
  end
  # verify the required parameter 'rate_plan_id' is set
  if @api_client.config.client_side_validation && rate_plan_id.nil?
    fail ArgumentError, "Missing the required parameter 'rate_plan_id' when calling ProductrateplansApi.get_rate_plan_by_product_and_rate_plan"
  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 = "/product-rate-plans/product/{product-ID}/rate-plan/{rate-plan-ID}".sub('{' + 'product-ID' + '}', product_id.to_s).sub('{' + 'rate-plan-ID' + '}', rate_plan_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?
  query_params[:'include_retired'] = opts[:'include_retired'] if !opts[:'include_retired'].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', '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 => 'ProductRatePlanPagedMetadata')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProductrateplansApi#get_rate_plan_by_product_and_rate_plan\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_rate_plan_by_product_with_http_info(product_id, opts = {}) ⇒ Array<(ProductRatePlanPagedMetadata, Fixnum, Hash)>

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

Parameters:

  • product_id
  • 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 product-rate-plan to return.

  • :records (Integer)

    The maximum number of product-rate-plans 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.

  • :include_retired (BOOLEAN)

    Whether retired products should be returned.

Returns:



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
541
542
543
544
545
546
547
548
549
# File 'lib/bf_ruby2/api/productrateplans_api.rb', line 502

def get_rate_plan_by_product_with_http_info(product_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: ProductrateplansApi.get_rate_plan_by_product ..."
  end
  # verify the required parameter 'product_id' is set
  if @api_client.config.client_side_validation && product_id.nil?
    fail ArgumentError, "Missing the required parameter 'product_id' when calling ProductrateplansApi.get_rate_plan_by_product"
  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 = "/product-rate-plans/product/{product-ID}".sub('{' + 'product-ID' + '}', product_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?
  query_params[:'include_retired'] = opts[:'include_retired'] if !opts[:'include_retired'].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', '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 => 'ProductRatePlanPagedMetadata')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProductrateplansApi#get_rate_plan_by_product\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#remove_taxation_strategy_from_rate_plan(product_rate_plan_id, taxation_strategy_id, opts = {}) ⇒ TaxationStrategyPagedMetadata

Removes the specified taxation-strategy for the given product-rate-plan. tax","response":"removeTaxationStrategy.html"

Parameters:

  • product_rate_plan_id
  • taxation_strategy_id
  • 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:



640
641
642
643
# File 'lib/bf_ruby2/api/productrateplans_api.rb', line 640

def remove_taxation_strategy_from_rate_plan(product_rate_plan_id, taxation_strategy_id, opts = {})
  data, _status_code, _headers = remove_taxation_strategy_from_rate_plan_with_http_info(product_rate_plan_id, taxation_strategy_id, opts)
  return data
end

#remove_taxation_strategy_from_rate_plan_with_http_info(product_rate_plan_id, taxation_strategy_id, opts = {}) ⇒ Array<(TaxationStrategyPagedMetadata, Fixnum, Hash)>

Removes the specified taxation-strategy for the given product-rate-plan. tax&quot;,&quot;response&quot;:&quot;removeTaxationStrategy.html&quot;

Parameters:

  • product_rate_plan_id
  • taxation_strategy_id
  • 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:



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

def remove_taxation_strategy_from_rate_plan_with_http_info(product_rate_plan_id, taxation_strategy_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: ProductrateplansApi.remove_taxation_strategy_from_rate_plan ..."
  end
  # verify the required parameter 'product_rate_plan_id' is set
  if @api_client.config.client_side_validation && product_rate_plan_id.nil?
    fail ArgumentError, "Missing the required parameter 'product_rate_plan_id' when calling ProductrateplansApi.remove_taxation_strategy_from_rate_plan"
  end
  # verify the required parameter 'taxation_strategy_id' is set
  if @api_client.config.client_side_validation && taxation_strategy_id.nil?
    fail ArgumentError, "Missing the required parameter 'taxation_strategy_id' when calling ProductrateplansApi.remove_taxation_strategy_from_rate_plan"
  end
  # resource path
  local_var_path = "/product-rate-plans/{product-rate-plan-ID}/tax/{taxation-strategy-ID}".sub('{' + 'product-rate-plan-ID' + '}', product_rate_plan_id.to_s).sub('{' + 'taxation-strategy-ID' + '}', taxation_strategy_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', '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(: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 => 'TaxationStrategyPagedMetadata')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProductrateplansApi#remove_taxation_strategy_from_rate_plan\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#retire_rate_plan(product_rate_plan_id, opts = {}) ⇒ ProductRatePlanPagedMetadata

Retires the product-rate-plan specified product-rate-plan-ID. a rate-plan","response":"deletePRP.html"

Parameters:

  • product_rate_plan_id
  • 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:



703
704
705
706
# File 'lib/bf_ruby2/api/productrateplans_api.rb', line 703

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

#retire_rate_plan_with_http_info(product_rate_plan_id, opts = {}) ⇒ Array<(ProductRatePlanPagedMetadata, Fixnum, Hash)>

Retires the product-rate-plan specified product-rate-plan-ID. a rate-plan&quot;,&quot;response&quot;:&quot;deletePRP.html&quot;

Parameters:

  • product_rate_plan_id
  • 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:



714
715
716
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
# File 'lib/bf_ruby2/api/productrateplans_api.rb', line 714

def retire_rate_plan_with_http_info(product_rate_plan_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: ProductrateplansApi.retire_rate_plan ..."
  end
  # verify the required parameter 'product_rate_plan_id' is set
  if @api_client.config.client_side_validation && product_rate_plan_id.nil?
    fail ArgumentError, "Missing the required parameter 'product_rate_plan_id' when calling ProductrateplansApi.retire_rate_plan"
  end
  # resource path
  local_var_path = "/product-rate-plans/{product-rate-plan-ID}".sub('{' + 'product-rate-plan-ID' + '}', product_rate_plan_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', '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(: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 => 'ProductRatePlanPagedMetadata')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProductrateplansApi#retire_rate_plan\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#set_metadata_for_rate_plan(metadata, product_rate_plan_id, opts = {}) ⇒ DynamicMetadata

Remove any existing metadata keys and create the provided data. metadata on rate-plan","request":"setRatePlanMetadataRequest.html","response":"setRatePlanMetadataResponse.html"

Parameters:

  • metadata
  • product_rate_plan_id
  • 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:



762
763
764
765
# File 'lib/bf_ruby2/api/productrateplans_api.rb', line 762

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

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

Remove any existing metadata keys and create the provided data. metadata on rate-plan&quot;,&quot;request&quot;:&quot;setRatePlanMetadataRequest.html&quot;,&quot;response&quot;:&quot;setRatePlanMetadataResponse.html&quot;

Parameters:

  • metadata
  • product_rate_plan_id
  • 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<(DynamicMetadata, Fixnum, Hash)>)

    DynamicMetadata data, response status code and response headers



774
775
776
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/productrateplans_api.rb', line 774

def (, product_rate_plan_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: ProductrateplansApi.set_metadata_for_rate_plan ..."
  end
  # verify the required parameter 'metadata' is set
  if @api_client.config.client_side_validation && .nil?
    fail ArgumentError, "Missing the required parameter 'metadata' when calling ProductrateplansApi.set_metadata_for_rate_plan"
  end
  # verify the required parameter 'product_rate_plan_id' is set
  if @api_client.config.client_side_validation && product_rate_plan_id.nil?
    fail ArgumentError, "Missing the required parameter 'product_rate_plan_id' when calling ProductrateplansApi.set_metadata_for_rate_plan"
  end
  # resource path
  local_var_path = "/product-rate-plans/{product-rate-plan-ID}/metadata".sub('{' + 'product-rate-plan-ID' + '}', product_rate_plan_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(['application/json; charset=utf-8'])

  # 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: ProductrateplansApi#set_metadata_for_rate_plan\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#update_rate_plan(product_rate_plan, opts = {}) ⇒ ProductRatePlanPagedMetadata

Update a rate-plan. a rate-plan","request":"updatePRPRequest.html","response":"updatePRPResponse.html"

Parameters:

  • product_rate_plan

    The product-rate-plan object to be updated.

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

    the optional parameters

Returns:



824
825
826
827
# File 'lib/bf_ruby2/api/productrateplans_api.rb', line 824

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

#update_rate_plan_with_http_info(product_rate_plan, opts = {}) ⇒ Array<(ProductRatePlanPagedMetadata, Fixnum, Hash)>

Update a rate-plan. a rate-plan&quot;,&quot;request&quot;:&quot;updatePRPRequest.html&quot;,&quot;response&quot;:&quot;updatePRPResponse.html&quot;

Parameters:

  • product_rate_plan

    The product-rate-plan object to be updated.

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

    the optional parameters

Returns:



834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
# File 'lib/bf_ruby2/api/productrateplans_api.rb', line 834

def update_rate_plan_with_http_info(product_rate_plan, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: ProductrateplansApi.update_rate_plan ..."
  end
  # verify the required parameter 'product_rate_plan' is set
  if @api_client.config.client_side_validation && product_rate_plan.nil?
    fail ArgumentError, "Missing the required parameter 'product_rate_plan' when calling ProductrateplansApi.update_rate_plan"
  end
  # resource path
  local_var_path = "/product-rate-plans"

  # 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(product_rate_plan)
  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 => 'ProductRatePlanPagedMetadata')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProductrateplansApi#update_rate_plan\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#upsert_metadata_for_rate_plan(metadata, product_rate_plan_id, opts = {}) ⇒ DynamicMetadata

Update any existing metadata key-values and insert any new key-values, no keys will be removed. metadata on rate-plan","request":"upsertRatePlanMetadataRequest.html","response":"upsertRatePlanMetadataResponse.html"

Parameters:

  • metadata
  • product_rate_plan_id
  • 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:



881
882
883
884
# File 'lib/bf_ruby2/api/productrateplans_api.rb', line 881

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

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

Update any existing metadata key-values and insert any new key-values, no keys will be removed. metadata on rate-plan&quot;,&quot;request&quot;:&quot;upsertRatePlanMetadataRequest.html&quot;,&quot;response&quot;:&quot;upsertRatePlanMetadataResponse.html&quot;

Parameters:

  • metadata
  • product_rate_plan_id
  • 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<(DynamicMetadata, Fixnum, Hash)>)

    DynamicMetadata data, response status code and response headers



893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
# File 'lib/bf_ruby2/api/productrateplans_api.rb', line 893

def (, product_rate_plan_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: ProductrateplansApi.upsert_metadata_for_rate_plan ..."
  end
  # verify the required parameter 'metadata' is set
  if @api_client.config.client_side_validation && .nil?
    fail ArgumentError, "Missing the required parameter 'metadata' when calling ProductrateplansApi.upsert_metadata_for_rate_plan"
  end
  # verify the required parameter 'product_rate_plan_id' is set
  if @api_client.config.client_side_validation && product_rate_plan_id.nil?
    fail ArgumentError, "Missing the required parameter 'product_rate_plan_id' when calling ProductrateplansApi.upsert_metadata_for_rate_plan"
  end
  # resource path
  local_var_path = "/product-rate-plans/{product-rate-plan-ID}/metadata".sub('{' + 'product-rate-plan-ID' + '}', product_rate_plan_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(['application/json; charset=utf-8'])

  # 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: ProductrateplansApi#upsert_metadata_for_rate_plan\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end