Class: TripletexRubyClient::ProductproductPriceApi
- Inherits:
-
Object
- Object
- TripletexRubyClient::ProductproductPriceApi
- Defined in:
- lib/tripletex_ruby_client/api/productproduct_price_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#initialize(api_client = ApiClient.default) ⇒ ProductproductPriceApi
constructor
A new instance of ProductproductPriceApi.
-
#search(product_id, opts = {}) ⇒ ListResponseProductPrice
- BETA
-
Find prices for a product.
-
#search_with_http_info(product_id, opts = {}) ⇒ Array<(ListResponseProductPrice, Fixnum, Hash)>
- BETA
-
Find prices for a product.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ ProductproductPriceApi
Returns a new instance of ProductproductPriceApi.
19 20 21 |
# File 'lib/tripletex_ruby_client/api/productproduct_price_api.rb', line 19 def initialize(api_client = ApiClient.default) @api_client = api_client end |
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
17 18 19 |
# File 'lib/tripletex_ruby_client/api/productproduct_price_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#search(product_id, opts = {}) ⇒ ListResponseProductPrice
- BETA
-
Find prices for a product. Only available for users that have activated the Logistics/Logistics Plus Beta-program in ‘Our customer account’
33 34 35 36 |
# File 'lib/tripletex_ruby_client/api/productproduct_price_api.rb', line 33 def search(product_id, opts = {}) data, _status_code, _headers = search_with_http_info(product_id, opts) data end |
#search_with_http_info(product_id, opts = {}) ⇒ Array<(ListResponseProductPrice, Fixnum, Hash)>
- BETA
-
Find prices for a product. Only available for users that have activated the Logistics/Logistics Plus Beta-program in 'Our customer account'
49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 |
# File 'lib/tripletex_ruby_client/api/productproduct_price_api.rb', line 49 def search_with_http_info(product_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ProductproductPriceApi.search ...' 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 ProductproductPriceApi.search" end # resource path local_var_path = '/product/productPrice' # query parameters query_params = {} query_params[:'productId'] = product_id query_params[:'fromDate'] = opts[:'from_date'] if !opts[:'from_date'].nil? query_params[:'toDate'] = opts[:'to_date'] if !opts[:'to_date'].nil? query_params[:'from'] = opts[:'from'] if !opts[:'from'].nil? query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil? query_params[:'sorting'] = opts[:'sorting'] if !opts[:'sorting'].nil? query_params[:'fields'] = opts[:'fields'] if !opts[:'fields'].nil? # header parameters header_params = {} # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['tokenAuthScheme'] 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 => 'ListResponseProductPrice') if @api_client.config.debugging @api_client.config.logger.debug "API called: ProductproductPriceApi#search\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |