Class: Imis::Panel::Vsc
- Inherits:
-
Object
- Object
- Imis::Panel::Vsc
- Defined in:
- lib/imis/panel/vsc.rb
Constant Summary collapse
- BUSINESS_OBJECT =
'ABC_ASC_Vessel_Safety_Checks'
Instance Attribute Summary collapse
-
#api ⇒ Object
readonly
Returns the value of attribute api.
Instance Method Summary collapse
- #create(data) ⇒ Object
- #destroy(ordinal) ⇒ Object
- #get(ordinal) ⇒ Object
-
#initialize(api = nil) ⇒ Vsc
constructor
A new instance of Vsc.
- #update(data) ⇒ Object
Constructor Details
Instance Attribute Details
#api ⇒ Object (readonly)
Returns the value of attribute api.
8 9 10 |
# File 'lib/imis/panel/vsc.rb', line 8 def api @api end |
Instance Method Details
#create(data) ⇒ Object
18 19 20 |
# File 'lib/imis/panel/vsc.rb', line 18 def create(data) api.post(BUSINESS_OBJECT, payload(data), url_id: '') end |
#destroy(ordinal) ⇒ Object
26 27 28 |
# File 'lib/imis/panel/vsc.rb', line 26 def destroy(ordinal) api.delete(BUSINESS_OBJECT, url_id: "~#{api.imis_id}|#{ordinal}") end |
#get(ordinal) ⇒ Object
14 15 16 |
# File 'lib/imis/panel/vsc.rb', line 14 def get(ordinal) api.get(BUSINESS_OBJECT, url_id: "~#{api.imis_id}|#{ordinal}") end |
#update(data) ⇒ Object
22 23 24 |
# File 'lib/imis/panel/vsc.rb', line 22 def update(data) api.put(BUSINESS_OBJECT, payload(data), url_id: "~#{api.imis_id}|#{data[:ordinal]}") end |