Method: TreezorClient::Body5#initialize
- Defined in:
- lib/treezor_client/models/body_5.rb
#initialize(attributes = {}) ⇒ Body5
Initializes the object
83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 |
# File 'lib/treezor_client/models/body_5.rb', line 83 def initialize(attributes = {}) return unless attributes.is_a?(Hash) # convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } if attributes.has_key?(:'name') self.name = attributes[:'name'] end if attributes.has_key?(:'status') self.status = attributes[:'status'] end if attributes.has_key?(:'isWhitelist') self.is_whitelist = attributes[:'isWhitelist'] else self.is_whitelist = true end if attributes.has_key?(:'countries') if (value = attributes[:'countries']).is_a?(Array) self.countries = value end end if attributes.has_key?(:'startDate') self.start_date = attributes[:'startDate'] end if attributes.has_key?(:'fields') if (value = attributes[:'fields']).is_a?(Array) self.fields = value end end end |