class Bfwd::PricingcomponenttiersApi

Attributes

api_client[RW]

Public Class Methods

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

Public Instance Methods

create_pricing_component_tier(pricing_component_tier, opts = {}) click to toggle source

Create {"nickname":"Create a new tier","request":"createPricingComponentTierRequest.html","response":"createPricingComponentTierResponse.html"} @param pricing_component_tier The pricing-component-tier object to be updated. @param [Hash] opts the optional parameters @return [PricingComponentTierPagedMetadata]

# File lib/bf_ruby2/api/pricingcomponenttiers_api.rb, line 28
def create_pricing_component_tier(pricing_component_tier, opts = {})
  data, _status_code, _headers = create_pricing_component_tier_with_http_info(pricing_component_tier, opts)
  return data
end
create_pricing_component_tier_with_http_info(pricing_component_tier, opts = {}) click to toggle source

Create {&quot;nickname&quot;:&quot;Create a new tier&quot;,&quot;request&quot;:&quot;createPricingComponentTierRequest.html&quot;,&quot;response&quot;:&quot;createPricingComponentTierResponse.html&quot;} @param pricing_component_tier The pricing-component-tier object to be updated. @param [Hash] opts the optional parameters @return [Array<(PricingComponentTierPagedMetadata, Fixnum, Hash)>] PricingComponentTierPagedMetadata data, response status code and response headers

# File lib/bf_ruby2/api/pricingcomponenttiers_api.rb, line 38
def create_pricing_component_tier_with_http_info(pricing_component_tier, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PricingcomponenttiersApi.create_pricing_component_tier ..."
  end
  # verify the required parameter 'pricing_component_tier' is set
  if @api_client.config.client_side_validation && pricing_component_tier.nil?
    fail ArgumentError, "Missing the required parameter 'pricing_component_tier' when calling PricingcomponenttiersApi.create_pricing_component_tier"
  end
  # resource path
  local_var_path = "/pricing-component-tiers"

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

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

# File lib/bf_ruby2/api/pricingcomponenttiers_api.rb, line 87
def get_all_pricing_component_tiers(opts = {})
  data, _status_code, _headers = get_all_pricing_component_tiers_with_http_info(opts)
  return data
end
get_all_pricing_component_tiers_with_http_info(opts = {}) click to toggle source

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

# File lib/bf_ruby2/api/pricingcomponenttiers_api.rb, line 101
def get_all_pricing_component_tiers_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PricingcomponenttiersApi.get_all_pricing_component_tiers ..."
  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 = "/pricing-component-tiers"

  # query parameters
  query_params = {}
  query_params[:'organizations'] = @api_client.build_collection_param(opts[:'organizations'], :multi) if !opts[:'organizations'].nil?
  query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
  query_params[:'records'] = opts[:'records'] if !opts[:'records'].nil?
  query_params[:'order_by'] = opts[:'order_by'] if !opts[:'order_by'].nil?
  query_params[:'order'] = opts[:'order'] if !opts[:'order'].nil?

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

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = []
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'PricingComponentTierPagedMetadata')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PricingcomponenttiersApi#get_all_pricing_component_tiers\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_pricing_component_tier(pricing_component_tier_id, opts = {}) click to toggle source

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

# File lib/bf_ruby2/api/pricingcomponenttiers_api.rb, line 153
def get_pricing_component_tier(pricing_component_tier_id, opts = {})
  data, _status_code, _headers = get_pricing_component_tier_with_http_info(pricing_component_tier_id, opts)
  return data
end
get_pricing_component_tier_by_product_rate_plan_id(product_rate_plan_id, opts = {}) click to toggle source

Returns a collection of pricing-component-tier-tiers, specified by the product-rate-plan-ID parameter. By default 10 values are returned. Records are returned in natural order. {"nickname":"Retrieve by rate-plan","response":"getPricingComponentTiersByPRP.html"} @param product_rate_plan_id The string product-rate-plan-ID of the pricing-component-tier-tier. @param [Hash] opts the optional parameters @option opts [Array<String>] :organizations A list of organization-IDs used to restrict the scope of API calls. @option opts [Integer] :offset The offset from the first pricing-component-tier-tier to return. (default to 0) @option opts [Integer] :records The maximum number of pricing-component-tier-tiers to return. (default to 10) @option opts [String] :order_by Specify a field used to order the result set. (default to created) @option opts [String] :order Ihe direction of any ordering, either ASC or DESC. (default to DESC) @return [PricingComponentTierPagedMetadata]

