ultracart_api 3.4.0 → 3.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
 - data/README.md +12 -4
 - data/docs/ConfigurationApi.md +4 -4
 - data/docs/IntegrationLogApi.md +51 -0
 - data/docs/IntegrationLogSummary.md +16 -0
 - data/docs/IntegrationLogSummaryQueryRequest.md +9 -0
 - data/docs/IntegrationLogSummaryQueryResponse.md +12 -0
 - data/docs/RotatingTransactionGatewaysResponse.md +12 -0
 - data/docs/RtgSummary.md +14 -0
 - data/docs/RtgSummaryGateway.md +24 -0
 - data/lib/ultracart_api.rb +6 -0
 - data/lib/ultracart_api/api/configuration_api.rb +6 -6
 - data/lib/ultracart_api/api/integration_log_api.rb +55 -0
 - data/lib/ultracart_api/models/integration_log_summary.rb +256 -0
 - data/lib/ultracart_api/models/integration_log_summary_query_request.rb +195 -0
 - data/lib/ultracart_api/models/integration_log_summary_query_response.rb +223 -0
 - data/lib/ultracart_api/models/rotating_transaction_gateways_response.rb +223 -0
 - data/lib/ultracart_api/models/rtg_summary.rb +240 -0
 - data/lib/ultracart_api/models/rtg_summary_gateway.rb +329 -0
 - data/lib/ultracart_api/version.rb +1 -1
 - metadata +13 -1
 
| 
         @@ -0,0 +1,195 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            =begin
         
     | 
| 
      
 2 
     | 
    
         
            +
            #UltraCart Rest API V2
         
     | 
| 
      
 3 
     | 
    
         
            +
             
     | 
| 
      
 4 
     | 
    
         
            +
            #UltraCart REST API Version 2
         
     | 
| 
      
 5 
     | 
    
         
            +
             
     | 
| 
      
 6 
     | 
    
         
            +
            OpenAPI spec version: 2.0.0
         
     | 
| 
      
 7 
     | 
    
         
            +
            Contact: support@ultracart.com
         
     | 
| 
      
 8 
     | 
    
         
            +
            Generated by: https://github.com/swagger-api/swagger-codegen.git
         
     | 
| 
      
 9 
     | 
    
         
            +
            Swagger Codegen version: 2.4.15-SNAPSHOT
         
     | 
| 
      
 10 
     | 
    
         
            +
             
     | 
| 
      
 11 
     | 
    
         
            +
            =end
         
     | 
| 
      
 12 
     | 
    
         
            +
             
     | 
| 
      
 13 
     | 
    
         
            +
            require 'date'
         
     | 
| 
      
 14 
     | 
    
         
            +
             
     | 
| 
      
 15 
     | 
    
         
            +
            module UltracartClient
         
     | 
| 
      
 16 
     | 
    
         
            +
              class IntegrationLogSummaryQueryRequest
         
     | 
| 
      
 17 
     | 
    
         
            +
                # Log date/time begin
         
     | 
| 
      
 18 
     | 
    
         
            +
                attr_accessor :log_dts_begin
         
     | 
| 
      
 19 
     | 
    
         
            +
             
     | 
| 
      
 20 
     | 
    
         
            +
                # Log date/time end
         
     | 
| 
      
 21 
     | 
    
         
            +
                attr_accessor :log_dts_end
         
     | 
| 
      
 22 
     | 
    
         
            +
             
     | 
| 
      
 23 
     | 
    
         
            +
                # Attribute mapping from ruby-style variable name to JSON key.
         
     | 
| 
      
 24 
     | 
    
         
            +
                def self.attribute_map
         
     | 
| 
      
 25 
     | 
    
         
            +
                  {
         
     | 
| 
      
 26 
     | 
    
         
            +
                    :'log_dts_begin' => :'log_dts_begin',
         
     | 
| 
      
 27 
     | 
    
         
            +
                    :'log_dts_end' => :'log_dts_end'
         
     | 
| 
      
 28 
     | 
    
         
            +
                  }
         
     | 
| 
      
 29 
     | 
    
         
            +
                end
         
     | 
| 
      
 30 
     | 
    
         
            +
             
     | 
| 
      
 31 
     | 
    
         
            +
                # Attribute type mapping.
         
     | 
| 
      
 32 
     | 
    
         
            +
                def self.swagger_types
         
     | 
| 
      
 33 
     | 
    
         
            +
                  {
         
     | 
| 
      
 34 
     | 
    
         
            +
                    :'log_dts_begin' => :'String',
         
     | 
| 
      
 35 
     | 
    
         
            +
                    :'log_dts_end' => :'String'
         
     | 
| 
      
 36 
     | 
    
         
            +
                  }
         
     | 
| 
      
 37 
     | 
    
         
            +
                end
         
     | 
| 
      
 38 
     | 
    
         
            +
             
     | 
| 
      
 39 
     | 
    
         
            +
                # Initializes the object
         
     | 
| 
      
 40 
     | 
    
         
            +
                # @param [Hash] attributes Model attributes in the form of hash
         
     | 
| 
      
 41 
     | 
    
         
            +
                def initialize(attributes = {})
         
     | 
| 
      
 42 
     | 
    
         
            +
                  return unless attributes.is_a?(Hash)
         
     | 
| 
      
 43 
     | 
    
         
            +
             
     | 
| 
      
 44 
     | 
    
         
            +
                  # convert string to symbol for hash key
         
     | 
| 
      
 45 
     | 
    
         
            +
                  attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
         
     | 
| 
      
 46 
     | 
    
         
            +
             
     | 
| 
      
 47 
     | 
    
         
            +
                  if attributes.has_key?(:'log_dts_begin')
         
     | 
| 
      
 48 
     | 
    
         
            +
                    self.log_dts_begin = attributes[:'log_dts_begin']
         
     | 
| 
      
 49 
     | 
    
         
            +
                  end
         
     | 
| 
      
 50 
     | 
    
         
            +
             
     | 
| 
      
 51 
     | 
    
         
            +
                  if attributes.has_key?(:'log_dts_end')
         
     | 
| 
      
 52 
     | 
    
         
            +
                    self.log_dts_end = attributes[:'log_dts_end']
         
     | 
| 
      
 53 
     | 
    
         
            +
                  end
         
     | 
| 
      
 54 
     | 
    
         
            +
                end
         
     | 
| 
      
 55 
     | 
    
         
            +
             
     | 
| 
      
 56 
     | 
    
         
            +
                # Show invalid properties with the reasons. Usually used together with valid?
         
     | 
| 
      
 57 
     | 
    
         
            +
                # @return Array for valid properties with the reasons
         
     | 
| 
      
 58 
     | 
    
         
            +
                def list_invalid_properties
         
     | 
| 
      
 59 
     | 
    
         
            +
                  invalid_properties = Array.new
         
     | 
| 
      
 60 
     | 
    
         
            +
                  invalid_properties
         
     | 
| 
      
 61 
     | 
    
         
            +
                end
         
     | 
| 
      
 62 
     | 
    
         
            +
             
     | 
| 
      
 63 
     | 
    
         
            +
                # Check to see if the all the properties in the model are valid
         
     | 
| 
      
 64 
     | 
    
         
            +
                # @return true if the model is valid
         
     | 
| 
      
 65 
     | 
    
         
            +
                def valid?
         
     | 
| 
      
 66 
     | 
    
         
            +
                  true
         
     | 
| 
      
 67 
     | 
    
         
            +
                end
         
     | 
