RDC 0.1.6 → 0.1.7
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 +2 -1
- 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: 93422b9776481f697c024ae1eaf7d849a8bc6339b7616e37739c67dd6c3bed09
|
4
|
+
data.tar.gz: b541177f2dc1cfbd2d121c9c6a5929972b8278a20b4d3dc84ec6be9d7edc4465
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c6b1cd69f4e0e816a5011f04a15abb7af5181e3eac6b35d9ad0ec48f0b53dcb1258f9c6f8d2b8c68b7302cb23419d0182f6ae7132e38ce95f44dbd4c5f5c27a0
|
7
|
+
data.tar.gz: ab7733b1fae56ff73a60841858493f8208ce234df6ed071882054e14cedfa84e6c235ddcabc05df95132aa8391f75bd2a12c111d8c7de93a6d5bf65ac0190ba9
|
data/Gemfile.lock
CHANGED
data/lib/RDC/item.rb
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
module RDC
|
4
4
|
class Item
|
5
5
|
attr_accessor :sku, :legacy_sku, :value, :price, :restriction, :restriction_detail,
|
6
|
-
:available_inventory
|
6
|
+
:available_inventory, :item_contract_type
|
7
7
|
|
8
8
|
def initialize(hash_values)
|
9
9
|
@sku = hash_values['ProductSKU']
|
@@ -13,6 +13,7 @@ module RDC
|
|
13
13
|
@restriction = hash_values['ItemRestriction']
|
14
14
|
@restriction_detail = hash_values['ItemRestrictionDetail']
|
15
15
|
@available_inventory = hash_values['ItemAvailableInventory']
|
16
|
+
@item_contract_type = hash_values['ItemContractType']
|
16
17
|
end
|
17
18
|
end
|
18
19
|
end
|
data/lib/RDC/restaurant.rb
CHANGED
@@ -6,7 +6,8 @@ module RDC
|
|
6
6
|
class Restaurant
|
7
7
|
attr_accessor :name, :items, :short_description, :long_description,
|
8
8
|
:online, :address, :image, :id, :communication_media,
|
9
|
-
:recommended_rank, :rating, :cuisines, :additional_attributes
|
9
|
+
:recommended_rank, :rating, :cuisines, :additional_attributes,
|
10
|
+
:secondary_image, :listing_image, :new_restaurant
|
10
11
|
|
11
12
|
def initialize(hash_values)
|
12
13
|
@id = hash_values['LegacyRestaurantId']
|
@@ -22,6 +23,9 @@ module RDC
|
|
22
23
|
@address = hash_values['LocationAddress']
|
23
24
|
@communication_media = hash_values['CommunicationMedia']
|
24
25
|
@image = hash_values.dig('CatalogImagesFullPath', 'MainLogo')
|
26
|
+
@secondary_image = hash_values.dig('CatalogImagesFullPath', 'MicrositeImage1')
|
27
|
+
@listing_image = hash_values.dig('CatalogImagesFullPath', 'ListingsImage')
|
28
|
+
@new_restaurant = hash_values.dig('Dates', 'NewRestaurantAdded') || false
|
25
29
|
@items = Array.wrap(hash_values.dig('Items', 'Item')).collect { |item_hash| RDC::Item.new(item_hash) }
|
26
30
|
end
|
27
31
|
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.7
|
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:
|
12
|
+
date: 2021-01-14 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activesupport
|