Class: VoucherifySdk::ProductCollectionsApi

Inherits:
Object
  • Object
show all
Defined in:
lib/VoucherifySdk/api/product_collections_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ ProductCollectionsApi

Returns a new instance of ProductCollectionsApi.



19
20
21
# File 'lib/VoucherifySdk/api/product_collections_api.rb', line 19

def initialize(api_client = ApiClient.default)
  @api_client = api_client
end

Instance Attribute Details

#api_clientObject

Returns the value of attribute api_client.



17
18
19
# File 'lib/VoucherifySdk/api/product_collections_api.rb', line 17

def api_client
  @api_client
end

Instance Method Details

#create_product_collection(opts = {}) ⇒ ProductCollectionsCreateResponseBody

Create Product Collection This method creates a new product collection.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

Returns:



27
28
29
30
# File 'lib/VoucherifySdk/api/product_collections_api.rb', line 27

def create_product_collection(opts = {})
  data, _status_code, _headers = create_product_collection_with_http_info(opts)
  data
end

#delete_product_collection(product_collection_id, opts = {}) ⇒ nil

Delete Product Collection This method deletes a product collection.

Parameters:

  • product_collection_id (String)

    A unique product collection ID.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (nil)


91
92
93
94
# File 'lib/VoucherifySdk/api/product_collections_api.rb', line 91

def delete_product_collection(product_collection_id, opts = {})
  delete_product_collection_with_http_info(product_collection_id, opts)
  nil
end

#get_product_collection(product_collection_id, opts = {}) ⇒ ProductCollectionsGetResponseBody

Get Product Collection Retrieves the product collection.

Parameters:

  • product_collection_id (String)

    A unique product collection ID.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



152
153
154
155
# File 'lib/VoucherifySdk/api/product_collections_api.rb', line 152

def get_product_collection(product_collection_id, opts = {})
  data, _status_code, _headers = get_product_collection_with_http_info(product_collection_id, opts)
  data
end

#list_product_collections(opts = {}) ⇒ ProductCollectionsListResponseBody

List Product Collections This method returns a list of product collections.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :limit (Integer)

    A limit on the number of objects to be returned. Limit can range between 1 and 100 items.

  • :page (Integer)

    Which page of results to return.

  • :order (ParameterOrder)

    Sorts the results using one of the filtering options, where the dash - preceding a sorting option means sorting in a descending order.

Returns:



217
218
219
220
# File 'lib/VoucherifySdk/api/product_collections_api.rb', line 217

def list_product_collections(opts = {})
  data, _status_code, _headers = list_product_collections_with_http_info(opts)
  data
end

#list_products_in_collection(product_collection_id, opts = {}) ⇒ ProductCollectionsProductsListResponseBody

List Products in Collection Retrieves list of products from a product collection; works for both dynamic and static product collections.

Parameters:

  • product_collection_id (String)

    Unique product collection ID.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :limit (Integer)

    A limit on the number of objects to be returned. Limit can range between 1 and 100 items.

  • :page (Integer)

    Which page of results to return.

  • :order (ParameterOrder)

    Sorts the results using one of the filtering options, where the dash - preceding a sorting option means sorting in a descending order.

  • :starting_after (Time)

    Timestamp representing the date and time to use in starting_after cursor to get more data. Represented in ISO 8601 format.

Returns:



297
298
299
300
# File 'lib/VoucherifySdk/api/product_collections_api.rb', line 297

def list_products_in_collection(product_collection_id, opts = {})
  data, _status_code, _headers = list_products_in_collection_with_http_info(product_collection_id, opts)
  data
end