| 
      
 68 
     | 
    
         
            +
             
     | 
| 
      
 69 
     | 
    
         
            +
                # Checks equality by comparing each attribute.
         
     | 
| 
      
 70 
     | 
    
         
            +
                # @param [Object] Object to be compared
         
     | 
| 
      
 71 
     | 
    
         
            +
                def ==(o)
         
     | 
| 
      
 72 
     | 
    
         
            +
                  return true if self.equal?(o)
         
     | 
| 
      
 73 
     | 
    
         
            +
                  self.class == o.class &&
         
     | 
| 
      
 74 
     | 
    
         
            +
                      log_dts_begin == o.log_dts_begin &&
         
     | 
| 
      
 75 
     | 
    
         
            +
                      log_dts_end == o.log_dts_end
         
     | 
| 
      
 76 
     | 
    
         
            +
                end
         
     | 
| 
      
 77 
     | 
    
         
            +
             
     | 
| 
      
 78 
     | 
    
         
            +
                # @see the `==` method
         
     | 
| 
      
 79 
     | 
    
         
            +
                # @param [Object] Object to be compared
         
     | 
| 
      
 80 
     | 
    
         
            +
                def eql?(o)
         
     | 
| 
      
 81 
     | 
    
         
            +
                  self == o
         
     | 
| 
      
 82 
     | 
    
         
            +
                end
         
     | 
| 
      
 83 
     | 
    
         
            +
             
     | 
| 
      
 84 
     | 
    
         
            +
                # Calculates hash code according to all attributes.
         
     | 
| 
      
 85 
     | 
    
         
            +
                # @return [Fixnum] Hash code
         
     | 
| 
      
 86 
     | 
    
         
            +
                def hash
         
     | 
| 
      
 87 
     | 
    
         
            +
                  [log_dts_begin, log_dts_end].hash
         
     | 
| 
      
 88 
     | 
    
         
            +
                end
         
     | 
| 
      
 89 
     | 
    
         
            +
             
     | 
| 
      
 90 
     | 
    
         
            +
                # Builds the object from hash
         
     | 
| 
      
 91 
     | 
    
         
            +
                # @param [Hash] attributes Model attributes in the form of hash
         
     | 
| 
      
 92 
     | 
    
         
            +
                # @return [Object] Returns the model itself
         
     | 
| 
      
 93 
     | 
    
         
            +
                def build_from_hash(attributes)
         
     | 
| 
      
 94 
     | 
    
         
            +
                  return nil unless attributes.is_a?(Hash)
         
     | 
| 
      
 95 
     | 
    
         
            +
                  self.class.swagger_types.each_pair do |key, type|
         
     | 
| 
      
 96 
     | 
    
         
            +
                    if type =~ /\AArray<(.*)>/i
         
     | 
| 
      
 97 
     | 
    
         
            +
                      # check to ensure the input is an array given that the attribute
         
     | 
| 
      
 98 
     | 
    
         
            +
                      # is documented as an array but the input is not
         
     | 
| 
      
 99 
     | 
    
         
            +
                      if attributes[self.class.attribute_map[key]].is_a?(Array)
         
     | 
| 
      
 100 
     | 
    
         
            +
                        self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
         
     | 
| 
      
 101 
     | 
    
         
            +
                      end
         
     | 
| 
      
 102 
     | 
    
         
            +
                    elsif !attributes[self.class.attribute_map[key]].nil?
         
     | 
| 
      
 103 
     | 
    
         
            +
                      self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
         
     | 
| 
      
 104 
     | 
    
         
            +
                    end # or else data not found in attributes(hash), not an issue as the data can be optional
         
     | 
| 
      
 105 
     | 
    
         
            +
                  end
         
     | 
| 
      
 106 
     | 
    
         
            +
             
     | 
| 
      
 107 
     | 
    
         
            +
                  self
         
     | 
| 
      
 108 
     | 
    
         
            +
                end
         
     | 
| 
      
 109 
     | 
    
         
            +
             
     | 
| 
      
 110 
     | 
    
         
            +
                # Deserializes the data based on type
         
     | 
| 
      
 111 
     | 
    
         
            +
                # @param string type Data type
         
     | 
| 
      
 112 
     | 
    
         
            +
                # @param string value Value to be deserialized
         
     | 
| 
      
 113 
     | 
    
         
            +
                # @return [Object] Deserialized data
         
     | 
| 
      
 114 
     | 
    
         
            +
                def _deserialize(type, value)
         
     | 
| 
      
 115 
     | 
    
         
            +
                  case type.to_sym
         
     | 
| 
      
 116 
     | 
    
         
            +
                  when :DateTime
         
     | 
| 
      
 117 
     | 
    
         
            +
                    DateTime.parse(value)
         
     | 
| 
      
 118 
     | 
    
         
            +
                  when :Date
         
     | 
| 
      
 119 
     | 
    
         
            +
                    Date.parse(value)
         
     | 
| 
      
 120 
     | 
    
         
            +
                  when :String
         
     | 
| 
      
 121 
     | 
    
         
            +
                    value.to_s
         
     | 
| 
      
 122 
     | 
    
         
            +
                  when :Integer
         
     | 
| 
      
 123 
     | 
    
         
            +
                    value.to_i
         
     | 
| 
      
 124 
     | 
    
         
            +
                  when :Float
         
     | 
| 
      
 125 
     | 
    
         
            +
                    value.to_f
         
     | 
| 
      
 126 
     | 
    
         
            +
                  when :BOOLEAN
         
     | 
| 
      
 127 
     | 
    
         
            +
                    if value.to_s =~ /\A(true|t|yes|y|1)\z/i
         
     | 
| 
      
 128 
     | 
    
         
            +
                      true
         
     | 
| 
      
 129 
     | 
    
         
            +
                    else
         
     | 
| 
      
 130 
     | 
    
         
            +
                      false
         
     | 
| 
      
 131 
     | 
    
         
            +
                    end
         
     | 
| 
      
 132 
     | 
    
         
            +
                  when :Object
         
     | 
| 
      
 133 
     | 
    
         
            +
                    # generic object (usually a Hash), return directly
         
     | 
| 
      
 134 
     | 
    
         
            +
                    value
         
     | 
| 
      
 135 
     | 
    
         
            +
                  when /\AArray<(?<inner_type>.+)>\z/
         
     | 
| 
      
 136 
     | 
    
         
            +
                    inner_type = Regexp.last_match[:inner_type]
         
     | 
| 
      
 137 
     | 
    
         
            +
                    value.map { |v| _deserialize(inner_type, v) }
         
     | 
| 
      
 138 
     | 
    
         
            +
                  when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
         
     | 
| 
      
 139 
     | 
    
         
            +
                    k_type = Regexp.last_match[:k_type]
         
     | 
| 
      
 140 
     | 
    
         
            +
                    v_type = Regexp.last_match[:v_type]
         
     | 
| 
      
 141 
     | 
    
         
            +
                    {}.tap do |hash|
         
     | 
| 
      
 142 
     | 
    
         
            +
                      value.each do |k, v|
         
     | 
| 
      
 143 
     | 
    
         
            +
                        hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
         
     | 
| 
      
 144 
     | 
    
         
            +
                      end
         
     | 
| 
      
 145 
     | 
    
         
            +
                    end
         
     | 
| 
      
 146 
     | 
    
         
            +
                  else # model
         
     | 
| 
      
 147 
     | 
    
         
            +
                    temp_model = UltracartClient.const_get(type).new
         
     | 
