Class: AftershipAPI::EstimatedDeliveryDateApi
- Inherits:
-
Object
- Object
- AftershipAPI::EstimatedDeliveryDateApi
- Defined in:
- lib/aftership-tracking-sdk/api/estimated_delivery_date.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#initialize(api_client = ApiClient.default) ⇒ EstimatedDeliveryDateApi
constructor
A new instance of EstimatedDeliveryDateApi.
- #predict_batch(body:, opts: {}) ⇒ Model::PredictBatchResponse
- #predict_batch_with_http_info(opts: {}) ⇒ Object
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ EstimatedDeliveryDateApi
Returns a new instance of EstimatedDeliveryDateApi.
9 10 11 |
# File 'lib/aftership-tracking-sdk/api/estimated_delivery_date.rb', line 9 def initialize(api_client = ApiClient.default) @api_client = api_client end |
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
7 8 9 |
# File 'lib/aftership-tracking-sdk/api/estimated_delivery_date.rb', line 7 def api_client @api_client end |
Instance Method Details
#predict_batch(body:, opts: {}) ⇒ Model::PredictBatchResponse
19 20 21 22 23 24 25 26 |
# File 'lib/aftership-tracking-sdk/api/estimated_delivery_date.rb', line 19 def predict_batch(body:,opts: {}) if "" != "" body = {:'' => body} end opts[:body] = body data, _status_code, _headers = predict_batch_with_http_info(opts: opts) data end |
#predict_batch_with_http_info(opts: {}) ⇒ Object
28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 |
# File 'lib/aftership-tracking-sdk/api/estimated_delivery_date.rb', line 28 def predict_batch_with_http_info(opts: {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: EstimatedDeliveryDateApi.predict_batch ...' end # resource path local_var_path = "/tracking/2024-10/estimated-delivery-date/predict-batch" method = :'POST' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = 'PredictBatchResponse' = opts.merge( :operation => :"EstimatedDeliveryDateApi.predict_batch", :header_params => header_params, :query_params => query_params, :body => post_body, :return_type => return_type, :response_legacy_tag => "", :is_paging => false ) data, status_code, headers = @api_client.call_api(method, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: EstimatedDeliveryDateApi#predict_batch\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |