Class: BillForward::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.



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

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:



40
41
42
43
# File 'lib/bf_ruby2/api/productrateplans_api.rb', line 40

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:



51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
# File 'lib/bf_ruby2/api/productrateplans_api.rb', line 51

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
  fail ArgumentError, "Missing the required parameter 'product_rate_plan_id' when calling ProductrateplansApi.add_taxation_strategy_to_rate_plan" if product_rate_plan_id.nil?
  # verify the required parameter 'taxation_strategy' is set
  fail ArgumentError, "Missing the required parameter 'taxation_strategy' when calling ProductrateplansApi.add_taxation_strategy_to_rate_plan" if taxation_strategy.nil?
  # resource path
  local_var_path = "/product-rate-plans/{product-rate-plan-ID}/tax".sub('{format}','json').sub('{' + 'product-rate-plan-ID' + '}', product_rate_plan_id.to_s)

  # query parameters
  query_params = {}

  # 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(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:



100
101
102
103
# File 'lib/bf_ruby2/api/productrateplans_api.rb', line 100

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:



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
145
146
147
148
149
150
# File 'lib/bf_ruby2/api/productrateplans_api.rb', line 110

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
  fail ArgumentError, "Missing the required parameter 'product_rate_plan' when calling ProductrateplansApi.create_rate_plan" if product_rate_plan.nil?
  # resource path
  local_var_path = "/product-rate-plans".sub('{format}','json')

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}

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

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

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(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:



158
159
160
161
# File 'lib/bf_ruby2/api/productrateplans_api.rb', line 158

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



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
205
206
207
208
209
210
# File 'lib/bf_ruby2/api/productrateplans_api.rb', line 169

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
  fail ArgumentError, "Missing the required parameter 'product_rate_plan_id' when calling ProductrateplansApi.delete_metadata_for_rate_plan" if product_rate_plan_id.nil?
  # resource path
  local_var_path = "/product-rate-plans/{product-rate-plan-ID}/metadata".sub('{format}','json').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)
  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', '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 = 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:



223
224
225
226
# File 'lib/bf_ruby2/api/productrateplans_api.rb', line 223

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:



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
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
# File 'lib/bf_ruby2/api/productrateplans_api.rb', line 239

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

  # query parameters
  query_params = {}
  query_params[:'organizations'] = @api_client.build_collection_param(opts[:'organizations'], :multi) if !opts[:'organizations'].nil?
  query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
  query_params[:'records'] = opts[:'records'] if !opts[:'records'].nil?
  query_params[:'order_by'] = opts[:'order_by'] if !opts[:'order_by'].nil?
  query_params[:'order'] = opts[:'order'] if !opts[:'order'].nil?
  query_params[:'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)
  local_header_accept = ['application/json; charset=utf-8', 'text/plain']
  local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result

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

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = []
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => '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:



299
300
301
302
# File 'lib/bf_ruby2/api/productrateplans_api.rb', line 299

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:



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

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
  fail ArgumentError, "Missing the required parameter 'product_rate_plan_id' when calling ProductrateplansApi.get_available_taxation_strategies_for_rate_plan" if product_rate_plan_id.nil?
  if opts[:'order'] && !['ASC', 'DESC'].include?(opts[:'order'])
    fail ArgumentError, 'invalid value for "order", must be one of ASC, DESC'
  end
  # resource path
  local_var_path = "/product-rate-plans/{product-rate-plan-ID}/tax".sub('{format}','json').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)
  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', '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 = 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:



370
371
372
373
# File 'lib/bf_ruby2/api/productrateplans_api.rb', line 370

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



381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
# File 'lib/bf_ruby2/api/productrateplans_api.rb', line 381

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
  fail ArgumentError, "Missing the required parameter 'product_rate_plan_id' when calling ProductrateplansApi.get_metadata_for_rate_plan" if product_rate_plan_id.nil?
  # resource path
  local_var_path = "/product-rate-plans/{product-rate-plan-ID}/metadata".sub('{format}','json').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)
  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', '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: 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:



435
436
437
438
# File 'lib/bf_ruby2/api/productrateplans_api.rb', line 435

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:



451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
# File 'lib/bf_ruby2/api/productrateplans_api.rb', line 451

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
  fail ArgumentError, "Missing the required parameter 'product_rate_plan_id' when calling ProductrateplansApi.get_product_rate_plan_by_id" if product_rate_plan_id.nil?
  if opts[:'order'] && !['ASC', 'DESC'].include?(opts[:'order'])
    fail ArgumentError, 'invalid value for "order", must be one of ASC, DESC'
  end
  # resource path
  local_var_path = "/product-rate-plans/{product-rate-plan-ID}".sub('{format}','json').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)
  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', '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 = 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:



513
514
515
516
# File 'lib/bf_ruby2/api/productrateplans_api.rb', line 513

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:



