Class: IBM::Cloud::SDK::VPC::INSTANCE::Action
- Inherits:
-
Object
- Object
- IBM::Cloud::SDK::VPC::INSTANCE::Action
- Extended by:
- Forwardable
- Defined in:
- lib/ibm/cloud/sdk/vpc/instance/actions.rb
Overview
A base class that wraps the action response.
Instance Attribute Summary collapse
-
#data ⇒ Object
The HTTP response object.
-
#response ⇒ Object
The HTTP response object.
Instance Method Summary collapse
-
#created_at ⇒ DateTime
Return the DateTime the action was created.
-
#initialize(response) ⇒ Action
constructor
A new instance of Action.
Constructor Details
#initialize(response) ⇒ Action
49 50 51 52 53 54 55 56 57 |
# File 'lib/ibm/cloud/sdk/vpc/instance/actions.rb', line 49 def initialize(response) @response = response @data = response.json @keys = i[type force created_at] @deprecated = i[completed_at started_at status id href] clear_deprecated add_inst_vars(@keys) end |
Instance Attribute Details
#data ⇒ Object
The HTTP response object.
68 69 70 |
# File 'lib/ibm/cloud/sdk/vpc/instance/actions.rb', line 68 def data @data end |
#response ⇒ Object
The HTTP response object.
68 69 70 |
# File 'lib/ibm/cloud/sdk/vpc/instance/actions.rb', line 68 def response @response end |
Instance Method Details
#created_at ⇒ DateTime
Return the DateTime the action was created.
61 62 63 64 65 |
# File 'lib/ibm/cloud/sdk/vpc/instance/actions.rb', line 61 def created_at return DateTime.parse(@created_at) if @created_at @created_at end |