Class: Cadenya::Types::Account
- Inherits:
-
Object
- Object
- Cadenya::Types::Account
- Defined in:
- lib/cadenya/types.rb
Instance Attribute Summary collapse
-
#info ⇒ Object
readonly
Returns the value of attribute info.
-
#metadata ⇒ Object
readonly
Returns the value of attribute metadata.
-
#spec ⇒ Object
readonly
Returns the value of attribute spec.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(metadata: nil, spec: nil, info: nil) ⇒ Account
constructor
A new instance of Account.
- #to_h ⇒ Object
Constructor Details
#initialize(metadata: nil, spec: nil, info: nil) ⇒ Account
Returns a new instance of Account.
198 199 200 201 202 |
# File 'lib/cadenya/types.rb', line 198 def initialize(metadata: nil, spec: nil, info: nil) @metadata = @spec = spec @info = info end |
Instance Attribute Details
#info ⇒ Object (readonly)
Returns the value of attribute info.
196 197 198 |
# File 'lib/cadenya/types.rb', line 196 def info @info end |
#metadata ⇒ Object (readonly)
Returns the value of attribute metadata.
196 197 198 |
# File 'lib/cadenya/types.rb', line 196 def @metadata end |
#spec ⇒ Object (readonly)
Returns the value of attribute spec.
196 197 198 |
# File 'lib/cadenya/types.rb', line 196 def spec @spec end |
Class Method Details
.from_json(data) ⇒ Object
204 205 206 207 208 209 210 |
# File 'lib/cadenya/types.rb', line 204 def self.from_json(data) new( metadata: data["metadata"].nil? ? nil : Types::AccountResourceMetadata.from_json(data["metadata"]), spec: data["spec"].nil? ? nil : Types::AccountSpec.from_json(data["spec"]), info: data["info"].nil? ? nil : Types::AccountInfo.from_json(data["info"]), ) end |