| 
      
 148 
     | 
    
         
            +
                    temp_model.build_from_hash(value)
         
     | 
| 
      
 149 
     | 
    
         
            +
                  end
         
     | 
| 
      
 150 
     | 
    
         
            +
                end
         
     | 
| 
      
 151 
     | 
    
         
            +
             
     | 
| 
      
 152 
     | 
    
         
            +
                # Returns the string representation of the object
         
     | 
| 
      
 153 
     | 
    
         
            +
                # @return [String] String presentation of the object
         
     | 
| 
      
 154 
     | 
    
         
            +
                def to_s
         
     | 
| 
      
 155 
     | 
    
         
            +
                  to_hash.to_s
         
     | 
| 
      
 156 
     | 
    
         
            +
                end
         
     | 
| 
      
 157 
     | 
    
         
            +
             
     | 
| 
      
 158 
     | 
    
         
            +
                # to_body is an alias to to_hash (backward compatibility)
         
     | 
| 
      
 159 
     | 
    
         
            +
                # @return [Hash] Returns the object in the form of hash
         
     | 
| 
      
 160 
     | 
    
         
            +
                def to_body
         
     | 
| 
      
 161 
     | 
    
         
            +
                  to_hash
         
     | 
| 
      
 162 
     | 
    
         
            +
                end
         
     | 
| 
      
 163 
     | 
    
         
            +
             
     | 
| 
      
 164 
     | 
    
         
            +
                # Returns the object in the form of hash
         
     | 
| 
      
 165 
     | 
    
         
            +
                # @return [Hash] Returns the object in the form of hash
         
     | 
| 
      
 166 
     | 
    
         
            +
                def to_hash
         
     | 
| 
      
 167 
     | 
    
         
            +
                  hash = {}
         
     | 
| 
      
 168 
     | 
    
         
            +
                  self.class.attribute_map.each_pair do |attr, param|
         
     | 
| 
      
 169 
     | 
    
         
            +
                    value = self.send(attr)
         
     | 
| 
      
 170 
     | 
    
         
            +
                    next if value.nil?
         
     | 
| 
      
 171 
     | 
    
         
            +
                    hash[param] = _to_hash(value)
         
     | 
| 
      
 172 
     | 
    
         
            +
                  end
         
     | 
| 
      
 173 
     | 
    
         
            +
                  hash
         
     | 
| 
      
 174 
     | 
    
         
            +
                end
         
     | 
| 
      
 175 
     | 
    
         
            +
             
     | 
| 
      
 176 
     | 
    
         
            +
                # Outputs non-array value in the form of hash
         
     | 
| 
      
 177 
     | 
    
         
            +
                # For object, use to_hash. Otherwise, just return the value
         
     | 
| 
      
 178 
     | 
    
         
            +
                # @param [Object] value Any valid value
         
     | 
| 
      
 179 
     | 
    
         
            +
                # @return [Hash] Returns the value in the form of hash
         
     | 
| 
      
 180 
     | 
    
         
            +
                def _to_hash(value)
         
     | 
| 
      
 181 
     | 
    
         
            +
                  if value.is_a?(Array)
         
     | 
| 
      
 182 
     | 
    
         
            +
                    value.compact.map { |v| _to_hash(v) }
         
     | 
| 
      
 183 
     | 
    
         
            +
                  elsif value.is_a?(Hash)
         
     | 
| 
      
 184 
     | 
    
         
            +
                    {}.tap do |hash|
         
     | 
| 
      
 185 
     | 
    
         
            +
                      value.each { |k, v| hash[k] = _to_hash(v) }
         
     | 
| 
      
 186 
     | 
    
         
            +
                    end
         
     | 
| 
      
 187 
     | 
    
         
            +
                  elsif value.respond_to? :to_hash
         
     | 
| 
      
 188 
     | 
    
         
            +
                    value.to_hash
         
     | 
| 
      
 189 
     | 
    
         
            +
                  else
         
     | 
| 
      
 190 
     | 
    
         
            +
                    value
         
     | 
| 
      
 191 
     | 
    
         
            +
                  end
         
     | 
| 
      
 192 
     | 
    
         
            +
                end
         
     | 
| 
      
 193 
     | 
    
         
            +
             
     | 
| 
      
 194 
     | 
    
         
            +
              end
         
     | 
| 
      
 195 
     | 
    
         
            +
            end
         
     | 
| 
         @@ -0,0 +1,223 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            =begin
         
     | 
| 
      
 2 
     | 
    
         
            +
            #UltraCart Rest API V2
         
     | 
| 
      
 3 
     | 
    
         
            +
             
     | 
| 
      
 4 
     | 
    
         
            +
            #UltraCart REST API Version 2
         
     | 
| 
      
 5 
     | 
    
         
            +
             
     | 
| 
      
 6 
     | 
    
         
            +
            OpenAPI spec version: 2.0.0
         
     | 
| 
      
 7 
     | 
    
         
            +
            Contact: support@ultracart.com
         
     | 
| 
      
 8 
     | 
    
         
            +
            Generated by: https://github.com/swagger-api/swagger-codegen.git
         
     | 
| 
      
 9 
     | 
    
         
            +
            Swagger Codegen version: 2.4.15-SNAPSHOT
         
     | 
| 
      
 10 
     | 
    
         
            +
             
     | 
| 
      
 11 
     | 
    
         
            +
            =end
         
     | 
| 
      
 12 
     | 
    
         
            +
             
     | 
| 
      
 13 
     | 
    
         
            +
            require 'date'
         
     | 
| 
      
 14 
     | 
    
         
            +
             
     | 
| 
      
 15 
     | 
    
         
            +
            module UltracartClient
         
     | 
| 
      
 16 
     | 
    
         
            +
              class IntegrationLogSummaryQueryResponse
         
     | 
| 
      
 17 
     | 
    
         
            +
                attr_accessor :error
         
     | 
| 
      
 18 
     | 
    
         
            +
             
     | 
| 
      
 19 
     | 
    
         
            +
                attr_accessor :integration_log_summaries
         
     | 
| 
      
 20 
     | 
    
         
            +
             
     | 
| 
      
 21 
     | 
    
         
            +
                attr_accessor :metadata
         
     | 
| 
      
 22 
     | 
    
         
            +
             
     | 
| 
      
 23 
     | 
    
         
            +
                # Indicates if API call was successful
         
     | 
| 
      
 24 
     | 
    
         
            +
                attr_accessor :success
         
     | 
| 
      
 25 
     | 
    
         
            +
             
     | 
| 
      
 26 
     | 
    
         
            +
                attr_accessor :warning
         
     | 
| 
      
 27 
     | 
    
         
            +
             
     | 
| 
      
 28 
     | 
    
         
            +
                # Attribute mapping from ruby-style variable name to JSON key.
         
     | 
| 
      
 29 
     | 
    
         
            +
                def self.attribute_map
         
     | 
| 
      
 30 
     | 
    
         
            +
                  {
         
     | 
| 
      
 31 
     | 
    
         
            +
                    :'error' => :'error',
         
     | 
| 
      
 32 
     | 
    
         
            +
                    :'integration_log_summaries' => :'integration_log_summaries',
         
     | 
| 
      
 33 
     | 
    
         
            +
                    :'metadata' => :'metadata',
         
     | 
| 
      
 34 
     | 
    
         
            +
                    :'success' => :'success',
         
     | 
| 
      
 35 
     | 
    
         
            +
                    :'warning' => :'warning'
         
     | 
| 
      
 36 
     | 
    
         
            +
                  }
         
     | 
