Class: Zaikio::Warehouse::Base
- Inherits:
-
Client::Model
- Object
- Client::Model
- Zaikio::Warehouse::Base
show all
- Defined in:
- lib/zaikio/warehouse/base.rb
Overview
Base class for Zaikio Warehouse models
Direct Known Subclasses
CallOffAgreement, Consumption, ConsumptionAnnouncement, ConsumptionRequest, ConsumptionRequestCancelation, ConsumptionRequestTransfer, Contact, FinishedGoods::CallOff, FinishedGoods::CallOff::Address, FinishedGoods::CallOff::LineItem, FinishedGoods::CallOff::Pick, FinishedGoods::Material, ManifestEntry, Material, MaterialManifestEntry, MaterialRequirement, MaterialReservation, MaterialReservationCancelation, MaterialReservationFulfillment, Operation, Organization, Person, SKU, Site, StorageArea, TransferRequest, TransferRequestCancelation, Warehouse, WithdrawalRequest, Workstep
Class Method Summary
collapse
Class Method Details
.disable_http_methods(*disabled_methods) ⇒ Object
18
19
20
|
# File 'lib/zaikio/warehouse/base.rb', line 18
def disable_http_methods(*disabled_methods)
self.allowed_methods -= disabled_methods
end
|
.readonly! ⇒ Object
14
15
16
|
# File 'lib/zaikio/warehouse/base.rb', line 14
def readonly!
self.allowed_methods = %i[get]
end
|
.request(method, *args, **opts) ⇒ Object
22
23
24
25
26
|
# File 'lib/zaikio/warehouse/base.rb', line 22
def request(method, *args, **opts)
raise Zaikio::Error, "HTTP method #{method} is not allowed on #{self}" unless allowed_methods.include?(method)
super
end
|