592
593
594
595
# File 'lib/bf_ruby2/api/productrateplans_api.rb', line 592

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:



609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
# File 'lib/bf_ruby2/api/productrateplans_api.rb', line 609

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
  fail ArgumentError, "Missing the required parameter 'product_id' when calling ProductrateplansApi.get_rate_plan_by_product_and_rate_plan" if product_id.nil?
  # verify the required parameter 'rate_plan_id' is set
  fail ArgumentError, "Missing the required parameter 'rate_plan_id' when calling ProductrateplansApi.get_rate_plan_by_product_and_rate_plan" if rate_plan_id.nil?
  if opts[:'order'] && !['ASC', 'DESC'].include?(opts[:'order'])
    fail ArgumentError, 'invalid value for "order", must be one of ASC, DESC'
  end
  # resource path
  local_var_path = "/product-rate-plans/product/{product-ID}/rate-plan/{rate-plan-ID}".sub('{format}','json').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)
  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', '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 = 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:



529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
# File 'lib/bf_ruby2/api/productrateplans_api.rb', line 529

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
  fail ArgumentError, "Missing the required parameter 'product_id' when calling ProductrateplansApi.get_rate_plan_by_product" if product_id.nil?
  if opts[:'order'] && !['ASC', 'DESC'].include?(opts[:'order'])
    fail ArgumentError, 'invalid value for "order", must be one of ASC, DESC'
  end
  # resource path
  local_var_path = "/product-rate-plans/product/{product-ID}".sub('{format}','json').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)
  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', '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 = 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:



669
670
671
672
# File 'lib/bf_ruby2/api/productrateplans_api.rb', line 669

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:



681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
# File 'lib/bf_ruby2/api/productrateplans_api.rb', line 681

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
  fail ArgumentError, "Missing the required parameter 'product_rate_plan_id' when calling ProductrateplansApi.remove_taxation_strategy_from_rate_plan" if product_rate_plan_id.nil?
  # verify the required parameter 'taxation_strategy_id' is set
  fail ArgumentError, "Missing the required parameter 'taxation_strategy_id' when calling ProductrateplansApi.remove_taxation_strategy_from_rate_plan" if taxation_strategy_id.nil?
  # resource path
  local_var_path = "/product-rate-plans/{product-rate-plan-ID}/tax/{taxation-strategy-ID}".sub('{format}','json').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)
  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', '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 = 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:



732
733
734
735
# File 'lib/bf_ruby2/api/productrateplans_api.rb', line 732

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:



743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
# File 'lib/bf_ruby2/api/productrateplans_api.rb', line 743

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
  fail ArgumentError, "Missing the required parameter 'product_rate_plan_id' when calling ProductrateplansApi.retire_rate_plan" if product_rate_plan_id.nil?
  # resource path
  local_var_path = "/product-rate-plans/{product-rate-plan-ID}".sub('{format}','json').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)
  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', '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 = 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:



793
794
795
796
# File 'lib/bf_ruby2/api/productrateplans_api.rb', line 793

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



805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
# File 'lib/bf_ruby2/api/productrateplans_api.rb', line 805

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
  fail ArgumentError, "Missing the required parameter 'metadata' when calling ProductrateplansApi.set_metadata_for_rate_plan" if .nil?
  # verify the required parameter 'product_rate_plan_id' is set
  fail ArgumentError, "Missing the required parameter 'product_rate_plan_id' when calling ProductrateplansApi.set_metadata_for_rate_plan" if product_rate_plan_id.nil?
  # resource path
  local_var_path = "/product-rate-plans/{product-rate-plan-ID}/metadata".sub('{format}','json').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)
  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: 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:



855
856
857
858
# File 'lib/bf_ruby2/api/productrateplans_api.rb', line 855

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:



865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
# File 'lib/bf_ruby2/api/productrateplans_api.rb', line 865

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
  fail ArgumentError, "Missing the required parameter 'product_rate_plan' when calling ProductrateplansApi.update_rate_plan" if product_rate_plan.nil?
  # resource path
  local_var_path = "/product-rate-plans".sub('{format}','json')

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}

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

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

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(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:



914
915
916
917
# File 'lib/bf_ruby2/api/productrateplans_api.rb', line 914

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



926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
# File 'lib/bf_ruby2/api/productrateplans_api.rb', line 926

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
  fail ArgumentError, "Missing the required parameter 'metadata' when calling ProductrateplansApi.upsert_metadata_for_rate_plan" if .nil?
  # verify the required parameter 'product_rate_plan_id' is set
  fail ArgumentError, "Missing the required parameter 'product_rate_plan_id' when calling ProductrateplansApi.upsert_metadata_for_rate_plan" if product_rate_plan_id.nil?
  # resource path
  local_var_path = "/product-rate-plans/{product-rate-plan-ID}/metadata".sub('{format}','json').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)
  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: ProductrateplansApi#upsert_metadata_for_rate_plan\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end