| 
      
 37 
     | 
    
         
            +
                end
         
     | 
| 
      
 38 
     | 
    
         
            +
             
     | 
| 
      
 39 
     | 
    
         
            +
                # Attribute type mapping.
         
     | 
| 
      
 40 
     | 
    
         
            +
                def self.swagger_types
         
     | 
| 
      
 41 
     | 
    
         
            +
                  {
         
     | 
| 
      
 42 
     | 
    
         
            +
                    :'error' => :'Error',
         
     | 
| 
      
 43 
     | 
    
         
            +
                    :'integration_log_summaries' => :'Array<IntegrationLogSummary>',
         
     | 
| 
      
 44 
     | 
    
         
            +
                    :'metadata' => :'ResponseMetadata',
         
     | 
| 
      
 45 
     | 
    
         
            +
                    :'success' => :'BOOLEAN',
         
     | 
| 
      
 46 
     | 
    
         
            +
                    :'warning' => :'Warning'
         
     | 
| 
      
 47 
     | 
    
         
            +
                  }
         
     | 
| 
      
 48 
     | 
    
         
            +
                end
         
     | 
| 
      
 49 
     | 
    
         
            +
             
     | 
| 
      
 50 
     | 
    
         
            +
                # Initializes the object
         
     | 
| 
      
 51 
     | 
    
         
            +
                # @param [Hash] attributes Model attributes in the form of hash
         
     | 
| 
      
 52 
     | 
    
         
            +
                def initialize(attributes = {})
         
     | 
| 
      
 53 
     | 
    
         
            +
                  return unless attributes.is_a?(Hash)
         
     | 
| 
      
 54 
     | 
    
         
            +
             
     | 
| 
      
 55 
     | 
    
         
            +
                  # convert string to symbol for hash key
         
     | 
| 
      
 56 
     | 
    
         
            +
                  attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
         
     | 
| 
      
 57 
     | 
    
         
            +
             
     | 
| 
      
 58 
     | 
    
         
            +
                  if attributes.has_key?(:'error')
         
     | 
| 
      
 59 
     | 
    
         
            +
                    self.error = attributes[:'error']
         
     | 
| 
      
 60 
     | 
    
         
            +
                  end
         
     | 
| 
      
 61 
     | 
    
         
            +
             
     | 
| 
      
 62 
     | 
    
         
            +
                  if attributes.has_key?(:'integration_log_summaries')
         
     | 
| 
      
 63 
     | 
    
         
            +
                    if (value = attributes[:'integration_log_summaries']).is_a?(Array)
         
     | 
| 
      
 64 
     | 
    
         
            +
                      self.integration_log_summaries = value
         
     | 
| 
      
 65 
     | 
    
         
            +
                    end
         
     | 
| 
      
 66 
     | 
    
         
            +
                  end
         
     | 
| 
      
 67 
     | 
    
         
            +
             
     | 
| 
      
 68 
     | 
    
         
            +
                  if attributes.has_key?(:'metadata')
         
     | 
| 
      
 69 
     | 
    
         
            +
                    self.metadata = attributes[:'metadata']
         
     | 
| 
      
 70 
     | 
    
         
            +
                  end
         
     | 
| 
      
 71 
     | 
    
         
            +
             
     | 
| 
      
 72 
     | 
    
         
            +
                  if attributes.has_key?(:'success')
         
     | 
| 
      
 73 
     | 
    
         
            +
                    self.success = attributes[:'success']
         
     | 
| 
      
 74 
     | 
    
         
            +
                  end
         
     | 
| 
      
 75 
     | 
    
         
            +
             
     | 
| 
      
 76 
     | 
    
         
            +
                  if attributes.has_key?(:'warning')
         
     | 
| 
      
 77 
     | 
    
         
            +
                    self.warning = attributes[:'warning']
         
     | 
| 
      
 78 
     | 
    
         
            +
                  end
         
     | 
| 
      
 79 
     | 
    
         
            +
                end
         
     | 
| 
      
 80 
     | 
    
         
            +
             
     | 
| 
      
 81 
     | 
    
         
            +
                # Show invalid properties with the reasons. Usually used together with valid?
         
     | 
| 
      
 82 
     | 
    
         
            +
                # @return Array for valid properties with the reasons
         
     | 
| 
      
 83 
     | 
    
         
            +
                def list_invalid_properties
         
     | 
| 
      
 84 
     | 
    
         
            +
                  invalid_properties = Array.new
         
     | 
| 
      
 85 
     | 
    
         
            +
                  invalid_properties
         
     | 
| 
      
 86 
     | 
    
         
            +
                end
         
     | 
| 
      
 87 
     | 
    
         
            +
             
     | 
| 
      
 88 
     | 
    
         
            +
                # Check to see if the all the properties in the model are valid
         
     | 
| 
      
 89 
     | 
    
         
            +
                # @return true if the model is valid
         
     | 
| 
      
 90 
     | 
    
         
            +
                def valid?
         
     | 
| 
      
 91 
     | 
    
         
            +
                  true
         
     | 
| 
      
 92 
     | 
    
         
            +
                end
         
     | 
| 
      
 93 
     | 
    
         
            +
             
     | 
| 
      
 94 
     | 
    
         
            +
                # Checks equality by comparing each attribute.
         
     | 
| 
      
 95 
     | 
    
         
            +
                # @param [Object] Object to be compared
         
     | 
| 
      
 96 
     | 
    
         
            +
                def ==(o)
         
     | 
| 
      
 97 
     | 
    
         
            +
                  return true if self.equal?(o)
         
     | 
| 
      
 98 
     | 
    
         
            +
                  self.class == o.class &&
         
     | 
| 
      
 99 
     | 
    
         
            +
                      error == o.error &&
         
     | 
| 
      
 100 
     | 
    
         
            +
                      integration_log_summaries == o.integration_log_summaries &&
         
     | 
| 
      
 101 
     | 
    
         
            +
                      metadata == o.metadata &&
         
     | 
| 
      
 102 
     | 
    
         
            +
                      success == o.success &&
         
     | 
| 
      
 103 
     | 
    
         
            +
                      warning == o.warning
         
     | 
| 
      
 104 
     | 
    
         
            +
                end
         
     | 
| 
      
 105 
     | 
    
         
            +
             
     | 
| 
      
 106 
     | 
    
         
            +
                # @see the `==` method
         
     | 
| 
      
 107 
     | 
    
         
            +
                # @param [Object] Object to be compared
         
     | 
| 
      
 108 
     | 
    
         
            +
                def eql?(o)
         
     | 
| 
      
 109 
     | 
    
         
            +
                  self == o
         
     | 
| 
      
 110 
     | 
    
         
            +
                end
         
     | 
| 
      
 111 
     | 
    
         
            +
             
     | 
| 
      
 112 
     | 
    
         
            +
                # Calculates hash code according to all attributes.
         
     | 
| 
      
 113 
     | 
    
         
            +
                # @return [Fixnum] Hash code
         
     | 
| 
      
 114 
     | 
    
         
            +
                def hash
         
     | 
| 
      
 115 
     | 
    
         
            +
                  [error, integration_log_summaries, metadata, success, warning].hash
         
     | 
| 
      
 116 
     | 
    
         
            +
                end
         
     | 
| 
      
 117 
     | 
    
         
            +
             
     | 
| 
      
 118 
     | 
    
         
            +
                # Builds the object from hash
         
     | 
| 
      
 119 
     | 
    
         
            +
                # @param [Hash] attributes Model attributes in the form of hash
         
     | 