# File lib/bf_ruby2/api/pricingcomponenttiers_api.rb, line 226
def get_pricing_component_tier_by_product_rate_plan_id(product_rate_plan_id, opts = {})
  data, _status_code, _headers = get_pricing_component_tier_by_product_rate_plan_id_with_http_info(product_rate_plan_id, opts)
  return data
end
get_pricing_component_tier_by_product_rate_plan_id_with_http_info(product_rate_plan_id, opts = {}) click to toggle source

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

# File lib/bf_ruby2/api/pricingcomponenttiers_api.rb, line 241
def get_pricing_component_tier_by_product_rate_plan_id_with_http_info(product_rate_plan_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PricingcomponenttiersApi.get_pricing_component_tier_by_product_rate_plan_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 PricingcomponenttiersApi.get_pricing_component_tier_by_product_rate_plan_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 = "/pricing-component-tiers/product-rate-plan/{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?

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

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = []
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'PricingComponentTierPagedMetadata')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PricingcomponenttiersApi#get_pricing_component_tier_by_product_rate_plan_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_pricing_component_tier_with_http_info(pricing_component_tier_id, opts = {}) click to toggle source

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

# File lib/bf_ruby2/api/pricingcomponenttiers_api.rb, line 168
def get_pricing_component_tier_with_http_info(pricing_component_tier_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PricingcomponenttiersApi.get_pricing_component_tier ..."
  end
  # verify the required parameter 'pricing_component_tier_id' is set
  if @api_client.config.client_side_validation && pricing_component_tier_id.nil?
    fail ArgumentError, "Missing the required parameter 'pricing_component_tier_id' when calling PricingcomponenttiersApi.get_pricing_component_tier"
  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 = "/pricing-component-tiers/{pricing-component-tier-ID}".sub('{' + 'pricing-component-tier-ID' + '}', pricing_component_tier_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'organizations'] = @api_client.build_collection_param(opts[:'organizations'], :multi) if !opts[:'organizations'].nil?
  query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
  query_params[:'records'] = opts[:'records'] if !opts[:'records'].nil?
  query_params[:'order_by'] = opts[:'order_by'] if !opts[:'order_by'].nil?
  query_params[:'order'] = opts[:'order'] if !opts[:'order'].nil?

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

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = []
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'PricingComponentTierPagedMetadata')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PricingcomponenttiersApi#get_pricing_component_tier\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
update_pricing_component_tier(pricing_component_tier, opts = {}) click to toggle source

Update. {"nickname":"Update a tier","request":"updatePricingComponentTierRequest.html","response":"updatePricingComponentTierResponse.html"} @param pricing_component_tier The pricing-component-tier object to be updated. @param [Hash] opts the optional parameters @return [PricingComponentTierPagedMetadata]

# File lib/bf_ruby2/api/pricingcomponenttiers_api.rb, line 294
def update_pricing_component_tier(pricing_component_tier, opts = {})
  data, _status_code, _headers = update_pricing_component_tier_with_http_info(pricing_component_tier, opts)
  return data
end
update_pricing_component_tier_with_http_info(pricing_component_tier, opts = {}) click to toggle source

Update. {&quot;nickname&quot;:&quot;Update a tier&quot;,&quot;request&quot;:&quot;updatePricingComponentTierRequest.html&quot;,&quot;response&quot;:&quot;updatePricingComponentTierResponse.html&quot;} @param pricing_component_tier The pricing-component-tier object to be updated. @param [Hash] opts the optional parameters @return [Array<(PricingComponentTierPagedMetadata, Fixnum, Hash)>] PricingComponentTierPagedMetadata data, response status code and response headers

# File lib/bf_ruby2/api/pricingcomponenttiers_api.rb, line 304
def update_pricing_component_tier_with_http_info(pricing_component_tier, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PricingcomponenttiersApi.update_pricing_component_tier ..."
  end
  # verify the required parameter 'pricing_component_tier' is set
  if @api_client.config.client_side_validation && pricing_component_tier.nil?
    fail ArgumentError, "Missing the required parameter 'pricing_component_tier' when calling PricingcomponenttiersApi.update_pricing_component_tier"
  end
  # resource path
  local_var_path = "/pricing-component-tiers"

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