Class: Square::Fee
- Inherits:
-
APIResource
- Object
- APIResource
- Square::Fee
- Extended by:
- APIOperations::Create, APIOperations::Delete, APIOperations::List, APIOperations::Retrieve, APIOperations::Update
- Defined in:
- lib/square/fee.rb
Overview
Class Method Summary collapse
-
.apply(item_id, fee_id, params = {}) ⇒ Square::DataType
Adjust inventory for a varation.
-
.remove(item_id, fee_id, params = {}) ⇒ Square::DataType
Adjust inventory for a varation.
Methods included from APIOperations::List
Methods included from APIOperations::Retrieve
Methods included from APIOperations::Create
Methods included from APIOperations::Update
Methods included from APIOperations::Delete
Methods inherited from APIResource
data_type, endpoint_base, nested_under
Class Method Details
.apply(item_id, fee_id, params = {}) ⇒ Square::DataType
Adjust inventory for a varation.
20 21 22 23 24 25 26 27 28 29 |
# File 'lib/square/fee.rb', line 20 def self.apply(item_id, fee_id, params = {}) response = Square.make_request( method: 'PUT', endpoint: "items/#{item_id}/fees/#{fee_id}", params: params ) response = Square.parse_response(response) Square::DataTypes::Item.new(response) end |
.remove(item_id, fee_id, params = {}) ⇒ Square::DataType
Adjust inventory for a varation.
38 39 40 41 42 43 44 45 46 47 |
# File 'lib/square/fee.rb', line 38 def self.remove(item_id, fee_id, params = {}) response = Square.make_request( method: 'DELETE', endpoint: "items/#{item_id}/fees/#{fee_id}", params: params ) response = Square.parse_response(response) Square::DataTypes::Item.new(response) end |