| 
      
 120 
     | 
    
         
            +
                # @return [Object] Returns the model itself
         
     | 
| 
      
 121 
     | 
    
         
            +
                def build_from_hash(attributes)
         
     | 
| 
      
 122 
     | 
    
         
            +
                  return nil unless attributes.is_a?(Hash)
         
     | 
| 
      
 123 
     | 
    
         
            +
                  self.class.swagger_types.each_pair do |key, type|
         
     | 
| 
      
 124 
     | 
    
         
            +
                    if type =~ /\AArray<(.*)>/i
         
     | 
| 
      
 125 
     | 
    
         
            +
                      # check to ensure the input is an array given that the attribute
         
     | 
| 
      
 126 
     | 
    
         
            +
                      # is documented as an array but the input is not
         
     | 
| 
      
 127 
     | 
    
         
            +
                      if attributes[self.class.attribute_map[key]].is_a?(Array)
         
     | 
| 
      
 128 
     | 
    
         
            +
                        self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
         
     | 
| 
      
 129 
     | 
    
         
            +
                      end
         
     | 
| 
      
 130 
     | 
    
         
            +
                    elsif !attributes[self.class.attribute_map[key]].nil?
         
     | 
| 
      
 131 
     | 
    
         
            +
                      self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
         
     | 
| 
      
 132 
     | 
    
         
            +
                    end # or else data not found in attributes(hash), not an issue as the data can be optional
         
     | 
| 
      
 133 
     | 
    
         
            +
                  end
         
     | 
| 
      
 134 
     | 
    
         
            +
             
     | 
| 
      
 135 
     | 
    
         
            +
                  self
         
     | 
| 
      
 136 
     | 
    
         
            +
                end
         
     | 
| 
      
 137 
     | 
    
         
            +
             
     | 
| 
      
 138 
     | 
    
         
            +
                # Deserializes the data based on type
         
     | 
| 
      
 139 
     | 
    
         
            +
                # @param string type Data type
         
     | 
| 
      
 140 
     | 
    
         
            +
                # @param string value Value to be deserialized
         
     | 
| 
      
 141 
     | 
    
         
            +
                # @return [Object] Deserialized data
         
     | 
| 
      
 142 
     | 
    
         
            +
                def _deserialize(type, value)
         
     | 
| 
      
 143 
     | 
    
         
            +
                  case type.to_sym
         
     | 
| 
      
 144 
     | 
    
         
            +
                  when :DateTime
         
     | 
| 
      
 145 
     | 
    
         
            +
                    DateTime.parse(value)
         
     | 
| 
      
 146 
     | 
    
         
            +
                  when :Date
         
     | 
| 
      
 147 
     | 
    
         
            +
                    Date.parse(value)
         
     | 
| 
      
 148 
     | 
    
         
            +
                  when :String
         
     | 
| 
      
 149 
     | 
    
         
            +
                    value.to_s
         
     | 
| 
      
 150 
     | 
    
         
            +
                  when :Integer
         
     | 
| 
      
 151 
     | 
    
         
            +
                    value.to_i
         
     | 
| 
      
 152 
     | 
    
         
            +
                  when :Float
         
     | 
| 
      
 153 
     | 
    
         
            +
                    value.to_f
         
     | 
| 
      
 154 
     | 
    
         
            +
                  when :BOOLEAN
         
     | 
| 
      
 155 
     | 
    
         
            +
                    if value.to_s =~ /\A(true|t|yes|y|1)\z/i
         
     | 
| 
      
 156 
     | 
    
         
            +
                      true
         
     | 
| 
      
 157 
     | 
    
         
            +
                    else
         
     | 
| 
      
 158 
     | 
    
         
            +
                      false
         
     | 
| 
      
 159 
     | 
    
         
            +
                    end
         
     | 
| 
      
 160 
     | 
    
         
            +
                  when :Object
         
     | 
| 
      
 161 
     | 
    
         
            +
                    # generic object (usually a Hash), return directly
         
     | 
| 
      
 162 
     | 
    
         
            +
                    value
         
     | 
| 
      
 163 
     | 
    
         
            +
                  when /\AArray<(?<inner_type>.+)>\z/
         
     | 
| 
      
 164 
     | 
    
         
            +
                    inner_type = Regexp.last_match[:inner_type]
         
     | 
| 
      
 165 
     | 
    
         
            +
                    value.map { |v| _deserialize(inner_type, v) }
         
     | 
| 
      
 166 
     | 
    
         
            +
                  when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
         
     | 
| 
      
 167 
     | 
    
         
            +
                    k_type = Regexp.last_match[:k_type]
         
     | 
| 
      
 168 
     | 
    
         
            +
                    v_type = Regexp.last_match[:v_type]
         
     | 
| 
      
 169 
     | 
    
         
            +
                    {}.tap do |hash|
         
     | 
| 
      
 170 
     | 
    
         
            +
                      value.each do |k, v|
         
     | 
| 
      
 171 
     | 
    
         
            +
                        hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
         
     | 
| 
      
 172 
     | 
    
         
            +
                      end
         
     | 
| 
      
 173 
     | 
    
         
            +
                    end
         
     | 
| 
      
 174 
     | 
    
         
            +
                  else # model
         
     | 
| 
      
 175 
     | 
    
         
            +
                    temp_model = UltracartClient.const_get(type).new
         
     | 
| 
      
 176 
     | 
    
         
            +
                    temp_model.build_from_hash(value)
         
     | 
| 
      
 177 
     | 
    
         
            +
                  end
         
     | 
| 
      
 178 
     | 
    
         
            +
                end
         
     | 
| 
      
 179 
     | 
    
         
            +
             
     | 
| 
      
 180 
     | 
    
         
            +
                # Returns the string representation of the object
         
     | 
| 
      
 181 
     | 
    
         
            +
                # @return [String] String presentation of the object
         
     | 
| 
      
 182 
     | 
    
         
            +
                def to_s
         
     | 
| 
      
 183 
     | 
    
         
            +
                  to_hash.to_s
         
     | 
| 
      
 184 
     | 
    
         
            +
                end
         
     | 
| 
      
 185 
     | 
    
         
            +
             
     | 
| 
      
 186 
     | 
    
         
            +
                # to_body is an alias to to_hash (backward compatibility)
         
     | 
| 
      
 187 
     | 
    
         
            +
                # @return [Hash] Returns the object in the form of hash
         
     | 
| 
      
 188 
     | 
    
         
            +
                def to_body
         
     | 
| 
      
 189 
     | 
    
         
            +
                  to_hash
         
     | 
| 
      
 190 
     | 
    
         
            +
                end
         
     | 
| 
      
 191 
     | 
    
         
            +
             
     | 
| 
      
 192 
     | 
    
         
            +
                # Returns the object in the form of hash
         
     | 
| 
      
 193 
     | 
    
         
            +
                # @return [Hash] Returns the object in the form of hash
         
     | 
| 
      
 194 
     | 
    
         
            +
                def to_hash
         
     | 
| 
      
 195 
     | 
    
         
            +
                  hash = {}
         
     | 
| 
      
 196 
     | 
    
         
            +
                  self.class.attribute_map.each_pair do |attr, param|
         
     | 
| 
      
 197 
     | 
    
         
            +
                    value = self.send(attr)
         
     | 
| 
      
 198 
     | 
    
         
            +
                    next if value.nil?
         
     | 
| 
      
 199 
     | 
    
         
            +
                    hash[param] = _to_hash(value)
         
     | 
