Sha256: afdbaadd61c591ea0af267ceab6375e63e803ba3078d2d30a1c2613e513f4420

Contents?: true

Size: 1.87 KB

Versions: 6

Compression:

Stored size: 1.87 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 PaginatedQuotes
    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

6 entries across 6 versions & 1 rubygems

Version Path
agrid-client-0.0.7 lib/agrid_client/models/paginated_quotes.rb
agrid-client-0.0.6 lib/agrid_client/models/paginated_quotes.rb
agrid-client-0.0.5 lib/agrid_client/models/paginated_quotes.rb
agrid-client-0.0.4 lib/agrid_client/models/paginated_quotes.rb
agrid-client-0.0.3 lib/agrid_client/models/paginated_quotes.rb
agrid-client-0.0.2 lib/agrid_client/models/paginated_quotes.rb