class ESIClient::GetCorporationsCorporationIdCustomsOffices200Ok
200 ok object
Attributes
Only present if alliance access is allowed
standing_level
and any standing related tax rate only present when this is true
allow_alliance_access
boolean
bad_standing_tax_rate
number
corporation_tax_rate
number
Tax rate for entities with excellent level of standing, only present if this level is allowed, same for all other standing related tax rates
good_standing_tax_rate
number
neutral_standing_tax_rate
number
unique ID of this customs office
reinforce_exit_end
integer
Together with reinforce_exit_end
, marks a 2-hour period where this customs office could exit reinforcement mode during the day after initial attack
Access is allowed only for entities with this level of standing or better
ID of the solar system this customs office is located in
terrible_standing_tax_rate
number
Public Class Methods
Attribute mapping from ruby-style variable name to JSON key.
# File lib/esi_client/models/get_corporations_corporation_id_customs_offices_200_ok.rb, line 83 def self.attribute_map { :'office_id' => :'office_id', :'system_id' => :'system_id', :'reinforce_exit_start' => :'reinforce_exit_start', :'reinforce_exit_end' => :'reinforce_exit_end', :'corporation_tax_rate' => :'corporation_tax_rate', :'allow_alliance_access' => :'allow_alliance_access', :'alliance_tax_rate' => :'alliance_tax_rate', :'allow_access_with_standings' => :'allow_access_with_standings', :'standing_level' => :'standing_level', :'excellent_standing_tax_rate' => :'excellent_standing_tax_rate', :'good_standing_tax_rate' => :'good_standing_tax_rate', :'neutral_standing_tax_rate' => :'neutral_standing_tax_rate', :'bad_standing_tax_rate' => :'bad_standing_tax_rate', :'terrible_standing_tax_rate' => :'terrible_standing_tax_rate' } end
Initializes the object @param [Hash] attributes Model attributes in the form of hash
# File lib/esi_client/models/get_corporations_corporation_id_customs_offices_200_ok.rb, line 124 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?(:'office_id') self.office_id = attributes[:'office_id'] end if attributes.has_key?(:'system_id') self.system_id = attributes[:'system_id'] end if attributes.has_key?(:'reinforce_exit_start') self.reinforce_exit_start = attributes[:'reinforce_exit_start'] end if attributes.has_key?(:'reinforce_exit_end') self.reinforce_exit_end = attributes[:'reinforce_exit_end'] end if attributes.has_key?(:'corporation_tax_rate') self.corporation_tax_rate = attributes[:'corporation_tax_rate'] end if attributes.has_key?(:'allow_alliance_access') self.allow_alliance_access = attributes[:'allow_alliance_access'] end if attributes.has_key?(:'alliance_tax_rate') self.alliance_tax_rate = attributes[:'alliance_tax_rate'] end if attributes.has_key?(:'allow_access_with_standings') self.allow_access_with_standings = attributes[:'allow_access_with_standings'] end if attributes.has_key?(:'standing_level') self.standing_level = attributes[:'standing_level'] end if attributes.has_key?(:'excellent_standing_tax_rate') self.excellent_standing_tax_rate = attributes[:'excellent_standing_tax_rate'] end if attributes.has_key?(:'good_standing_tax_rate') self.good_standing_tax_rate = attributes[:'good_standing_tax_rate'] end if attributes.has_key?(:'neutral_standing_tax_rate') self.neutral_standing_tax_rate = attributes[:'neutral_standing_tax_rate'] end if attributes.has_key?(:'bad_standing_tax_rate') self.bad_standing_tax_rate = attributes[:'bad_standing_tax_rate'] end if attributes.has_key?(:'terrible_standing_tax_rate') self.terrible_standing_tax_rate = attributes[:'terrible_standing_tax_rate'] end end
Attribute type mapping.
# File lib/esi_client/models/get_corporations_corporation_id_customs_offices_200_ok.rb, line 103 def self.swagger_types { :'office_id' => :'Integer', :'system_id' => :'Integer', :'reinforce_exit_start' => :'Integer', :'reinforce_exit_end' => :'Integer', :'corporation_tax_rate' => :'Float', :'allow_alliance_access' => :'BOOLEAN', :'alliance_tax_rate' => :'Float', :'allow_access_with_standings' => :'BOOLEAN', :'standing_level' => :'String', :'excellent_standing_tax_rate' => :'Float', :'good_standing_tax_rate' => :'Float', :'neutral_standing_tax_rate' => :'Float', :'bad_standing_tax_rate' => :'Float', :'terrible_standing_tax_rate' => :'Float' } end
Public Instance Methods
Checks equality by comparing each attribute. @param [Object] Object to be compared
# File lib/esi_client/models/get_corporations_corporation_id_customs_offices_200_ok.rb, line 300 def ==(o) return true if self.equal?(o) self.class == o.class && office_id == o.office_id && system_id == o.system_id && reinforce_exit_start == o.reinforce_exit_start && reinforce_exit_end == o.reinforce_exit_end && corporation_tax_rate == o.corporation_tax_rate && allow_alliance_access == o.allow_alliance_access && alliance_tax_rate == o.alliance_tax_rate && allow_access_with_standings == o.allow_access_with_standings && standing_level == o.standing_level && excellent_standing_tax_rate == o.excellent_standing_tax_rate && good_standing_tax_rate == o.good_standing_tax_rate && neutral_standing_tax_rate == o.neutral_standing_tax_rate && bad_standing_tax_rate == o.bad_standing_tax_rate && terrible_standing_tax_rate == o.terrible_standing_tax_rate end
Deserializes the data based on type @param string type Data type @param string value Value to be deserialized @return [Object] Deserialized data
# File lib/esi_client/models/get_corporations_corporation_id_customs_offices_200_ok.rb, line 355 def _deserialize(type, value) case type.to_sym when :DateTime DateTime.parse(value) when :Date Date.parse(value) when :String value.to_s when :Integer value.to_i when :Float value.to_f when :BOOLEAN if value.to_s =~ /\A(true|t|yes|y|1)\z/i true else false end when :Object # generic object (usually a Hash), return directly value when /\AArray<(?<inner_type>.+)>\z/ inner_type = Regexp.last_match[:inner_type] value.map { |v| _deserialize(inner_type, v) } when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/ k_type = Regexp.last_match[:k_type] v_type = Regexp.last_match[:v_type] {}.tap do |hash| value.each do |k, v| hash[_deserialize(k_type, k)] = _deserialize(v_type, v) end end else # model temp_model = ESIClient.const_get(type).new temp_model.build_from_hash(value) end end
Outputs non-array value in the form of hash For object, use to_hash. Otherwise, just return the value @param [Object] value Any valid value @return [Hash] Returns the value in the form of hash
# File lib/esi_client/models/get_corporations_corporation_id_customs_offices_200_ok.rb, line 421 def _to_hash(value) if value.is_a?(Array) value.compact.map { |v| _to_hash(v) } elsif value.is_a?(Hash) {}.tap do |hash| value.each { |k, v| hash[k] = _to_hash(v) } end elsif value.respond_to? :to_hash value.to_hash else value end end
Builds the object from hash @param [Hash] attributes Model attributes in the form of hash @return [Object] Returns the model itself
# File lib/esi_client/models/get_corporations_corporation_id_customs_offices_200_ok.rb, line 334 def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) self.class.swagger_types.each_pair do |key, type| if type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the the attribute # is documented as an array but the input is not if attributes[self.class.attribute_map[key]].is_a?(Array) self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) end elsif !attributes[self.class.attribute_map[key]].nil? self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) end # or else data not found in attributes(hash), not an issue as the data can be optional end self end
@see the `==` method @param [Object] Object to be compared
# File lib/esi_client/models/get_corporations_corporation_id_customs_offices_200_ok.rb, line 321 def eql?(o) self == o end
Calculates hash code according to all attributes. @return [Fixnum] Hash code
# File lib/esi_client/models/get_corporations_corporation_id_customs_offices_200_ok.rb, line 327 def hash [office_id, system_id, reinforce_exit_start, reinforce_exit_end, corporation_tax_rate, allow_alliance_access, alliance_tax_rate, allow_access_with_standings, standing_level, excellent_standing_tax_rate, good_standing_tax_rate, neutral_standing_tax_rate, bad_standing_tax_rate, terrible_standing_tax_rate].hash end
Show invalid properties with the reasons. Usually used together with valid? @return Array for valid properties with the reasons
# File lib/esi_client/models/get_corporations_corporation_id_customs_offices_200_ok.rb, line 189 def list_invalid_properties invalid_properties = Array.new if @office_id.nil? invalid_properties.push('invalid value for "office_id", office_id cannot be nil.') end if @system_id.nil? invalid_properties.push('invalid value for "system_id", system_id cannot be nil.') end if @reinforce_exit_start.nil? invalid_properties.push('invalid value for "reinforce_exit_start", reinforce_exit_start cannot be nil.') end if @reinforce_exit_start > 23 invalid_properties.push('invalid value for "reinforce_exit_start", must be smaller than or equal to 23.') end if @reinforce_exit_start < 0 invalid_properties.push('invalid value for "reinforce_exit_start", must be greater than or equal to 0.') end if @reinforce_exit_end.nil? invalid_properties.push('invalid value for "reinforce_exit_end", reinforce_exit_end cannot be nil.') end if @reinforce_exit_end > 23 invalid_properties.push('invalid value for "reinforce_exit_end", must be smaller than or equal to 23.') end if @reinforce_exit_end < 0 invalid_properties.push('invalid value for "reinforce_exit_end", must be greater than or equal to 0.') end if @allow_alliance_access.nil? invalid_properties.push('invalid value for "allow_alliance_access", allow_alliance_access cannot be nil.') end if @allow_access_with_standings.nil? invalid_properties.push('invalid value for "allow_access_with_standings", allow_access_with_standings cannot be nil.') end invalid_properties end
Custom attribute writer method with validation @param [Object] reinforce_exit_end
Value to be assigned
# File lib/esi_client/models/get_corporations_corporation_id_customs_offices_200_ok.rb, line 272 def reinforce_exit_end=(reinforce_exit_end) if reinforce_exit_end.nil? fail ArgumentError, 'reinforce_exit_end cannot be nil' end if reinforce_exit_end > 23 fail ArgumentError, 'invalid value for "reinforce_exit_end", must be smaller than or equal to 23.' end if reinforce_exit_end < 0 fail ArgumentError, 'invalid value for "reinforce_exit_end", must be greater than or equal to 0.' end @reinforce_exit_end = reinforce_exit_end end
Custom attribute writer method with validation @param [Object] reinforce_exit_start
Value to be assigned
# File lib/esi_client/models/get_corporations_corporation_id_customs_offices_200_ok.rb, line 254 def reinforce_exit_start=(reinforce_exit_start) if reinforce_exit_start.nil? fail ArgumentError, 'reinforce_exit_start cannot be nil' end if reinforce_exit_start > 23 fail ArgumentError, 'invalid value for "reinforce_exit_start", must be smaller than or equal to 23.' end if reinforce_exit_start < 0 fail ArgumentError, 'invalid value for "reinforce_exit_start", must be greater than or equal to 0.' end @reinforce_exit_start = reinforce_exit_start end
Custom attribute writer method checking allowed values (enum). @param [Object] standing_level
Object to be assigned
# File lib/esi_client/models/get_corporations_corporation_id_customs_offices_200_ok.rb, line 290 def standing_level=(standing_level) validator = EnumAttributeValidator.new('String', ['bad', 'excellent', 'good', 'neutral', 'terrible']) unless validator.valid?(standing_level) fail ArgumentError, 'invalid value for "standing_level", must be one of #{validator.allowable_values}.' end @standing_level = standing_level end
Returns the object in the form of hash @return [Hash] Returns the object in the form of hash
# File lib/esi_client/models/get_corporations_corporation_id_customs_offices_200_ok.rb, line 407 def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| value = self.send(attr) next if value.nil? hash[param] = _to_hash(value) end hash end
Returns the string representation of the object @return [String] String presentation of the object
# File lib/esi_client/models/get_corporations_corporation_id_customs_offices_200_ok.rb, line 395 def to_s to_hash.to_s end
Check to see if the all the properties in the model are valid @return true if the model is valid
# File lib/esi_client/models/get_corporations_corporation_id_customs_offices_200_ok.rb, line 236 def valid? return false if @office_id.nil? return false if @system_id.nil? return false if @reinforce_exit_start.nil? return false if @reinforce_exit_start > 23 return false if @reinforce_exit_start < 0 return false if @reinforce_exit_end.nil? return false if @reinforce_exit_end > 23 return false if @reinforce_exit_end < 0 return false if @allow_alliance_access.nil? return false if @allow_access_with_standings.nil? standing_level_validator = EnumAttributeValidator.new('String', ['bad', 'excellent', 'good', 'neutral', 'terrible']) return false unless standing_level_validator.valid?(@standing_level) true end