RDC 0.1.3 → 0.1.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f852867ecebeb1a86b0c8a91a7c2f4a3d637b30767d919cba6d578ed89d77a4f
4
- data.tar.gz: a82a6beb5364f4f8c4224a8494f775a0363e4c299c0a82461d2e6e338f2da290
3
+ metadata.gz: d5e0ebf0eae847eed19c9288de8eca2b0597cf37574034642f634d616d22fb4c
4
+ data.tar.gz: 9e86822b647d9dbe384113d8797992f570d46e7ef7e5e174a9a331b51c27beca
5
5
  SHA512:
6
- metadata.gz: d014649ea7c22cebd3a00cbfe4d4c346fc9c717d89debe169d798b7c31d1ed542ed1c6e0049a3753645faf908d2cf08ad9ebae4268481e214c311af9c0ff9b6e
7
- data.tar.gz: 5b9626d8490497f1da0dc87219abd0b570103baec86fa61af533c1fd6a3a72ba9051434340df35f16bba2df70ad17e75aa8e21655be740b66e2cd7e5aeabc0f5
6
+ metadata.gz: 69f6bc818f5697bfbe284e458fae908af44051ff749573442f7d0ca7e223e2f59bbd1b38c92176c49a606ec20e3f249424c9bfa25d686d3c80bd0f1b2345e392
7
+ data.tar.gz: 7f2adcafe024b85ea0cc767f3fe9be98aa808fd1921a6c1a03143b442bdaa5ce5af9e69fbc3bba647ec2f67fd98777a2586e9cb654ff8b4e7b7a24e4da0a908a
data/Gemfile.lock CHANGED
@@ -1,8 +1,8 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- RDC (0.1.3)
5
- activesupport (= 5.2.3)
4
+ RDC (0.1.8)
5
+ activesupport
6
6
  net-sftp (= 3.0.0)
7
7
  rubyzip
8
8
 
data/RDC.gemspec CHANGED
@@ -28,7 +28,7 @@ Gem::Specification.new do |spec|
28
28
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
29
29
  spec.require_paths = ['lib']
30
30
 
31
- spec.add_dependency 'activesupport', '5.2.3'
31
+ spec.add_dependency 'activesupport'
32
32
  spec.add_dependency 'net-sftp', '3.0.0'
33
33
  spec.add_dependency 'rubyzip'
34
34
  end
data/lib/RDC/item.rb CHANGED
@@ -2,16 +2,18 @@
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, :item_contract_type
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']
16
+ @item_contract_type = hash_values['ItemContractType']
15
17
  end
16
18
  end
17
19
  end
data/lib/RDC/request.rb CHANGED
@@ -12,9 +12,9 @@ module RDC
12
12
 
13
13
  def base_url
14
14
  if RDC.environment == 'production'
15
- 'http://connect.restaurant.com/api'.freeze
15
+ 'https://connect.restaurant.com/api'
16
16
  else
17
- 'https://dev-connect.restaurant.com/api'.freeze
17
+ 'https://dev-connect.restaurant.com/api'
18
18
  end
19
19
  end
20
20
 
@@ -5,7 +5,9 @@ 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, :cuisines, :additional_attributes,
10
+ :secondary_image, :listing_image, :new_restaurant
9
11
 
10
12
  def initialize(hash_values)
11
13
  @id = hash_values['LegacyRestaurantId']
@@ -13,9 +15,17 @@ module RDC
13
15
  @short_description = hash_values['ShortDescription']
14
16
  @long_description = hash_values['LongDescription']
15
17
  @online = hash_values['OnlineReservation']
18
+ @recommended_rank = hash_values['RecommendedRank']
19
+ @rating = hash_values['Rating']
20
+ @cuisines = hash_values['Cuisine']
21
+ @additional_attributes = hash_values['Attributes']
16
22
 
17
23
  @address = hash_values['LocationAddress']
24
+ @communication_media = hash_values['CommunicationMedia']
18
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
19
29
  @items = Array.wrap(hash_values.dig('Items', 'Item')).collect { |item_hash| RDC::Item.new(item_hash) }
20
30
  end
21
31
  end
data/lib/RDC/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module RDC
2
- VERSION = "0.1.3"
2
+ VERSION = '0.1.8'
3
3
  end
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.3
4
+ version: 0.1.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - davidrichey
@@ -9,22 +9,22 @@ authors:
9
9
  autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2020-12-15 00:00:00.000000000 Z
12
+ date: 2021-06-08 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activesupport
16
16
  requirement: !ruby/object:Gem::Requirement
17
17
  requirements:
18
- - - '='
18
+ - - ">="
19
19
  - !ruby/object:Gem::Version
20
- version: 5.2.3
20
+ version: '0'
21
21
  type: :runtime
22
22
  prerelease: false
23
23
  version_requirements: !ruby/object:Gem::Requirement
24
24
  requirements:
25
- - - '='
25
+ - - ">="
26
26
  - !ruby/object:Gem::Version
27
- version: 5.2.3
27
+ version: '0'
28
28
  - !ruby/object:Gem::Dependency
29
29
  name: net-sftp
30
30
  requirement: !ruby/object:Gem::Requirement