RDC 0.1.3 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/RDC/item.rb +3 -2
- data/lib/RDC/restaurant.rb +5 -1
- data/lib/RDC/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e936f5283b222795b69afa3c80d65edbaeb7e3bbc86fbdc097bf0aaae53b93ef
|
4
|
+
data.tar.gz: 63ac56ea67da9cd07a1f237bb484c1a18502ef57fbd6746d9ae49beb3ab0bb00
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e029ad903444d251fe4bd3e2587986ace99a27bf44b202fd665220eb8c3fb45d66fb2cc3391d530f898c2a3ec3b492314be9b4335993425b302d9ea09773c0f3
|
7
|
+
data.tar.gz: 22ebe77b744fefdbf0bf16a729ac4cfc4c0e33ce75597f61ad84e3789d6741bcd8ec35c53453d56bd8d36f8ac2a468770dda3d9afb6df326c0d87407866a54a9
|
data/Gemfile.lock
CHANGED
data/lib/RDC/item.rb
CHANGED
@@ -2,16 +2,17 @@
|
|
2
2
|
|
3
3
|
module RDC
|
4
4
|
class Item
|
5
|
-
attr_accessor :sku, :legacy_sku, :value, :price, :restriction, :restriction_detail
|
5
|
+
attr_accessor :sku, :legacy_sku, :value, :price, :restriction, :restriction_detail,
|
6
|
+
:available_inventory
|
6
7
|
|
7
8
|
def initialize(hash_values)
|
8
|
-
puts "Hash Values :: #{hash_values}"
|
9
9
|
@sku = hash_values['ProductSKU']
|
10
10
|
@legacy_sku = hash_values['LegacyProductSKU']
|
11
11
|
@value = hash_values['ItemValue']
|
12
12
|
@price = hash_values['ItemPrice']
|
13
13
|
@restriction = hash_values['ItemRestriction']
|
14
14
|
@restriction_detail = hash_values['ItemRestrictionDetail']
|
15
|
+
@available_inventory = hash_values['ItemAvailableInventory']
|
15
16
|
end
|
16
17
|
end
|
17
18
|
end
|
data/lib/RDC/restaurant.rb
CHANGED
@@ -5,7 +5,8 @@ require_relative 'item'
|
|
5
5
|
module RDC
|
6
6
|
class Restaurant
|
7
7
|
attr_accessor :name, :items, :short_description, :long_description,
|
8
|
-
:online, :address, :image, :id
|
8
|
+
:online, :address, :image, :id, :communication_media,
|
9
|
+
:recommended_rank, :rating
|
9
10
|
|
10
11
|
def initialize(hash_values)
|
11
12
|
@id = hash_values['LegacyRestaurantId']
|
@@ -13,8 +14,11 @@ module RDC
|
|
13
14
|
@short_description = hash_values['ShortDescription']
|
14
15
|
@long_description = hash_values['LongDescription']
|
15
16
|
@online = hash_values['OnlineReservation']
|
17
|
+
@recommended_rank = hash_values['RecommendedRank']
|
18
|
+
@rating = hash_values['Rating']
|
16
19
|
|
17
20
|
@address = hash_values['LocationAddress']
|
21
|
+
@communication_media = hash_values['CommunicationMedia']
|
18
22
|
@image = hash_values.dig('CatalogImagesFullPath', 'MainLogo')
|
19
23
|
@items = Array.wrap(hash_values.dig('Items', 'Item')).collect { |item_hash| RDC::Item.new(item_hash) }
|
20
24
|
end
|
data/lib/RDC/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: RDC
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- davidrichey
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: exe
|
11
11
|
cert_chain: []
|
12
|
-
date: 2020-12-
|
12
|
+
date: 2020-12-16 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activesupport
|