| 
      
 200 
     | 
    
         
            +
                  end
         
     | 
| 
      
 201 
     | 
    
         
            +
                  hash
         
     | 
| 
      
 202 
     | 
    
         
            +
                end
         
     | 
| 
      
 203 
     | 
    
         
            +
             
     | 
| 
      
 204 
     | 
    
         
            +
                # Outputs non-array value in the form of hash
         
     | 
| 
      
 205 
     | 
    
         
            +
                # For object, use to_hash. Otherwise, just return the value
         
     | 
| 
      
 206 
     | 
    
         
            +
                # @param [Object] value Any valid value
         
     | 
| 
      
 207 
     | 
    
         
            +
                # @return [Hash] Returns the value in the form of hash
         
     | 
| 
      
 208 
     | 
    
         
            +
                def _to_hash(value)
         
     | 
| 
      
 209 
     | 
    
         
            +
                  if value.is_a?(Array)
         
     | 
| 
      
 210 
     | 
    
         
            +
                    value.compact.map { |v| _to_hash(v) }
         
     | 
| 
      
 211 
     | 
    
         
            +
                  elsif value.is_a?(Hash)
         
     | 
| 
      
 212 
     | 
    
         
            +
                    {}.tap do |hash|
         
     | 
| 
      
 213 
     | 
    
         
            +
                      value.each { |k, v| hash[k] = _to_hash(v) }
         
     | 
| 
      
 214 
     | 
    
         
            +
                    end
         
     | 
| 
      
 215 
     | 
    
         
            +
                  elsif value.respond_to? :to_hash
         
     | 
| 
      
 216 
     | 
    
         
            +
                    value.to_hash
         
     | 
| 
      
 217 
     | 
    
         
            +
                  else
         
     | 
| 
      
 218 
     | 
    
         
            +
                    value
         
     | 
| 
      
 219 
     | 
    
         
            +
                  end
         
     | 
| 
      
 220 
     | 
    
         
            +
                end
         
     | 
| 
      
 221 
     | 
    
         
            +
             
     | 
| 
      
 222 
     | 
    
         
            +
              end
         
     | 
| 
      
 223 
     | 
    
         
            +
            end
         
     | 
| 
         @@ -0,0 +1,223 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            =begin
         
     | 
| 
      
 2 
     | 
    
         
            +
            #UltraCart Rest API V2
         
     | 
| 
      
 3 
     | 
    
         
            +
             
     | 
| 
      
 4 
     | 
    
         
            +
            #UltraCart REST API Version 2
         
     | 
| 
      
 5 
     | 
    
         
            +
             
     | 
| 
      
 6 
     | 
    
         
            +
            OpenAPI spec version: 2.0.0
         
     | 
| 
      
 7 
     | 
    
         
            +
            Contact: support@ultracart.com
         
     | 
| 
      
 8 
     | 
    
         
            +
            Generated by: https://github.com/swagger-api/swagger-codegen.git
         
     | 
| 
      
 9 
     | 
    
         
            +
            Swagger Codegen version: 2.4.15-SNAPSHOT
         
     | 
| 
      
 10 
     | 
    
         
            +
             
     | 
| 
      
 11 
     | 
    
         
            +
            =end
         
     | 
| 
      
 12 
     | 
    
         
            +
             
     | 
| 
      
 13 
     | 
    
         
            +
            require 'date'
         
     | 
| 
      
 14 
     | 
    
         
            +
             
     | 
| 
      
 15 
     | 
    
         
            +
            module UltracartClient
         
     | 
| 
      
 16 
     | 
    
         
            +
              class RotatingTransactionGatewaysResponse
         
     | 
| 
      
 17 
     | 
    
         
            +
                attr_accessor :error
         
     | 
| 
      
 18 
     | 
    
         
            +
             
     | 
| 
      
 19 
     | 
    
         
            +
                attr_accessor :metadata
         
     | 
| 
      
 20 
     | 
    
         
            +
             
     | 
| 
      
 21 
     | 
    
         
            +
                attr_accessor :rotating_gateways
         
     | 
| 
      
 22 
     | 
    
         
            +
             
     | 
| 
      
 23 
     | 
    
         
            +
                # Indicates if API call was successful
         
     | 
| 
      
 24 
     | 
    
         
            +
                attr_accessor :success
         
     | 
| 
      
 25 
     | 
    
         
            +
             
     | 
| 
      
 26 
     | 
    
         
            +
                attr_accessor :warning
         
     | 
| 
      
 27 
     | 
    
         
            +
             
     | 
| 
      
 28 
     | 
    
         
            +
                # Attribute mapping from ruby-style variable name to JSON key.
         
     | 
| 
      
 29 
     | 
    
         
            +
                def self.attribute_map
         
     | 
| 
      
 30 
     | 
    
         
            +
                  {
         
     | 
| 
      
 31 
     | 
    
         
            +
                    :'error' => :'error',
         
     | 
| 
      
 32 
     | 
    
         
            +
                    :'metadata' => :'metadata',
         
     | 
| 
      
 33 
     | 
    
         
            +
                    :'rotating_gateways' => :'rotating_gateways',
         
     | 
| 
      
 34 
     | 
    
         
            +
                    :'success' => :'success',
         
     | 
| 
      
 35 
     | 
    
         
            +
                    :'warning' => :'warning'
         
     | 
| 
      
 36 
     | 
    
         
            +
                  }
         
     | 
| 
      
 37 
     | 
    
         
            +
                end
         
     | 
| 
      
 38 
     | 
    
         
            +
             
     | 
| 
      
 39 
     | 
    
         
            +
                # Attribute type mapping.
         
     | 
| 
      
 40 
     | 
    
         
            +
                def self.swagger_types
         
     | 
| 
      
 41 
     | 
    
         
            +
                  {
         
     | 
| 
      
 42 
     | 
    
         
            +
                    :'error' => :'Error',
         
     | 
| 
      
 43 
     | 
    
         
            +
                    :'metadata' => :'ResponseMetadata',
         
     | 
| 
      
 44 
     | 
    
         
            +
                    :'rotating_gateways' => :'Array<RotatingTransactionGateway>',
         
     | 
| 
      
 45 
     | 
    
         
            +
                    :'success' => :'BOOLEAN',
         
     | 
| 
      
 46 
     | 
    
         
            +
                    :'warning' => :'Warning'
         
     | 
| 
      
 47 
     | 
    
         
            +
                  }
         
     | 
| 
      
 48 
     | 
    
         
            +
                end
         
     | 
| 
      
 49 
     | 
    
         
            +
             
     | 
| 
      
 50 
     | 
    
         
            +
                # Initializes the object
         
     | 
| 
      
 51 
     | 
    
         
            +
                # @param [Hash] attributes Model attributes in the form of hash
         
     | 
| 
      
 52 
     | 
    
         
            +
                def initialize(attributes = {})
         
     | 
| 
      
 53 
     | 
    
         
            +
                  return unless attributes.is_a?(Hash)
         
     | 
| 
      
 54 
     | 
    
         
            +
             
     | 
| 
      
 55 
     | 
    
         
            +
                  # convert string to symbol for hash key
         
     | 
| 
      
 56 
     | 
    
         
            +
                  attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
         
     | 
| 
      
 57 
     | 
    
         
            +
             
     | 
| 
      
 58 
     | 
    
         
            +
                  if attributes.has_key?(:'error')
         
     | 
| 
      
 59 
     | 
    
         
            +
                    self.error = attributes[:'error']
         
     | 
