Class: Square::Inventory

Inherits:
APIResource show all
Extended by:
APIOperations::List
Defined in:
lib/square/inventory.rb

Overview

Class Method Summary collapse

Methods included from APIOperations::List

list

Methods inherited from APIResource

data_type, endpoint_base, nested_under

Class Method Details

.adjust(variation_id, params = {}) ⇒ Square::DataType

Adjust inventory for a varation.

Parameters:

  • variation_id (String)

    Variation ID.

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

    Params hash. Optional.

Returns:


15
16
17
18
19
20
21
22
23
24
# File 'lib/square/inventory.rb', line 15

def self.adjust(variation_id, params = {})
  response = Square.make_request(
    method: 'POST',
    endpoint: self.generate_endpoint_url(variation_id),
    payload: params
  )

  response = Square.parse_response(response)
  @data_type.new(response)
end