Class: Cryptopay::AccountListResult
- Inherits:
-
Object
- Object
- Cryptopay::AccountListResult
- Defined in:
- lib/cryptopay/models/account_list_result.rb
Class Method Summary collapse
-
.build_from_hash(data) ⇒ Cryptopay::AccountListResult
Builds the object from hash.
Instance Method Summary collapse
- #data ⇒ Object
-
#initialize(attributes = {}) ⇒ AccountListResult
constructor
Initializes the object.
- #inspect ⇒ Object
-
#invalid_properties ⇒ Object
Show invalid properties with the reasons.
- #meta ⇒ Object
-
#to_hash ⇒ Hash
Returns the object in the form of hash.
-
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid.
Constructor Details
#initialize(attributes = {}) ⇒ AccountListResult
Initializes the object
32 33 34 |
# File 'lib/cryptopay/models/account_list_result.rb', line 32 def initialize(attributes = {}) @attributes = ENCODER.sanitize(attributes) end |
Class Method Details
.build_from_hash(data) ⇒ Cryptopay::AccountListResult
Builds the object from hash
25 26 27 28 |
# File 'lib/cryptopay/models/account_list_result.rb', line 25 def self.build_from_hash(data) attributes = ENCODER.build_from_hash(data) new(attributes) end |
Instance Method Details
#data ⇒ Object
36 37 38 |
# File 'lib/cryptopay/models/account_list_result.rb', line 36 def data @attributes[:data] end |
#inspect ⇒ Object
78 79 80 |
# File 'lib/cryptopay/models/account_list_result.rb', line 78 def inspect "#<#{self.class}:0x#{object_id.to_s(16)}> JSON: " + JSON.pretty_generate(to_hash) end |
#invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 |
# File 'lib/cryptopay/models/account_list_result.rb', line 46 def invalid_properties properties = [] properties.push('invalid value for "data", data cannot be nil.') if data.nil? data&.each_with_index do |item, index| item.invalid_properties.each do |prop| properties.push("invalid value for \"data.#{index}\": #{prop}") end end properties.push('invalid value for "meta", meta cannot be nil.') if .nil? &.invalid_properties&.each do |prop| properties.push("invalid value for \"meta\": #{prop}") end properties end |
#meta ⇒ Object
40 41 42 |
# File 'lib/cryptopay/models/account_list_result.rb', line 40 def @attributes[:meta] end |
#to_hash ⇒ Hash
Returns the object in the form of hash
74 75 76 |
# File 'lib/cryptopay/models/account_list_result.rb', line 74 def to_hash ENCODER.to_hash(@attributes) end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
68 69 70 |
# File 'lib/cryptopay/models/account_list_result.rb', line 68 def valid? invalid_properties.empty? end |