| 
      
 60 
     | 
    
         
            +
                  end
         
     | 
| 
      
 61 
     | 
    
         
            +
             
     | 
| 
      
 62 
     | 
    
         
            +
                  if attributes.has_key?(:'metadata')
         
     | 
| 
      
 63 
     | 
    
         
            +
                    self.metadata = attributes[:'metadata']
         
     | 
| 
      
 64 
     | 
    
         
            +
                  end
         
     | 
| 
      
 65 
     | 
    
         
            +
             
     | 
| 
      
 66 
     | 
    
         
            +
                  if attributes.has_key?(:'rotating_gateways')
         
     | 
| 
      
 67 
     | 
    
         
            +
                    if (value = attributes[:'rotating_gateways']).is_a?(Array)
         
     | 
| 
      
 68 
     | 
    
         
            +
                      self.rotating_gateways = value
         
     | 
| 
      
 69 
     | 
    
         
            +
                    end
         
     | 
| 
      
 70 
     | 
    
         
            +
                  end
         
     | 
| 
      
 71 
     | 
    
         
            +
             
     | 
| 
      
 72 
     | 
    
         
            +
                  if attributes.has_key?(:'success')
         
     | 
| 
      
 73 
     | 
    
         
            +
                    self.success = attributes[:'success']
         
     | 
| 
      
 74 
     | 
    
         
            +
                  end
         
     | 
| 
      
 75 
     | 
    
         
            +
             
     | 
| 
      
 76 
     | 
    
         
            +
                  if attributes.has_key?(:'warning')
         
     | 
| 
      
 77 
     | 
    
         
            +
                    self.warning = attributes[:'warning']
         
     | 
| 
      
 78 
     | 
    
         
            +
                  end
         
     | 
| 
      
 79 
     | 
    
         
            +
                end
         
     | 
| 
      
 80 
     | 
    
         
            +
             
     | 
| 
      
 81 
     | 
    
         
            +
                # Show invalid properties with the reasons. Usually used together with valid?
         
     | 
| 
      
 82 
     | 
    
         
            +
                # @return Array for valid properties with the reasons
         
     | 
| 
      
 83 
     | 
    
         
            +
                def list_invalid_properties
         
     | 
| 
      
 84 
     | 
    
         
            +
                  invalid_properties = Array.new
         
     | 
| 
      
 85 
     | 
    
         
            +
                  invalid_properties
         
     | 
| 
      
 86 
     | 
    
         
            +
                end
         
     | 
| 
      
 87 
     | 
    
         
            +
             
     | 
| 
      
 88 
     | 
    
         
            +
                # Check to see if the all the properties in the model are valid
         
     | 
| 
      
 89 
     | 
    
         
            +
                # @return true if the model is valid
         
     | 
| 
      
 90 
     | 
    
         
            +
                def valid?
         
     | 
| 
      
 91 
     | 
    
         
            +
                  true
         
     | 
| 
      
 92 
     | 
    
         
            +
                end
         
     | 
| 
      
 93 
     | 
    
         
            +
             
     | 
| 
      
 94 
     | 
    
         
            +
                # Checks equality by comparing each attribute.
         
     | 
| 
      
 95 
     | 
    
         
            +
                # @param [Object] Object to be compared
         
     | 
| 
      
 96 
     | 
    
         
            +
                def ==(o)
         
     | 
| 
      
 97 
     | 
    
         
            +
                  return true if self.equal?(o)
         
     | 
| 
      
 98 
     | 
    
         
            +
                  self.class == o.class &&
         
     | 
| 
      
 99 
     | 
    
         
            +
                      error == o.error &&
         
     | 
| 
      
 100 
     | 
    
         
            +
                      metadata == o.metadata &&
         
     | 
| 
      
 101 
     | 
    
         
            +
                      rotating_gateways == o.rotating_gateways &&
         
     | 
| 
      
 102 
     | 
    
         
            +
                      success == o.success &&
         
     | 
| 
      
 103 
     | 
    
         
            +
                      warning == o.warning
         
     | 
| 
      
 104 
     | 
    
         
            +
                end
         
     | 
| 
      
 105 
     | 
    
         
            +
             
     | 
| 
      
 106 
     | 
    
         
            +
                # @see the `==` method
         
     | 
| 
      
 107 
     | 
    
         
            +
                # @param [Object] Object to be compared
         
     | 
| 
      
 108 
     | 
    
         
            +
                def eql?(o)
         
     | 
| 
      
 109 
     | 
    
         
            +
                  self == o
         
     | 
| 
      
 110 
     | 
    
         
            +
                end
         
     | 
| 
      
 111 
     | 
    
         
            +
             
     | 
| 
      
 112 
     | 
    
         
            +
                # Calculates hash code according to all attributes.
         
     | 
| 
      
 113 
     | 
    
         
            +
                # @return [Fixnum] Hash code
         
     | 
| 
      
 114 
     | 
    
         
            +
                def hash
         
     | 
| 
      
 115 
     | 
    
         
            +
                  [error, metadata, rotating_gateways, success, warning].hash
         
     | 
| 
      
 116 
     | 
    
         
            +
                end
         
     | 
| 
      
 117 
     | 
    
         
            +
             
     | 
| 
      
 118 
     | 
    
         
            +
                # Builds the object from hash
         
     | 
| 
      
 119 
     | 
    
         
            +
                # @param [Hash] attributes Model attributes in the form of hash
         
     | 
| 
      
 120 
     | 
    
         
            +
                # @return [Object] Returns the model itself
         
     | 
| 
      
 121 
     | 
    
         
            +
                def build_from_hash(attributes)
         
     | 
| 
      
 122 
     | 
    
         
            +
                  return nil unless attributes.is_a?(Hash)
         
     | 
| 
      
 123 
     | 
    
         
            +
                  self.class.swagger_types.each_pair do |key, type|
         
     | 
| 
      
 124 
     | 
    
         
            +
                    if type =~ /\AArray<(.*)>/i
         
     | 
| 
      
 125 
     | 
    
         
            +
                      # check to ensure the input is an array given that the attribute
         
     | 
| 
      
 126 
     | 
    
         
            +
                      # is documented as an array but the input is not
         
     | 
| 
      
 127 
     | 
    
         
            +
                      if attributes[self.class.attribute_map[key]].is_a?(Array)
         
     | 
| 
      
 128 
     | 
    
         
            +
                        self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
         
     | 
| 
      
 129 
     | 
    
         
            +
                      end
         
     | 
| 
      
 130 
     | 
    
         
            +
                    elsif !attributes[self.class.attribute_map[key]].nil?
         
     | 
| 
      
 131 
     | 
    
         
            +
                      self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
         
     | 
| 
      
 132 
     | 
    
         
            +
                    end # or else data not found in attributes(hash), not an issue as the data can be optional
         
     | 
| 
      
 133 
     | 
    
         
            +
                  end
         
     | 
| 
      
 134 
     | 
    
         
            +
             
     | 
| 
      
 135 
     | 
    
         
            +
                  self
         
     | 
| 
      
 136 
     | 
    
         
            +
                end
         
     | 
| 
      
 137 
     | 
    
         
            +
             
     | 
| 
      
 138 
     | 
    
         
            +
                # Deserializes the data based on type
         
     | 
| 
      
 139 
     | 
    
         
            +
                # @param string type Data type
         
     | 
| 
      
 140 
     | 
    
         
            +
                # @param string value Value to be deserialized
         
     | 
| 
      
 141 
     | 
    
         
            +
                # @return [Object] Deserialized data
         
     | 
