Class: ShopExpress::CatalogExport

Inherits:
Base
  • Object
show all
Defined in:
lib/shop_express/catalog_export.rb

Overview

get list of the products from the shop_express

Constant Summary collapse

URL =
'/api/catalog/export'

Constants inherited from Base

Base::STATUS_OK

Constants included from Connection

ShopExpress::Connection::ERROR

Instance Attribute Summary

Attributes inherited from Base

#shop_express

Instance Method Summary collapse

Methods inherited from Base

#initialize

Methods included from Connection

#connection, #mixin_token!, #post

Constructor Details

This class inherits a constructor from ShopExpress::Base

Instance Method Details

#call(limit: 500, offset: 0, display_in_show_case: 'false') ⇒ Object

Parameters:

  • limit (Integer) (defaults to: 500)
  • offset (Integer) (defaults to: 0)
  • display_in_show_case (String) (defaults to: 'false')

    possible values (false, true)



11
12
13
14
15
16
17
18
19
20
# File 'lib/shop_express/catalog_export.rb', line 11

def call(limit: 500, offset: 0, display_in_show_case: 'false')
  request_body = {
    limit: limit,
    offset: offset,
    display_in_showcase: display_in_show_case
  }

  response_body = post(shop_express: shop_express, url: URL, body: request_body, add_token: true)
  parse_response(response_body)
end