Class: Seatsio::ForSaleConfig

Inherits:
Object
  • Object
show all
Defined in:
lib/seatsio/domain.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(for_sale, objects = nil, area_places = nil, categories = nil) ⇒ ForSaleConfig

Returns a new instance of ForSaleConfig.



82
83
84
85
86
87
# File 'lib/seatsio/domain.rb', line 82

def initialize(for_sale, objects = nil, area_places = nil, categories = nil)
  @for_sale = for_sale
  @objects = objects
  @area_places = area_places
  @categories = categories
end

Instance Attribute Details

#area_placesObject (readonly)

Returns the value of attribute area_places.



80
81
82
# File 'lib/seatsio/domain.rb', line 80

def area_places
  @area_places
end

#categoriesObject (readonly)

Returns the value of attribute categories.



80
81
82
# File 'lib/seatsio/domain.rb', line 80

def categories
  @categories
end

#for_saleObject (readonly)

Returns the value of attribute for_sale.



80
81
82
# File 'lib/seatsio/domain.rb', line 80

def for_sale
  @for_sale
end

#objectsObject (readonly)

Returns the value of attribute objects.



80
81
82
# File 'lib/seatsio/domain.rb', line 80

def objects
  @objects
end

Class Method Details

.from_json(data) ⇒ Object



89
90
91
92
93
# File 'lib/seatsio/domain.rb', line 89

def self.from_json(data)
  if data
    ForSaleConfig.new(data['forSale'], data['objects'], data['areaPlaces'], data['categories'])
  end
end

Instance Method Details

#==(other) ⇒ Object



95
96
97
98
99
100
101
# File 'lib/seatsio/domain.rb', line 95

def == (other)
  other != nil &&
    for_sale == other.for_sale &&
    objects == other.objects &&
    area_places == other.area_places &&
    categories == other.categories
end