| 
      
 142 
     | 
    
         
            +
                def _deserialize(type, value)
         
     | 
| 
      
 143 
     | 
    
         
            +
                  case type.to_sym
         
     | 
| 
      
 144 
     | 
    
         
            +
                  when :DateTime
         
     | 
| 
      
 145 
     | 
    
         
            +
                    DateTime.parse(value)
         
     | 
| 
      
 146 
     | 
    
         
            +
                  when :Date
         
     | 
| 
      
 147 
     | 
    
         
            +
                    Date.parse(value)
         
     | 
| 
      
 148 
     | 
    
         
            +
                  when :String
         
     | 
| 
      
 149 
     | 
    
         
            +
                    value.to_s
         
     | 
| 
      
 150 
     | 
    
         
            +
                  when :Integer
         
     | 
| 
      
 151 
     | 
    
         
            +
                    value.to_i
         
     | 
| 
      
 152 
     | 
    
         
            +
                  when :Float
         
     | 
| 
      
 153 
     | 
    
         
            +
                    value.to_f
         
     | 
| 
      
 154 
     | 
    
         
            +
                  when :BOOLEAN
         
     | 
| 
      
 155 
     | 
    
         
            +
                    if value.to_s =~ /\A(true|t|yes|y|1)\z/i
         
     | 
| 
      
 156 
     | 
    
         
            +
                      true
         
     | 
| 
      
 157 
     | 
    
         
            +
                    else
         
     | 
| 
      
 158 
     | 
    
         
            +
                      false
         
     | 
| 
      
 159 
     | 
    
         
            +
                    end
         
     | 
| 
      
 160 
     | 
    
         
            +
                  when :Object
         
     | 
| 
      
 161 
     | 
    
         
            +
                    # generic object (usually a Hash), return directly
         
     | 
| 
      
 162 
     | 
    
         
            +
                    value
         
     | 
| 
      
 163 
     | 
    
         
            +
                  when /\AArray<(?<inner_type>.+)>\z/
         
     | 
| 
      
 164 
     | 
    
         
            +
                    inner_type = Regexp.last_match[:inner_type]
         
     | 
| 
      
 165 
     | 
    
         
            +
                    value.map { |v| _deserialize(inner_type, v) }
         
     | 
| 
      
 166 
     | 
    
         
            +
                  when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
         
     | 
| 
      
 167 
     | 
    
         
            +
                    k_type = Regexp.last_match[:k_type]
         
     | 
| 
      
 168 
     | 
    
         
            +
                    v_type = Regexp.last_match[:v_type]
         
     | 
| 
      
 169 
     | 
    
         
            +
                    {}.tap do |hash|
         
     | 
| 
      
 170 
     | 
    
         
            +
                      value.each do |k, v|
         
     | 
| 
      
 171 
     | 
    
         
            +
                        hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
         
     | 
| 
      
 172 
     | 
    
         
            +
                      end
         
     | 
| 
      
 173 
     | 
    
         
            +
                    end
         
     | 
| 
      
 174 
     | 
    
         
            +
                  else # model
         
     | 
| 
      
 175 
     | 
    
         
            +
                    temp_model = UltracartClient.const_get(type).new
         
     | 
| 
      
 176 
     | 
    
         
            +
                    temp_model.build_from_hash(value)
         
     | 
| 
      
 177 
     | 
    
         
            +
                  end
         
     | 
| 
      
 178 
     | 
    
         
            +
                end
         
     | 
| 
      
 179 
     | 
    
         
            +
             
     | 
| 
      
 180 
     | 
    
         
            +
                # Returns the string representation of the object
         
     | 
| 
      
 181 
     | 
    
         
            +
                # @return [String] String presentation of the object
         
     | 
| 
      
 182 
     | 
    
         
            +
                def to_s
         
     | 
| 
      
 183 
     | 
    
         
            +
                  to_hash.to_s
         
     | 
| 
      
 184 
     | 
    
         
            +
                end
         
     | 
| 
      
 185 
     | 
    
         
            +
             
     | 
| 
      
 186 
     | 
    
         
            +
                # to_body is an alias to to_hash (backward compatibility)
         
     | 
| 
      
 187 
     | 
    
         
            +
                # @return [Hash] Returns the object in the form of hash
         
     | 
| 
      
 188 
     | 
    
         
            +
                def to_body
         
     | 
| 
      
 189 
     | 
    
         
            +
                  to_hash
         
     | 
| 
      
 190 
     | 
    
         
            +
                end
         
     | 
| 
      
 191 
     | 
    
         
            +
             
     | 
| 
      
 192 
     | 
    
         
            +
                # Returns the object in the form of hash
         
     | 
| 
      
 193 
     | 
    
         
            +
                # @return [Hash] Returns the object in the form of hash
         
     | 
| 
      
 194 
     | 
    
         
            +
                def to_hash
         
     | 
| 
      
 195 
     | 
    
         
            +
                  hash = {}
         
     | 
| 
      
 196 
     | 
    
         
            +
                  self.class.attribute_map.each_pair do |attr, param|
         
     | 
| 
      
 197 
     | 
    
         
            +
                    value = self.send(attr)
         
     | 
| 
      
 198 
     | 
    
         
            +
                    next if value.nil?
         
     | 
| 
      
 199 
     | 
    
         
            +
                    hash[param] = _to_hash(value)
         
     | 
| 
      
 200 
     | 
    
         
            +
                  end
         
     | 
| 
      
 201 
     | 
    
         
            +
                  hash
         
     | 
| 
      
 202 
     | 
    
         
            +
                end
         
     | 
| 
      
 203 
     | 
    
         
            +
             
     | 
| 
      
 204 
     | 
    
         
            +
                # Outputs non-array value in the form of hash
         
     | 
| 
      
 205 
     | 
    
         
            +
                # For object, use to_hash. Otherwise, just return the value
         
     | 
| 
      
 206 
     | 
    
         
            +
                # @param [Object] value Any valid value
         
     | 
| 
      
 207 
     | 
    
         
            +
                # @return [Hash] Returns the value in the form of hash
         
     | 
| 
      
 208 
     | 
    
         
            +
                def _to_hash(value)
         
     | 
| 
      
 209 
     | 
    
         
            +
                  if value.is_a?(Array)
         
     | 
| 
      
 210 
     | 
    
         
            +
                    value.compact.map { |v| _to_hash(v) }
         
     | 
| 
      
 211 
     | 
    
         
            +
                  elsif value.is_a?(Hash)
         
     | 
| 
      
 212 
     | 
    
         
            +
                    {}.tap do |hash|
         
     | 
| 
      
 213 
     | 
    
         
            +
                      value.each { |k, v| hash[k] = _to_hash(v) }
         
     | 
| 
      
 214 
     | 
    
         
            +
                    end
         
     | 
| 
      
 215 
     | 
    
         
            +
                  elsif value.respond_to? :to_hash
         
     | 
| 
      
 216 
     | 
    
         
            +
                    value.to_hash
         
     | 
| 
      
 217 
     | 
    
         
            +
                  else
         
     | 
| 
      
 218 
     | 
    
         
            +
                    value
         
     | 
| 
      
 219 
     | 
    
         
            +
                  end
         
     | 
| 
      
 220 
     | 
    
         
            +
                end
         
     | 
| 
      
 221 
     | 
    
         
            +
             
     | 
| 
      
 222 
     | 
    
         
            +
              end
         
     | 
| 
      
 223 
     | 
    
         
            +
            end
         
     |