marketcheck_ruby_client 1.0.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (89) hide show
  1. checksums.yaml +7 -0
  2. data/README.md +133 -0
  3. data/docs/Averages.md +13 -0
  4. data/docs/BaseListing.md +27 -0
  5. data/docs/Build.md +19 -0
  6. data/docs/Dealer.md +23 -0
  7. data/docs/DealerApi.md +230 -0
  8. data/docs/Error.md +9 -0
  9. data/docs/FacetItem.md +9 -0
  10. data/docs/FacetsApi.md +71 -0
  11. data/docs/GraphsApi.md +73 -0
  12. data/docs/HistoricalListing.md +19 -0
  13. data/docs/HistoryApi.md +65 -0
  14. data/docs/InventoryApi.md +113 -0
  15. data/docs/Listing.md +23 -0
  16. data/docs/ListingDebugAttributes.md +13 -0
  17. data/docs/ListingExtraAttributes.md +10 -0
  18. data/docs/ListingMedia.md +9 -0
  19. data/docs/ListingVDP.md +10 -0
  20. data/docs/ListingsApi.md +324 -0
  21. data/docs/Location.md +12 -0
  22. data/docs/MakeModel.md +9 -0
  23. data/docs/MarketAveragesApi.md +70 -0
  24. data/docs/MarketTrendsApi.md +72 -0
  25. data/docs/PlotPoint.md +14 -0
  26. data/docs/SearchResponse.md +9 -0
  27. data/docs/TrendPoint.md +12 -0
  28. data/docs/VINDecoderApi.md +59 -0
  29. data/git_push.sh +52 -0
  30. data/lib/marketcheck_ruby_client.rb +65 -0
  31. data/lib/swagger_client/api/dealer_api.rb +312 -0
  32. data/lib/swagger_client/api/facets_api.rb +105 -0
  33. data/lib/swagger_client/api/graphs_api.rb +108 -0
  34. data/lib/swagger_client/api/history_api.rb +95 -0
  35. data/lib/swagger_client/api/inventory_api.rb +155 -0
  36. data/lib/swagger_client/api/listings_api.rb +474 -0
  37. data/lib/swagger_client/api/market_averages_api.rb +102 -0
  38. data/lib/swagger_client/api/market_trends_api.rb +108 -0
  39. data/lib/swagger_client/api/vin_decoder_api.rb +89 -0
  40. data/lib/swagger_client/api_client.rb +332 -0
  41. data/lib/swagger_client/api_error.rb +36 -0
  42. data/lib/swagger_client/configuration.rb +163 -0
  43. data/lib/swagger_client/models/averages.rb +217 -0
  44. data/lib/swagger_client/models/base_listing.rb +370 -0
  45. data/lib/swagger_client/models/build.rb +284 -0
  46. data/lib/swagger_client/models/dealer.rb +329 -0
  47. data/lib/swagger_client/models/error.rb +173 -0
  48. data/lib/swagger_client/models/facet_item.rb +173 -0
  49. data/lib/swagger_client/models/historical_listing.rb +284 -0
  50. data/lib/swagger_client/models/listing.rb +327 -0
  51. data/lib/swagger_client/models/listing_debug_attributes.rb +217 -0
  52. data/lib/swagger_client/models/listing_extra_attributes.rb +188 -0
  53. data/lib/swagger_client/models/listing_media.rb +175 -0
  54. data/lib/swagger_client/models/listing_vdp.rb +185 -0
  55. data/lib/swagger_client/models/location.rb +207 -0
  56. data/lib/swagger_client/models/make_model.rb +171 -0
  57. data/lib/swagger_client/models/plot_point.rb +228 -0
  58. data/lib/swagger_client/models/search_response.rb +175 -0
  59. data/lib/swagger_client/models/trend_point.rb +206 -0
  60. data/lib/swagger_client/version.rb +15 -0
  61. data/marketcheck_ruby_client-1.0.6.gem +0 -0
  62. data/marketcheck_ruby_client.gemspec +32 -0
  63. data/spec/api/dealer_api_spec.rb +109 -0
  64. data/spec/api/facets_api_spec.rb +57 -0
  65. data/spec/api/graphs_api_spec.rb +58 -0
  66. data/spec/api/history_api_spec.rb +54 -0
  67. data/spec/api/inventory_api_spec.rb +70 -0
  68. data/spec/api/listings_api_spec.rb +148 -0
  69. data/spec/api/market_averages_api_spec.rb +57 -0
  70. data/spec/api/market_trends_api_spec.rb +57 -0
  71. data/spec/api/vin_decoder_api_spec.rb +52 -0
  72. data/spec/models/averages_spec.rb +96 -0
  73. data/spec/models/base_listing_spec.rb +236 -0
  74. data/spec/models/build_spec.rb +156 -0
  75. data/spec/models/dealer_spec.rb +196 -0
  76. data/spec/models/error_spec.rb +56 -0
  77. data/spec/models/facet_item_spec.rb +56 -0
  78. data/spec/models/historical_listing_spec.rb +156 -0
  79. data/spec/models/listing_debug_attributes_spec.rb +96 -0
  80. data/spec/models/listing_extra_attributes_spec.rb +66 -0
  81. data/spec/models/listing_media_spec.rb +56 -0
  82. data/spec/models/listing_spec.rb +196 -0
  83. data/spec/models/listing_vdp_spec.rb +66 -0
  84. data/spec/models/location_spec.rb +86 -0
  85. data/spec/models/make_model_spec.rb +56 -0
  86. data/spec/models/plot_point_spec.rb +106 -0
  87. data/spec/models/search_response_spec.rb +56 -0
  88. data/spec/models/trend_point_spec.rb +86 -0
  89. metadata +337 -0
