Class: SwaggerClient::InventoryApi
- Inherits:
-
Object
- Object
- SwaggerClient::InventoryApi
- Defined in:
- lib/swagger_client/api/inventory_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#get_dealer_active_inventory(api_key, dealer_id, opts = {}) ⇒ BaseListing
Dealer inventory Get a dealer’s currently active inventory.
-
#get_dealer_active_inventory_with_http_info(api_key, dealer_id, opts = {}) ⇒ Array<(BaseListing, Fixnum, Hash)>
Dealer inventory Get a dealer's currently active inventory.
-
#get_dealer_historical_inventory(dealer_id, opts = {}) ⇒ BaseListing
Dealer’s historical inventory [v1 : Not Implemented Yet] - Get a dealer’s historical inventory.
-
#get_dealer_historical_inventory_with_http_info(dealer_id, opts = {}) ⇒ Array<(BaseListing, Fixnum, Hash)>
Dealer's historical inventory [v1 : Not Implemented Yet] - Get a dealer's historical inventory.
-
#initialize(api_client = ApiClient.default) ⇒ InventoryApi
constructor
A new instance of InventoryApi.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ InventoryApi
Returns a new instance of InventoryApi.
19 20 21 |
# File 'lib/swagger_client/api/inventory_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/swagger_client/api/inventory_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#get_dealer_active_inventory(api_key, dealer_id, opts = {}) ⇒ BaseListing
Dealer inventory Get a dealer’s currently active inventory
31 32 33 34 |
# File 'lib/swagger_client/api/inventory_api.rb', line 31 def get_dealer_active_inventory(api_key, dealer_id, opts = {}) data, status_code, headers = get_dealer_active_inventory_with_http_info(api_key, dealer_id, opts) return data end |
#get_dealer_active_inventory_with_http_info(api_key, dealer_id, opts = {}) ⇒ Array<(BaseListing, Fixnum, Hash)>
Dealer inventory Get a dealer's currently active inventory
44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 |
# File 'lib/swagger_client/api/inventory_api.rb', line 44 def get_dealer_active_inventory_with_http_info(api_key, dealer_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: InventoryApi#get_dealer_active_inventory ..." end # verify the required parameter 'api_key' is set fail "Missing the required parameter 'api_key' when calling get_dealer_active_inventory" if api_key.nil? # verify the required parameter 'dealer_id' is set fail "Missing the required parameter 'dealer_id' when calling get_dealer_active_inventory" if dealer_id.nil? # resource path local_var_path = "/dealer/{dealer_id}/active/inventory".sub('{format}','json').sub('{' + 'dealer_id' + '}', dealer_id.to_s) # query parameters query_params = {} query_params[:'api_key'] = api_key query_params[:'rows'] = opts[:'rows'] if opts[:'rows'] query_params[:'start'] = opts[:'start'] if opts[:'start'] # header parameters header_params = {} # HTTP header 'Accept' (if needed) _header_accept = ['application/json'] _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result # HTTP header 'Content-Type' _header_content_type = [] header_params['Content-Type'] = @api_client.select_header_content_type(_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 => 'BaseListing') if @api_client.config.debugging @api_client.config.logger.debug "API called: InventoryApi#get_dealer_active_inventory\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_dealer_historical_inventory(dealer_id, opts = {}) ⇒ BaseListing
Dealer’s historical inventory
- v1 : Not Implemented Yet
-
Get a dealer’s historical inventory
-
100 101 102 103 |
# File 'lib/swagger_client/api/inventory_api.rb', line 100 def get_dealer_historical_inventory(dealer_id, opts = {}) data, status_code, headers = get_dealer_historical_inventory_with_http_info(dealer_id, opts) return data end |
#get_dealer_historical_inventory_with_http_info(dealer_id, opts = {}) ⇒ Array<(BaseListing, Fixnum, Hash)>
Dealer's historical inventory
- v1 : Not Implemented Yet
-
Get a dealer's historical inventory
-
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 151 152 153 |
# File 'lib/swagger_client/api/inventory_api.rb', line 110 def get_dealer_historical_inventory_with_http_info(dealer_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: InventoryApi#get_dealer_historical_inventory ..." end # verify the required parameter 'dealer_id' is set fail "Missing the required parameter 'dealer_id' when calling get_dealer_historical_inventory" if dealer_id.nil? # resource path local_var_path = "/dealer/{dealer_id}/historical/inventory".sub('{format}','json').sub('{' + 'dealer_id' + '}', dealer_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) _header_accept = ['application/json'] _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result # HTTP header 'Content-Type' _header_content_type = [] header_params['Content-Type'] = @api_client.select_header_content_type(_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 => 'BaseListing') if @api_client.config.debugging @api_client.config.logger.debug "API called: InventoryApi#get_dealer_historical_inventory\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |