Class: Vend::Register
- Inherits:
-
RemoteResource
- Object
- Resource
- RemoteResource
- Vend::Register
- Defined in:
- lib/vend/resources/register.rb
Instance Attribute Summary
Attributes inherited from RemoteResource
Attributes inherited from Resource
Instance Method Summary collapse
-
#close! ⇒ Object
Close register.
-
#open! ⇒ Object
Open register.
Methods inherited from RemoteResource
Methods included from Paths
#close_path, #destroy_path, included, #open_path, #resource_path, #show_path, #update_path
Methods included from DeclarativeSetters
Methods inherited from Resource
#initialize, #initialize_virtus, #set_attributes, #set_attributes_virtus
Constructor Details
This class inherits a constructor from Vend::Resource
Instance Method Details
#close! ⇒ Object
Close register
10 11 12 13 14 15 16 |
# File 'lib/vend/resources/register.rb', line 10 def close! self.attributes = store.post( path: close_path, status: 200 ).data self end |
#open! ⇒ Object
Open register
19 20 21 22 23 24 25 |
# File 'lib/vend/resources/register.rb', line 19 def open! self.attributes = store.post( path: open_path, status: 200 ).data self end |