Class: Brevo::EcommerceApi
- Inherits:
-
Object
- Object
- Brevo::EcommerceApi
- Defined in:
- lib/brevo/api/ecommerce_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#create_batch_order(order_batch, opts = {}) ⇒ nil
Create orders in batch Create multiple orders at one time instead of one order at a time.
-
#create_batch_order_with_http_info(order_batch, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Create orders in batch Create multiple orders at one time instead of one order at a time.
-
#create_order(order, opts = {}) ⇒ nil
Managing the status of the order Manages the transactional status of the order.
-
#create_order_with_http_info(order, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Managing the status of the order Manages the transactional status of the order.
-
#create_update_batch_category(create_update_batch_category, opts = {}) ⇒ CreateUpdateBatchCategoryModel
Create categories in batch.
-
#create_update_batch_category_with_http_info(create_update_batch_category, opts = {}) ⇒ Array<(CreateUpdateBatchCategoryModel, Fixnum, Hash)>
Create categories in batch.
-
#create_update_batch_products(create_update_batch_products, opts = {}) ⇒ CreateUpdateBatchProductsModel
Create products in batch.
-
#create_update_batch_products_with_http_info(create_update_batch_products, opts = {}) ⇒ Array<(CreateUpdateBatchProductsModel, Fixnum, Hash)>
Create products in batch.
-
#create_update_category(create_update_category, opts = {}) ⇒ CreateCategoryModel
Create/Update a category.
-
#create_update_category_with_http_info(create_update_category, opts = {}) ⇒ Array<(CreateCategoryModel, Fixnum, Hash)>
Create/Update a category.
-
#create_update_product(create_update_product, opts = {}) ⇒ CreateProductModel
Create/Update a product.
-
#create_update_product_with_http_info(create_update_product, opts = {}) ⇒ Array<(CreateProductModel, Fixnum, Hash)>
Create/Update a product.
-
#ecommerce_activate_post(opts = {}) ⇒ nil
Activate the eCommerce app Getting access to Brevo eCommerce.
-
#ecommerce_activate_post_with_http_info(opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Activate the eCommerce app Getting access to Brevo eCommerce.
-
#ecommerce_attribution_metrics_conversion_source_conversion_source_id_get(conversion_source, conversion_source_id, opts = {}) ⇒ nil
Get detailed attribution metrics for a single Brevo campaign.
-
#ecommerce_attribution_metrics_conversion_source_conversion_source_id_get_with_http_info(conversion_source, conversion_source_id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Get detailed attribution metrics for a single Brevo campaign.
-
#ecommerce_attribution_metrics_get(opts = {}) ⇒ nil
Get attribution metrics for one or more Brevo campaigns.
-
#ecommerce_attribution_metrics_get_with_http_info(opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Get attribution metrics for one or more Brevo campaigns.
-
#ecommerce_attribution_products_conversion_source_conversion_source_id_get(conversion_source, conversion_source_id, opts = {}) ⇒ nil
Get attributed product sales for a single Brevo campaign.
-
#ecommerce_attribution_products_conversion_source_conversion_source_id_get_with_http_info(conversion_source, conversion_source_id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Get attributed product sales for a single Brevo campaign.
-
#get_categories(opts = {}) ⇒ GetCategories
Return all your categories.
-
#get_categories_with_http_info(opts = {}) ⇒ Array<(GetCategories, Fixnum, Hash)>
Return all your categories.
-
#get_category_info(id, opts = {}) ⇒ GetCategoryDetails
Get a category details.
-
#get_category_info_with_http_info(id, opts = {}) ⇒ Array<(GetCategoryDetails, Fixnum, Hash)>
Get a category details.
-
#get_orders(opts = {}) ⇒ GetOrders
Get order details Get all the orders.
-
#get_orders_with_http_info(opts = {}) ⇒ Array<(GetOrders, Fixnum, Hash)>
Get order details Get all the orders.
-
#get_product_info(id, opts = {}) ⇒ GetProductDetails
Get a product’s details.
-
#get_product_info_with_http_info(id, opts = {}) ⇒ Array<(GetProductDetails, Fixnum, Hash)>
Get a product's details.
-
#get_products(opts = {}) ⇒ GetProducts
Return all your products.
-
#get_products_with_http_info(opts = {}) ⇒ Array<(GetProducts, Fixnum, Hash)>
Return all your products.
-
#initialize(api_client = ApiClient.default) ⇒ EcommerceApi
constructor
A new instance of EcommerceApi.
-
#setUserAgent(user_agent) ⇒ Object
Set custom user_agent if explicitly passed in api default will still remain Swagger-Codegen/#VERSION/ruby.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ EcommerceApi
Returns a new instance of EcommerceApi.
19 20 21 |
# File 'lib/brevo/api/ecommerce_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/brevo/api/ecommerce_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#create_batch_order(order_batch, opts = {}) ⇒ nil
Create orders in batch Create multiple orders at one time instead of one order at a time
37 38 39 40 |
# File 'lib/brevo/api/ecommerce_api.rb', line 37 def create_batch_order(order_batch, opts = {}) create_batch_order_with_http_info(order_batch, opts) nil end |
#create_batch_order_with_http_info(order_batch, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Create orders in batch Create multiple orders at one time instead of one order at a time
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 |
# File 'lib/brevo/api/ecommerce_api.rb', line 47 def create_batch_order_with_http_info(order_batch, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: EcommerceApi.create_batch_order ...' end # verify the required parameter 'order_batch' is set if @api_client.config.client_side_validation && order_batch.nil? fail ArgumentError, "Missing the required parameter 'order_batch' when calling EcommerceApi.create_batch_order" end # resource path local_var_path = '/orders/status/batch' # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(order_batch) auth_names = ['api-key', 'partner-key'] 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) if @api_client.config.debugging @api_client.config.logger.debug "API called: EcommerceApi#create_batch_order\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#create_order(order, opts = {}) ⇒ nil
Managing the status of the order Manages the transactional status of the order
90 91 92 93 |
# File 'lib/brevo/api/ecommerce_api.rb', line 90 def create_order(order, opts = {}) create_order_with_http_info(order, opts) nil end |
#create_order_with_http_info(order, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Managing the status of the order Manages the transactional status of the order
100 101 102 103 104 105 106 107 108 109 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 |
# File 'lib/brevo/api/ecommerce_api.rb', line 100 def create_order_with_http_info(order, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: EcommerceApi.create_order ...' end # verify the required parameter 'order' is set if @api_client.config.client_side_validation && order.nil? fail ArgumentError, "Missing the required parameter 'order' when calling EcommerceApi.create_order" end # resource path local_var_path = '/orders/status' # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(order) auth_names = ['api-key', 'partner-key'] 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) if @api_client.config.debugging @api_client.config.logger.debug "API called: EcommerceApi#create_order\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#create_update_batch_category(create_update_batch_category, opts = {}) ⇒ CreateUpdateBatchCategoryModel
Create categories in batch
142 143 144 145 |
# File 'lib/brevo/api/ecommerce_api.rb', line 142 def create_update_batch_category(create_update_batch_category, opts = {}) data, _status_code, _headers = create_update_batch_category_with_http_info(create_update_batch_category, opts) data end |
#create_update_batch_category_with_http_info(create_update_batch_category, opts = {}) ⇒ Array<(CreateUpdateBatchCategoryModel, Fixnum, Hash)>
Create categories in batch
151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 |
# File 'lib/brevo/api/ecommerce_api.rb', line 151 def create_update_batch_category_with_http_info(create_update_batch_category, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: EcommerceApi.create_update_batch_category ...' end # verify the required parameter 'create_update_batch_category' is set if @api_client.config.client_side_validation && create_update_batch_category.nil? fail ArgumentError, "Missing the required parameter 'create_update_batch_category' when calling EcommerceApi.create_update_batch_category" end # resource path local_var_path = '/categories/batch' # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(create_update_batch_category) auth_names = ['api-key', 'partner-key'] 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 => 'CreateUpdateBatchCategoryModel') if @api_client.config.debugging @api_client.config.logger.debug "API called: EcommerceApi#create_update_batch_category\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#create_update_batch_products(create_update_batch_products, opts = {}) ⇒ CreateUpdateBatchProductsModel
Create products in batch
194 195 196 197 |
# File 'lib/brevo/api/ecommerce_api.rb', line 194 def create_update_batch_products(create_update_batch_products, opts = {}) data, _status_code, _headers = create_update_batch_products_with_http_info(create_update_batch_products, opts) data end |
#create_update_batch_products_with_http_info(create_update_batch_products, opts = {}) ⇒ Array<(CreateUpdateBatchProductsModel, Fixnum, Hash)>
Create products in batch
203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 |
# File 'lib/brevo/api/ecommerce_api.rb', line 203 def create_update_batch_products_with_http_info(create_update_batch_products, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: EcommerceApi.create_update_batch_products ...' end # verify the required parameter 'create_update_batch_products' is set if @api_client.config.client_side_validation && create_update_batch_products.nil? fail ArgumentError, "Missing the required parameter 'create_update_batch_products' when calling EcommerceApi.create_update_batch_products" end # resource path local_var_path = '/products/batch' # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(create_update_batch_products) auth_names = ['api-key', 'partner-key'] 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 => 'CreateUpdateBatchProductsModel') if @api_client.config.debugging @api_client.config.logger.debug "API called: EcommerceApi#create_update_batch_products\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#create_update_category(create_update_category, opts = {}) ⇒ CreateCategoryModel
Create/Update a category
246 247 248 249 |
# File 'lib/brevo/api/ecommerce_api.rb', line 246 def create_update_category(create_update_category, opts = {}) data, _status_code, _headers = create_update_category_with_http_info(create_update_category, opts) data end |
#create_update_category_with_http_info(create_update_category, opts = {}) ⇒ Array<(CreateCategoryModel, Fixnum, Hash)>
Create/Update a category
255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 |
# File 'lib/brevo/api/ecommerce_api.rb', line 255 def create_update_category_with_http_info(create_update_category, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: EcommerceApi.create_update_category ...' end # verify the required parameter 'create_update_category' is set if @api_client.config.client_side_validation && create_update_category.nil? fail ArgumentError, "Missing the required parameter 'create_update_category' when calling EcommerceApi.create_update_category" end # resource path local_var_path = '/categories' # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(create_update_category) auth_names = ['api-key', 'partner-key'] 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 => 'CreateCategoryModel') if @api_client.config.debugging @api_client.config.logger.debug "API called: EcommerceApi#create_update_category\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#create_update_product(create_update_product, opts = {}) ⇒ CreateProductModel
Create/Update a product
298 299 300 301 |
# File 'lib/brevo/api/ecommerce_api.rb', line 298 def create_update_product(create_update_product, opts = {}) data, _status_code, _headers = create_update_product_with_http_info(create_update_product, opts) data end |
#create_update_product_with_http_info(create_update_product, opts = {}) ⇒ Array<(CreateProductModel, Fixnum, Hash)>
Create/Update a product
307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 |
# File 'lib/brevo/api/ecommerce_api.rb', line 307 def create_update_product_with_http_info(create_update_product, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: EcommerceApi.create_update_product ...' end # verify the required parameter 'create_update_product' is set if @api_client.config.client_side_validation && create_update_product.nil? fail ArgumentError, "Missing the required parameter 'create_update_product' when calling EcommerceApi.create_update_product" end # resource path local_var_path = '/products' # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(create_update_product) auth_names = ['api-key', 'partner-key'] 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 => 'CreateProductModel') if @api_client.config.debugging @api_client.config.logger.debug "API called: EcommerceApi#create_update_product\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#ecommerce_activate_post(opts = {}) ⇒ nil
Activate the eCommerce app Getting access to Brevo eCommerce.
350 351 352 353 |
# File 'lib/brevo/api/ecommerce_api.rb', line 350 def ecommerce_activate_post(opts = {}) ecommerce_activate_post_with_http_info(opts) nil end |
#ecommerce_activate_post_with_http_info(opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Activate the eCommerce app Getting access to Brevo eCommerce.
359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 |
# File 'lib/brevo/api/ecommerce_api.rb', line 359 def ecommerce_activate_post_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: EcommerceApi.ecommerce_activate_post ...' end # resource path local_var_path = '/ecommerce/activate' # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['api-key', 'partner-key'] 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) if @api_client.config.debugging @api_client.config.logger.debug "API called: EcommerceApi#ecommerce_activate_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#ecommerce_attribution_metrics_conversion_source_conversion_source_id_get(conversion_source, conversion_source_id, opts = {}) ⇒ nil
Get detailed attribution metrics for a single Brevo campaign
398 399 400 401 |
# File 'lib/brevo/api/ecommerce_api.rb', line 398 def ecommerce_attribution_metrics_conversion_source_conversion_source_id_get(conversion_source, conversion_source_id, opts = {}) ecommerce_attribution_metrics_conversion_source_conversion_source_id_get_with_http_info(conversion_source, conversion_source_id, opts) nil end |
#ecommerce_attribution_metrics_conversion_source_conversion_source_id_get_with_http_info(conversion_source, conversion_source_id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Get detailed attribution metrics for a single Brevo campaign
408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 |
# File 'lib/brevo/api/ecommerce_api.rb', line 408 def ecommerce_attribution_metrics_conversion_source_conversion_source_id_get_with_http_info(conversion_source, conversion_source_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: EcommerceApi.ecommerce_attribution_metrics_conversion_source_conversion_source_id_get ...' end # verify the required parameter 'conversion_source' is set if @api_client.config.client_side_validation && conversion_source.nil? fail ArgumentError, "Missing the required parameter 'conversion_source' when calling EcommerceApi.ecommerce_attribution_metrics_conversion_source_conversion_source_id_get" end # verify the required parameter 'conversion_source_id' is set if @api_client.config.client_side_validation && conversion_source_id.nil? fail ArgumentError, "Missing the required parameter 'conversion_source_id' when calling EcommerceApi.ecommerce_attribution_metrics_conversion_source_conversion_source_id_get" end # resource path local_var_path = '/ecommerce/attribution/metrics/{conversionSource}/{conversionSourceId}'.sub('{' + 'conversionSource' + '}', conversion_source.to_s).sub('{' + 'conversionSourceId' + '}', conversion_source_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['api-key', 'partner-key'] 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) if @api_client.config.debugging @api_client.config.logger.debug "API called: EcommerceApi#ecommerce_attribution_metrics_conversion_source_conversion_source_id_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#ecommerce_attribution_metrics_get(opts = {}) ⇒ nil
Get attribution metrics for one or more Brevo campaigns
456 457 458 459 |
# File 'lib/brevo/api/ecommerce_api.rb', line 456 def ecommerce_attribution_metrics_get(opts = {}) ecommerce_attribution_metrics_get_with_http_info(opts) nil end |
#ecommerce_attribution_metrics_get_with_http_info(opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Get attribution metrics for one or more Brevo campaigns
467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 |
# File 'lib/brevo/api/ecommerce_api.rb', line 467 def ecommerce_attribution_metrics_get_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: EcommerceApi.ecommerce_attribution_metrics_get ...' end # resource path local_var_path = '/ecommerce/attribution/metrics' # query parameters query_params = {} query_params[:'periodFrom'] = opts[:'period_from'] if !opts[:'period_from'].nil? query_params[:'periodTo'] = opts[:'period_to'] if !opts[:'period_to'].nil? query_params[:'emailCampaignId[]'] = opts[:'email_campaign_id'] if !opts[:'email_campaign_id'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['api-key', 'partner-key'] 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) if @api_client.config.debugging @api_client.config.logger.debug "API called: EcommerceApi#ecommerce_attribution_metrics_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#ecommerce_attribution_products_conversion_source_conversion_source_id_get(conversion_source, conversion_source_id, opts = {}) ⇒ nil
Get attributed product sales for a single Brevo campaign
509 510 511 512 |
# File 'lib/brevo/api/ecommerce_api.rb', line 509 def ecommerce_attribution_products_conversion_source_conversion_source_id_get(conversion_source, conversion_source_id, opts = {}) ecommerce_attribution_products_conversion_source_conversion_source_id_get_with_http_info(conversion_source, conversion_source_id, opts) nil end |
#ecommerce_attribution_products_conversion_source_conversion_source_id_get_with_http_info(conversion_source, conversion_source_id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Get attributed product sales for a single Brevo campaign
519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 |
# File 'lib/brevo/api/ecommerce_api.rb', line 519 def ecommerce_attribution_products_conversion_source_conversion_source_id_get_with_http_info(conversion_source, conversion_source_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: EcommerceApi.ecommerce_attribution_products_conversion_source_conversion_source_id_get ...' end # verify the required parameter 'conversion_source' is set if @api_client.config.client_side_validation && conversion_source.nil? fail ArgumentError, "Missing the required parameter 'conversion_source' when calling EcommerceApi.ecommerce_attribution_products_conversion_source_conversion_source_id_get" end # verify the required parameter 'conversion_source_id' is set if @api_client.config.client_side_validation && conversion_source_id.nil? fail ArgumentError, "Missing the required parameter 'conversion_source_id' when calling EcommerceApi.ecommerce_attribution_products_conversion_source_conversion_source_id_get" end # resource path local_var_path = '/ecommerce/attribution/products/{conversionSource}/{conversionSourceId}'.sub('{' + 'conversionSource' + '}', conversion_source.to_s).sub('{' + 'conversionSourceId' + '}', conversion_source_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['api-key', 'partner-key'] 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) if @api_client.config.debugging @api_client.config.logger.debug "API called: EcommerceApi#ecommerce_attribution_products_conversion_source_conversion_source_id_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_categories(opts = {}) ⇒ GetCategories
Return all your categories
571 572 573 574 |
# File 'lib/brevo/api/ecommerce_api.rb', line 571 def get_categories(opts = {}) data, _status_code, _headers = get_categories_with_http_info(opts) data end |
#get_categories_with_http_info(opts = {}) ⇒ Array<(GetCategories, Fixnum, Hash)>
Return all your categories
586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 |
# File 'lib/brevo/api/ecommerce_api.rb', line 586 def get_categories_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: EcommerceApi.get_categories ...' end if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 100 fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling EcommerceApi.get_categories, must be smaller than or equal to 100.' end if @api_client.config.client_side_validation && opts[:'sort'] && !['asc', 'desc'].include?(opts[:'sort']) fail ArgumentError, 'invalid value for "sort", must be one of asc, desc' end # resource path local_var_path = '/categories' # query parameters query_params = {} query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil? query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil? query_params[:'ids'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'name'] = opts[:'name'] if !opts[:'name'].nil? query_params[:'modifiedSince'] = opts[:'modified_since'] if !opts[:'modified_since'].nil? query_params[:'createdSince'] = opts[:'created_since'] if !opts[:'created_since'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['api-key', 'partner-key'] 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 => 'GetCategories') if @api_client.config.debugging @api_client.config.logger.debug "API called: EcommerceApi#get_categories\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_category_info(id, opts = {}) ⇒ GetCategoryDetails
Get a category details
639 640 641 642 |
# File 'lib/brevo/api/ecommerce_api.rb', line 639 def get_category_info(id, opts = {}) data, _status_code, _headers = get_category_info_with_http_info(id, opts) data end |
#get_category_info_with_http_info(id, opts = {}) ⇒ Array<(GetCategoryDetails, Fixnum, Hash)>
Get a category details
648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 |
# File 'lib/brevo/api/ecommerce_api.rb', line 648 def get_category_info_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: EcommerceApi.get_category_info ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling EcommerceApi.get_category_info" end # resource path local_var_path = '/categories/{id}'.sub('{' + 'id' + '}', id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['api-key', 'partner-key'] 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 => 'GetCategoryDetails') if @api_client.config.debugging @api_client.config.logger.debug "API called: EcommerceApi#get_category_info\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_orders(opts = {}) ⇒ GetOrders
Get order details Get all the orders
696 697 698 699 |
# File 'lib/brevo/api/ecommerce_api.rb', line 696 def get_orders(opts = {}) data, _status_code, _headers = get_orders_with_http_info(opts) data end |
#get_orders_with_http_info(opts = {}) ⇒ Array<(GetOrders, Fixnum, Hash)>
Get order details Get all the orders
710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 |
# File 'lib/brevo/api/ecommerce_api.rb', line 710 def get_orders_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: EcommerceApi.get_orders ...' end if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 100 fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling EcommerceApi.get_orders, must be smaller than or equal to 100.' end if @api_client.config.client_side_validation && opts[:'sort'] && !['asc', 'desc'].include?(opts[:'sort']) fail ArgumentError, 'invalid value for "sort", must be one of asc, desc' end # resource path local_var_path = '/orders' # query parameters query_params = {} query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil? query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil? query_params[:'modifiedSince'] = opts[:'modified_since'] if !opts[:'modified_since'].nil? query_params[:'createdSince'] = opts[:'created_since'] if !opts[:'created_since'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['api-key', 'partner-key'] 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 => 'GetOrders') if @api_client.config.debugging @api_client.config.logger.debug "API called: EcommerceApi#get_orders\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_product_info(id, opts = {}) ⇒ GetProductDetails
Get a product’s details
761 762 763 764 |
# File 'lib/brevo/api/ecommerce_api.rb', line 761 def get_product_info(id, opts = {}) data, _status_code, _headers = get_product_info_with_http_info(id, opts) data end |
#get_product_info_with_http_info(id, opts = {}) ⇒ Array<(GetProductDetails, Fixnum, Hash)>
Get a product's details
770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 |
# File 'lib/brevo/api/ecommerce_api.rb', line 770 def get_product_info_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: EcommerceApi.get_product_info ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling EcommerceApi.get_product_info" end # resource path local_var_path = '/products/{id}'.sub('{' + 'id' + '}', id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['api-key', 'partner-key'] 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 => 'GetProductDetails') if @api_client.config.debugging @api_client.config.logger.debug "API called: EcommerceApi#get_product_info\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_products(opts = {}) ⇒ GetProducts
Return all your products
826 827 828 829 |
# File 'lib/brevo/api/ecommerce_api.rb', line 826 def get_products(opts = {}) data, _status_code, _headers = get_products_with_http_info(opts) data end |
#get_products_with_http_info(opts = {}) ⇒ Array<(GetProducts, Fixnum, Hash)>
Return all your products
848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 |
# File 'lib/brevo/api/ecommerce_api.rb', line 848 def get_products_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: EcommerceApi.get_products ...' end if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 1000 fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling EcommerceApi.get_products, must be smaller than or equal to 1000.' end if @api_client.config.client_side_validation && opts[:'sort'] && !['asc', 'desc'].include?(opts[:'sort']) fail ArgumentError, 'invalid value for "sort", must be one of asc, desc' end # resource path local_var_path = '/products' # query parameters query_params = {} query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil? query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil? query_params[:'ids'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'name'] = opts[:'name'] if !opts[:'name'].nil? query_params[:'price[lte]'] = opts[:'price_lte'] if !opts[:'price_lte'].nil? query_params[:'price[gte]'] = opts[:'price_gte'] if !opts[:'price_gte'].nil? query_params[:'price[lt]'] = opts[:'price_lt'] if !opts[:'price_lt'].nil? query_params[:'price[gt]'] = opts[:'price_gt'] if !opts[:'price_gt'].nil? query_params[:'price[eq]'] = opts[:'price_eq'] if !opts[:'price_eq'].nil? query_params[:'price[ne]'] = opts[:'price_ne'] if !opts[:'price_ne'].nil? query_params[:'categories'] = @api_client.build_collection_param(opts[:'categories'], :csv) if !opts[:'categories'].nil? query_params[:'modifiedSince'] = opts[:'modified_since'] if !opts[:'modified_since'].nil? query_params[:'createdSince'] = opts[:'created_since'] if !opts[:'created_since'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['api-key', 'partner-key'] 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 => 'GetProducts') if @api_client.config.debugging @api_client.config.logger.debug "API called: EcommerceApi#get_products\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#setUserAgent(user_agent) ⇒ Object
Set custom user_agent if explicitly passed in api default will still remain Swagger-Codegen/#VERSION/ruby
25 26 27 28 29 30 |
# File 'lib/brevo/api/ecommerce_api.rb', line 25 def setUserAgent(user_agent) @user_agent = user_agent if user_agent.is_a?(String) && user_agent.downcase.start_with?('brevo_') @api_client.default_headers['User-Agent'] = @user_agent end end |