Sha256: ddb3631ad9c9c534ae0d62e38a4de0c65a0f7e90d48d8bcdb3770aba2c3cf185

Contents?: true

Size: 1.88 KB

Versions: 1

Compression:

Stored size: 1.88 KB

Contents

=begin
Agrid Quotes API



OpenAPI spec version: 1.0

Generated by: https://github.com/swagger-api/swagger-codegen.git


=end

require 'date'
require_relative 'concerns/swagger_model'

module AgridClient
  class InlineResponse2001
    include SwaggerModel

    # Quotes filtered using parameters
    attr_accessor :quotes

    # Number of quotes that match with parameters
    attr_accessor :count

    # PriceRanges are the three points that divide the data set into four equal groups, each group comprising a quarter of the data
    attr_accessor :price_ranges

    # Attribute mapping from ruby-style variable name to JSON key.
    def self.attribute_map
      {
        :'quotes' => :'quotes',
        :'count' => :'count',
        :'price_ranges' => :'price_ranges'
      }
    end

    # Attribute type mapping.
    def self.swagger_types
      {
        :'quotes' => :'Array<Quote>',
        :'count' => :'Integer',
        :'price_ranges' => :'Array<PriceRange>'
      }
    end

    # Initializes the object
    # @param [Hash] attributes Model attributes in the form of hash
    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[:'quotes']
        self.quotes = attributes[:'quotes']
      end
      if attributes[:'count']
        self.count = attributes[:'count']
      end
      if attributes[:'price_ranges']
        if (value = attributes[:'price_ranges']).is_a?(Array)
          self.price_ranges = value
        end
      end
    end

    # Checks equality by comparing each attribute.
    # @param [Object] Object to be compared
    def ==(o)
      return true if self.equal?(o)
      self.class == o.class &&
          quotes == o.quotes &&
          count == o.count &&
          price_ranges == o.price_ranges
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
agrid-client-0.0.1 lib/agrid_client/models/inline_response_200_1.rb