@@ -0,0 +1,105 @@
1
+ =begin
2
+ Marketcheck Cars API
3
+
4
+ <b>Access the New, Used and Certified cars inventories for all Car Dealers in US.</b> <br/>The data is sourced from online listings by over 40,000 Car dealers in US. At any time, there are about 5.2M searchable listings (about 1.8M unique VINs) for Used & Certified cars and about 5M (about 2.3M unique VINs) New Car listings from all over US. We use this API at the back for our website <a href='http://www.marketcheck.com' target='_blank'>www.marketcheck.com</a> and our Android and iOS mobile apps too.<br/><h5> Few useful links : </h5><ul><li>A quick view of the API and the use cases is depicated <a href='https://portals.marketcheck.com/mcapi/' target='_blank'>here</a></li><li>The Postman collection with various usages of the API is shared here https://www.getpostman.com/collections/2752684ff636cdd7bac2</li><li> [Coming soon] API Key : Request your API Key <a href='https://portals.marketcheck.com/api' target='_blank'> here </a> </li><li> [Coming soon] Benchmarks : See the API benchmarks <a href='https://portals.marketcheck.com/mcapi/benchmarks'>here</a></li></ul>
5
+
6
+ OpenAPI spec version: 1.0.3
7
+
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+
10
+
11
+ =end
12
+
13
+ require "uri"
14
+
15
+ module SwaggerClient
16
+ class FacetsApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+
23
+ # Facets
24
+ # [Merged with the /search API - Please check the 'facets' parameter to the Search API above] Get the facets for the given simple filter criteria (by given VIN's basic specification, Or by Year, Make, Model, Trim criteria) and facet fields
25
+ # @param api_key The API Authentication Key. Mandatory with all API calls.
26
+ # @param fields Comma separated list of fields to generate facets for. Supported fields are - year, make, model, trim, exterior_color, interior_color, drivetrain, vehicle_type, car_type, body_style, body_subtype, doors
27
+ # @param [Hash] opts the optional parameters
28
+ # @option opts [String] :vin VIN as a reference to the type of car for which facets data is to be returned
29
+ # @option opts [String] :year Year of the car
30
+ # @option opts [String] :make Make of the car
31
+ # @option opts [String] :model Model of the Car
32
+ # @option opts [String] :trim Trim of the Car
33
+ # @return [Array<FacetItem>]
34
+ def get_facets(api_key, fields, opts = {})
35
+ data, status_code, headers = get_facets_with_http_info(api_key, fields, opts)
36
+ return data
37
+ end
38
+
39
+ # Facets
40
+ # [Merged with the /search API - Please check the &#39;facets&#39; parameter to the Search API above] Get the facets for the given simple filter criteria (by given VIN&#39;s basic specification, Or by Year, Make, Model, Trim criteria) and facet fields
41
+ # @param api_key The API Authentication Key. Mandatory with all API calls.
42
+ # @param fields Comma separated list of fields to generate facets for. Supported fields are - year, make, model, trim, exterior_color, interior_color, drivetrain, vehicle_type, car_type, body_style, body_subtype, doors
43
+ # @param [Hash] opts the optional parameters
44
+ # @option opts [String] :vin VIN as a reference to the type of car for which facets data is to be returned
45
+ # @option opts [String] :year Year of the car
46
+ # @option opts [String] :make Make of the car
47
+ # @option opts [String] :model Model of the Car
48
+ # @option opts [String] :trim Trim of the Car
49
+ # @return [Array<(Array<FacetItem>, Fixnum, Hash)>] Array<FacetItem> data, response status code and response headers
50
+ def get_facets_with_http_info(api_key, fields, opts = {})
51
+ if @api_client.config.debugging
52
+ @api_client.config.logger.debug "Calling API: FacetsApi#get_facets ..."
53
+ end
54
+
55
+ # verify the required parameter 'api_key' is set
56
+ fail "Missing the required parameter 'api_key' when calling get_facets" if api_key.nil?
57
+
58
+ # verify the required parameter 'fields' is set
59
+ fail "Missing the required parameter 'fields' when calling get_facets" if fields.nil?
60
+
61
+ # resource path
62
+ local_var_path = "/facets".sub('{format}','json')
63
+
64
+ # query parameters
65
+ query_params = {}
66
+ query_params[:'api_key'] = api_key
67
+ query_params[:'fields'] = fields
68
+ query_params[:'vin'] = opts[:'vin'] if opts[:'vin']
69
+ query_params[:'year'] = opts[:'year'] if opts[:'year']
70
+ query_params[:'make'] = opts[:'make'] if opts[:'make']
71
+ query_params[:'model'] = opts[:'model'] if opts[:'model']
72
+ query_params[:'trim'] = opts[:'trim'] if opts[:'trim']
73
+
74
+ # header parameters
75
+ header_params = {}
76
+
77
+ # HTTP header 'Accept' (if needed)
78
+ _header_accept = ['application/json']
79
+ _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
80
+
81
+ # HTTP header 'Content-Type'
82
+ _header_content_type = []
83
+ header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
84
+
85
+ # form parameters
86
+ form_params = {}
87
+
88
+ # http body (model)
89
+ post_body = nil
90
+
91
+ auth_names = []
92
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
93
+ :header_params => header_params,
94
+ :query_params => query_params,
95
+ :form_params => form_params,
96
+ :body => post_body,
97
+ :auth_names => auth_names,
98
+ :return_type => 'Array<FacetItem>')
99
+ if @api_client.config.debugging
100
+ @api_client.config.logger.debug "API called: FacetsApi#get_facets\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
101
+ end
102
+ return data, status_code, headers
103
+ end
104
+ end
105
+ end
@@ -0,0 +1,108 @@
1
+ =begin
2
+ Marketcheck Cars API
3
+
4
+ <b>Access the New, Used and Certified cars inventories for all Car Dealers in US.</b> <br/>The data is sourced from online listings by over 40,000 Car dealers in US. At any time, there are about 5.2M searchable listings (about 1.8M unique VINs) for Used & Certified cars and about 5M (about 2.3M unique VINs) New Car listings from all over US. We use this API at the back for our website <a href='http://www.marketcheck.com' target='_blank'>www.marketcheck.com</a> and our Android and iOS mobile apps too.<br/><h5> Few useful links : </h5><ul><li>A quick view of the API and the use cases is depicated <a href='https://portals.marketcheck.com/mcapi/' target='_blank'>here</a></li><li>The Postman collection with various usages of the API is shared here https://www.getpostman.com/collections/2752684ff636cdd7bac2</li><li> [Coming soon] API Key : Request your API Key <a href='https://portals.marketcheck.com/api' target='_blank'> here </a> </li><li> [Coming soon] Benchmarks : See the API benchmarks <a href='https://portals.marketcheck.com/mcapi/benchmarks'>here</a></li></ul>
5
+
6
+ OpenAPI spec version: 1.0.3
7
+
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+
10
+
11
+ =end
12
+
13
+ require "uri"
14
+
15
+ module SwaggerClient
16
+ class GraphsApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+
23
+ # Price, Miles plots data for given criteria
24
+ # Get price, miles plot data for active cars matching the given VIN's basic specification or Year, Make, Model, Trim (Optional) criteria
25
+ # @param api_key The API Authentication Key. Mandatory with all API calls.
26
+ # @param car_type Car type to get the scatter plot data for
27
+ # @param [Hash] opts the optional parameters
28
+ # @option opts [String] :vin VIN as a reference to the type of car for which plot data is to be returned
29
+ # @option opts [String] :year Year of the car
30
+ # @option opts [String] :make Make of the car
31
+ # @option opts [String] :model Model of the Car
32
+ # @option opts [String] :trim Trim of the Car
33
+ # @option opts [String] :rows Number of results to return. Default is 1000. Max is 10000
34
+ # @return [Array<PlotPoint>]
35
+ def get_price_miles_plot_data(api_key, car_type, opts = {})
36
+ data, status_code, headers = get_price_miles_plot_data_with_http_info(api_key, car_type, opts)
37
+ return data
38
+ end
39
+
40
+ # Price, Miles plots data for given criteria
41
+ # Get price, miles plot data for active cars matching the given VIN&#39;s basic specification or Year, Make, Model, Trim (Optional) criteria
42
+ # @param api_key The API Authentication Key. Mandatory with all API calls.
43
+ # @param car_type Car type to get the scatter plot data for
44
+ # @param [Hash] opts the optional parameters
45
+ # @option opts [String] :vin VIN as a reference to the type of car for which plot data is to be returned
46
+ # @option opts [String] :year Year of the car
47
+ # @option opts [String] :make Make of the car
48
+ # @option opts [String] :model Model of the Car
49
+ # @option opts [String] :trim Trim of the Car
50
+ # @option opts [String] :rows Number of results to return. Default is 1000. Max is 10000
51
+ # @return [Array<(Array<PlotPoint>, Fixnum, Hash)>] Array<PlotPoint> data, response status code and response headers
52
+ def get_price_miles_plot_data_with_http_info(api_key, car_type, opts = {})
53
+ if @api_client.config.debugging
54
+ @api_client.config.logger.debug "Calling API: GraphsApi#get_price_miles_plot_data ..."
55
+ end
56
+
57
+ # verify the required parameter 'api_key' is set
58
+ fail "Missing the required parameter 'api_key' when calling get_price_miles_plot_data" if api_key.nil?
59
+
60
+ # verify the required parameter 'car_type' is set
61
+ fail "Missing the required parameter 'car_type' when calling get_price_miles_plot_data" if car_type.nil?
62
+
63
+ # resource path
64
+ local_var_path = "/plots".sub('{format}','json')
65
+
66
+ # query parameters
67
+ query_params = {}
68
+ query_params[:'api_key'] = api_key
69
+ query_params[:'car_type'] = car_type
70
+ query_params[:'vin'] = opts[:'vin'] if opts[:'vin']
71
+ query_params[:'year'] = opts[:'year'] if opts[:'year']
72
+ query_params[:'make'] = opts[:'make'] if opts[:'make']
73
+ query_params[:'model'] = opts[:'model'] if opts[:'model']
74
+ query_params[:'trim'] = opts[:'trim'] if opts[:'trim']
75
+ query_params[:'rows'] = opts[:'rows'] if opts[:'rows']
76
+
77
+ # header parameters
78
+ header_params = {}
79
+
80
+ # HTTP header 'Accept' (if needed)
81
+ _header_accept = ['application/json']
82
+ _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
83
+
84
+ # HTTP header 'Content-Type'
85
+ _header_content_type = []
86
+ header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
87
+
88
+ # form parameters
89
+ form_params = {}
90
+
91
+ # http body (model)
92
+ post_body = nil
93
+
94
+ auth_names = []
95
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
96
+ :header_params => header_params,
97
+ :query_params => query_params,
98
+ :form_params => form_params,
99
+ :body => post_body,
100
+ :auth_names => auth_names,
101
+ :return_type => 'Array<PlotPoint>')
102
+ if @api_client.config.debugging
103
+ @api_client.config.logger.debug "API called: GraphsApi#get_price_miles_plot_data\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
104
+ end
105
+ return data, status_code, headers
106
+ end
107
+ end
108
+ end
@@ -0,0 +1,95 @@
1
+ =begin
2
+ Marketcheck Cars API
3
+
4
+ <b>Access the New, Used and Certified cars inventories for all Car Dealers in US.</b> <br/>The data is sourced from online listings by over 40,000 Car dealers in US. At any time, there are about 5.2M searchable listings (about 1.8M unique VINs) for Used & Certified cars and about 5M (about 2.3M unique VINs) New Car listings from all over US. We use this API at the back for our website <a href='http://www.marketcheck.com' target='_blank'>www.marketcheck.com</a> and our Android and iOS mobile apps too.<br/><h5> Few useful links : </h5><ul><li>A quick view of the API and the use cases is depicated <a href='https://portals.marketcheck.com/mcapi/' target='_blank'>here</a></li><li>The Postman collection with various usages of the API is shared here https://www.getpostman.com/collections/2752684ff636cdd7bac2</li><li> [Coming soon] API Key : Request your API Key <a href='https://portals.marketcheck.com/api' target='_blank'> here </a> </li><li> [Coming soon] Benchmarks : See the API benchmarks <a href='https://portals.marketcheck.com/mcapi/benchmarks'>here</a></li></ul>
5
+
6
+ OpenAPI spec version: 1.0.3
7
+
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+
10
+
11
+ =end
12
+
13
+ require "uri"
14
+
15
+ module SwaggerClient
16
+ class HistoryApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+
23
+ # Get a cars online listing history
24
+ # The history API returns online listing history for a car identified by its VIN. History listings are sorted in the descending order of the listing date / last seen date
25
+ # @param api_key The API Authentication Key. Mandatory with all API calls.
26
+ # @param vin The VIN to identify the car to fetch the listing history. Must be a valid 17 char VIN
27
+ # @param [Hash] opts the optional parameters
28
+ # @option opts [Float] :rows Number of results to return. Default is 10. Max is 50
29
+ # @option opts [Float] :page Page number to fetch the results for the given criteria. Default is 1.
30
+ # @return [Array<HistoricalListing>]
31
+ def history(api_key, vin, opts = {})
32
+ data, status_code, headers = history_with_http_info(api_key, vin, opts)
33
+ return data
34
+ end
35
+
36
+ # Get a cars online listing history
37
+ # The history API returns online listing history for a car identified by its VIN. History listings are sorted in the descending order of the listing date / last seen date
38
+ # @param api_key The API Authentication Key. Mandatory with all API calls.
39
+ # @param vin The VIN to identify the car to fetch the listing history. Must be a valid 17 char VIN
40
+ # @param [Hash] opts the optional parameters
41
+ # @option opts [Float] :rows Number of results to return. Default is 10. Max is 50
42
+ # @option opts [Float] :page Page number to fetch the results for the given criteria. Default is 1.
43
+ # @return [Array<(Array<HistoricalListing>, Fixnum, Hash)>] Array<HistoricalListing> data, response status code and response headers
44
+ def history_with_http_info(api_key, vin, opts = {})
45
+ if @api_client.config.debugging
46
+ @api_client.config.logger.debug "Calling API: HistoryApi#history ..."
47
+ end
48
+
49
+ # verify the required parameter 'api_key' is set
50
+ fail "Missing the required parameter 'api_key' when calling history" if api_key.nil?
51
+
52
+ # verify the required parameter 'vin' is set
53
+ fail "Missing the required parameter 'vin' when calling history" if vin.nil?
54
+
55
+ # resource path
56
+ local_var_path = "/history/{vin}".sub('{format}','json').sub('{' + 'vin' + '}', vin.to_s)
57
+
58
+ # query parameters
59
+ query_params = {}
60
+ query_params[:'api_key'] = api_key
61
+ query_params[:'rows'] = opts[:'rows'] if opts[:'rows']
62
+ query_params[:'page'] = opts[:'page'] if opts[:'page']
63
+
64
+ # header parameters
65
+ header_params = {}
66
+
67
+ # HTTP header 'Accept' (if needed)
68
+ _header_accept = ['application/json']
69
+ _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
70
+
71
+ # HTTP header 'Content-Type'
72
+ _header_content_type = []
73
+ header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
74
+
75
+ # form parameters
76
+ form_params = {}
77
+
78
+ # http body (model)
79
+ post_body = nil
80
+
81
+ auth_names = []
82
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
83
+ :header_params => header_params,
84
+ :query_params => query_params,
85
+ :form_params => form_params,
86
+ :body => post_body,
87
+ :auth_names => auth_names,
88
+ :return_type => 'Array<HistoricalListing>')
89
+ if @api_client.config.debugging
90
+ @api_client.config.logger.debug "API called: HistoryApi#history\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
91
+ end
92
+ return data, status_code, headers
93
+ end
94
+ end
95
+ end
@@ -0,0 +1,155 @@
1
+ =begin
2
+ Marketcheck Cars API
3
+
4
+ <b>Access the New, Used and Certified cars inventories for all Car Dealers in US.</b> <br/>The data is sourced from online listings by over 40,000 Car dealers in US. At any time, there are about 5.2M searchable listings (about 1.8M unique VINs) for Used & Certified cars and about 5M (about 2.3M unique VINs) New Car listings from all over US. We use this API at the back for our website <a href='http://www.marketcheck.com' target='_blank'>www.marketcheck.com</a> and our Android and iOS mobile apps too.<br/><h5> Few useful links : </h5><ul><li>A quick view of the API and the use cases is depicated <a href='https://portals.marketcheck.com/mcapi/' target='_blank'>here</a></li><li>The Postman collection with various usages of the API is shared here https://www.getpostman.com/collections/2752684ff636cdd7bac2</li><li> [Coming soon] API Key : Request your API Key <a href='https://portals.marketcheck.com/api' target='_blank'> here </a> </li><li> [Coming soon] Benchmarks : See the API benchmarks <a href='https://portals.marketcheck.com/mcapi/benchmarks'>here</a></li></ul>
5
+
6
+ OpenAPI spec version: 1.0.3
7
+
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+
10
+
11
+ =end
12
+
13
+ require "uri"
14
+
15
+ module SwaggerClient
16
+ class InventoryApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+
23
+ # Dealer inventory
24
+ # Get a dealer's currently active inventory
25
+ # @param api_key The API Authentication Key. Mandatory with all API calls.
26
+ # @param dealer_id Id representing the dealer to fetch the active inventory for
27
+ # @param [Hash] opts the optional parameters
28
+ # @option opts [String] :rows Number of results to return. Default is 10. Max is 50
29
+ # @option opts [String] :start Page number to fetch the results for the given criteria. Default is 1. Pagination is allowed only till first 1000 results for the search and sort criteria. The page value can be only between 1 to 1000/rows
30
+ # @return [BaseListing]
31
+ def get_dealer_active_inventory(api_key, dealer_id, opts = {})
32
+ data, status_code, headers = get_dealer_active_inventory_with_http_info(api_key, dealer_id, opts)
33
+ return data
34
+ end
35
+
36
+ # Dealer inventory
37
+ # Get a dealer&#39;s currently active inventory
38
+ # @param api_key The API Authentication Key. Mandatory with all API calls.
39
+ # @param dealer_id Id representing the dealer to fetch the active inventory for
40
+ # @param [Hash] opts the optional parameters
41
+ # @option opts [String] :rows Number of results to return. Default is 10. Max is 50
42
+ # @option opts [String] :start Page number to fetch the results for the given criteria. Default is 1. Pagination is allowed only till first 1000 results for the search and sort criteria. The page value can be only between 1 to 1000/rows
43
+ # @return [Array<(BaseListing, Fixnum, Hash)>] BaseListing data, response status code and response headers
44
+ def get_dealer_active_inventory_with_http_info(api_key, dealer_id, opts = {})
45
+ if @api_client.config.debugging
46
+ @api_client.config.logger.debug "Calling API: InventoryApi#get_dealer_active_inventory ..."
47
+ end
48
+
49
+ # verify the required parameter 'api_key' is set
50
+ fail "Missing the required parameter 'api_key' when calling get_dealer_active_inventory" if api_key.nil?
51
+
52
+ # verify the required parameter 'dealer_id' is set
53
+ fail "Missing the required parameter 'dealer_id' when calling get_dealer_active_inventory" if dealer_id.nil?
54
+
55
+ # resource path
56
+ local_var_path = "/dealer/{dealer_id}/active/inventory".sub('{format}','json').sub('{' + 'dealer_id' + '}', dealer_id.to_s)
57
+
58
+ # query parameters
59
+ query_params = {}
60
+ query_params[:'api_key'] = api_key
61
+ query_params[:'rows'] = opts[:'rows'] if opts[:'rows']
62
+ query_params[:'start'] = opts[:'start'] if opts[:'start']
63
+
64
+ # header parameters
65
+ header_params = {}
66
+
67
+ # HTTP header 'Accept' (if needed)
68
+ _header_accept = ['application/json']
69
+ _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
70
+
71
+ # HTTP header 'Content-Type'
72
+ _header_content_type = []
73
+ header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
74
+
75
+ # form parameters
76
+ form_params = {}
77
+
78
+ # http body (model)
79
+ post_body = nil
80
+
81
+ auth_names = []
82
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
83
+ :header_params => header_params,
84
+ :query_params => query_params,
85
+ :form_params => form_params,
86
+ :body => post_body,
87
+ :auth_names => auth_names,
88
+ :return_type => 'BaseListing')
89
+ if @api_client.config.debugging
90
+ @api_client.config.logger.debug "API called: InventoryApi#get_dealer_active_inventory\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
91
+ end
92
+ return data, status_code, headers
93
+ end
94
+
95
+ # Dealer's historical inventory
96
+ # [v1 : Not Implemented Yet] - Get a dealer's historical inventory
97
+ # @param dealer_id Id representing the dealer to fetch the active inventory for
98
+ # @param [Hash] opts the optional parameters
99
+ # @return [BaseListing]
100
+ def get_dealer_historical_inventory(dealer_id, opts = {})
101
+ data, status_code, headers = get_dealer_historical_inventory_with_http_info(dealer_id, opts)
102
+ return data
103
+ end
104
+
105
+ # Dealer&#39;s historical inventory
106
+ # [v1 : Not Implemented Yet] - Get a dealer&#39;s historical inventory
107
+ # @param dealer_id Id representing the dealer to fetch the active inventory for
108
+ # @param [Hash] opts the optional parameters
109
+ # @return [Array<(BaseListing, Fixnum, Hash)>] BaseListing data, response status code and response headers
110
+ def get_dealer_historical_inventory_with_http_info(dealer_id, opts = {})
111
+ if @api_client.config.debugging
112
+ @api_client.config.logger.debug "Calling API: InventoryApi#get_dealer_historical_inventory ..."
113
+ end
114
+
115
+ # verify the required parameter 'dealer_id' is set
116
+ fail "Missing the required parameter 'dealer_id' when calling get_dealer_historical_inventory" if dealer_id.nil?
117
+
118
+ # resource path
119
+ local_var_path = "/dealer/{dealer_id}/historical/inventory".sub('{format}','json').sub('{' + 'dealer_id' + '}', dealer_id.to_s)
120
+
121
+ # query parameters
122
+ query_params = {}
123
+
124
+ # header parameters
125
+ header_params = {}
126
+
127
+ # HTTP header 'Accept' (if needed)
128
+ _header_accept = ['application/json']
129
+ _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
130
+
131
+ # HTTP header 'Content-Type'
132
+ _header_content_type = []
133
+ header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
134
+
135
+ # form parameters
136
+ form_params = {}
137
+
138
+ # http body (model)
139
+ post_body = nil
140
+
141
+ auth_names = []
142
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
143
+ :header_params => header_params,
144
+ :query_params => query_params,
145
+ :form_params => form_params,
146
+ :body => post_body,
147
+ :auth_names => auth_names,
148
+ :return_type => 'BaseListing')
149
+ if @api_client.config.debugging
150
+ @api_client.config.logger.debug "API called: InventoryApi#get_dealer_historical_inventory\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
151
+ end
152
+ return data, status_code, headers
153
+ end
154
+ end
155
+ end