tosuto 0.4.2 → 0.4.3

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: e5fb38713a7a05d0cb70b635852e7e1da602a05c6a9d8c5c7ad24580ce2081bf
4
- data.tar.gz: b869ffbc6334b3b8e72a544943818650c7b8afc53a0fdb7fa579191a0a6e4868
3
+ metadata.gz: 65961f5a798b7c01bde52c6c3b02ae75fecefde2912342750e6bca9394c360d4
4
+ data.tar.gz: be149610b9018f33844d7bb2680d2bb50300f07dde80f37d531dcc75b31f857b
5
5
  SHA512:
6
- metadata.gz: ef224d74f269376d835a8ada4d75d1b728d6dc8971fd7fcb5a64dc4a30bffc39799c40926a7ce815d8941012cb4154281e035f5736003037797d1039e280602c
7
- data.tar.gz: 3154c29c235d1890fdb7c25f6c0b66c5abab9f89a14b32e0839b3bfe0d0bc4f9cc806a5066993417c738bef2b09b24df04066b5e010218ddbe6b0b113cf14498
6
+ metadata.gz: 63e1239cdb08e468a1652c5e6c99d7f2c58fb44c57485cca6b8c98927b70c4a2b6f0c97df859e811cf464324c99da4b360ca785191038967e310937929739165
7
+ data.tar.gz: f67c396d70b53d5e3984642ae42b25d5da4868f0576cfef5628cbc76598c4fe2f5802a157580297147b25e35d1eee44caa11996c0a679a4ec5031414472722f7
data/Gemfile CHANGED
@@ -2,3 +2,5 @@ source "https://rubygems.org"
2
2
 
3
3
  # Specify your gem's dependencies in tosuto.gemspec
4
4
  gemspec
5
+
6
+ gem 'pry-byebug'
data/Gemfile.lock CHANGED
@@ -1,12 +1,21 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- tosuto (0.4.2)
4
+ tosuto (0.4.3)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
8
8
  specs:
9
+ byebug (11.1.3)
10
+ coderay (1.1.3)
9
11
  diff-lcs (1.3)
12
+ method_source (1.0.0)
13
+ pry (0.13.1)
14
+ coderay (~> 1.1)
15
+ method_source (~> 1.0)
16
+ pry-byebug (3.9.0)
17
+ byebug (~> 11.0)
18
+ pry (~> 0.13.0)
10
19
  rake (13.0.1)
11
20
  rspec (3.9.0)
12
21
  rspec-core (~> 3.9.0)
@@ -27,9 +36,10 @@ PLATFORMS
27
36
 
28
37
  DEPENDENCIES
29
38
  bundler (~> 2.0)
39
+ pry-byebug
30
40
  rake (~> 13.0)
31
41
  rspec (~> 3.0)
32
42
  tosuto!
33
43
 
34
44
  BUNDLED WITH
35
- 2.1.4
45
+ 2.2.28
@@ -1,6 +1,14 @@
1
1
  module Tosuto
2
2
  class AppliedTaxRate < Resource
3
- attr_accessor :guid, :tax_rate, :rate, :name, :tax_amount, :type
3
+ attr_accessor :guid
4
+
5
+ attr_accessor(*%i[
6
+ name
7
+ rate
8
+ tax_amount
9
+ tax_rate
10
+ type
11
+ ])
4
12
 
5
13
  def initialize(hash)
6
14
  set_attributes(hash)
data/lib/tosuto/check.rb CHANGED
@@ -1,10 +1,30 @@
1
1
  module Tosuto
2
2
  class Check < Resource
3
- attr_accessor :guid, :external_id, :display_number, :payments, :applied_discounts,
4
- :void_date, :paid_date, :applied_loyalty_info, :voided, :payment_status, :amount,
5
- :tab_name, :tax_exempt, :opened_date, :total_amount, :void_business_date,
6
- :deleted, :closed_date, :deleted_date, :modified_date, :tax_amount,
7
- :applied_service_charges, :customer
3
+ attr_accessor :external_id, :guid
4
+
5
+ attr_accessor(*%i[
6
+ amount
7
+ applied_discounts
8
+ applied_loyalty_info
9
+ applied_service_charges
10
+ closed_date
11
+ customer
12
+ deleted
13
+ deleted_date
14
+ display_number
15
+ modified_date
16
+ opened_date
17
+ paid_date
18
+ payment_status
19
+ payments
20
+ tab_name
21
+ tax_amount
22
+ tax_exempt
23
+ total_amount
24
+ void_business_date
25
+ void_date
26
+ voided
27
+ ])
8
28
 
9
29
  attr_collections selections: MenuItemSelection
10
30
 
@@ -0,0 +1,19 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'tosuto/resource'
4
+
5
+ module Tosuto
6
+ class CurbsidePickupInfo < Resource
7
+ attr_accessor :entity_type, :guid
8
+
9
+ attr_accessor(*%i[
10
+ notes
11
+ transport_color
12
+ transport_description
13
+ ])
14
+
15
+ def initialize(hash)
16
+ set_attributes(hash)
17
+ end
18
+ end
19
+ end
@@ -1,10 +1,17 @@
1
1
  module Tosuto
2
2
  class DiningOption < Resource
3
3
  ENDPOINT = '/config/v2/diningOptions'.freeze
4
- DSP_MATCH = %w[delivery grub uber door postmates].freeze
4
+
5
5
  CARRYOUT_MATCH = %w[carryout].freeze
6
+ DSP_MATCH = %w[delivery door grub postmates uber].freeze
7
+
8
+ attr_accessor :entity_type, :external_id, :guid
6
9
 
7
- attr_accessor :guid, :entity_type, :external_id, :name, :behavior
10
+ attr_accessor(*%i[
11
+ behavior
12
+ curbside
13
+ name
14
+ ])
8
15
 
9
16
  def initialize(hash)
10
17
  set_attributes(hash)
@@ -1,10 +1,29 @@
1
1
  module Tosuto
2
2
  class MenuItemSelection < Resource
3
- attr_accessor :guid, :external_id, :deferred, :pre_discount_price, :void_reason,
4
- :option_group, :display_name, :applied_discounts, :modifiers, :seat_number,
5
- :void_date, :fulfillment_status, :selection_type, :price, :voided,
6
- :quantity, :unit_of_measure, :tax, :void_business_date, :created_date, :pre_modifier,
7
- :modified_date
3
+ attr_accessor :external_id, :guid
4
+
5
+ attr_accessor(*%i[
6
+ applied_discounts
7
+ created_date
8
+ deferred
9
+ display_name
10
+ fulfillment_status
11
+ modified_date
12
+ modifiers
13
+ option_group
14
+ pre_discount_price
15
+ pre_modifier
16
+ price
17
+ quantity
18
+ seat_number
19
+ selection_type
20
+ tax
21
+ unit_of_measure
22
+ void_business_date
23
+ void_date
24
+ void_reason
25
+ voided
26
+ ])
8
27
 
9
28
  attr_collections applied_taxes: AppliedTaxRate
10
29
 
data/lib/tosuto/order.rb CHANGED
@@ -1,17 +1,43 @@
1
1
  require 'date'
2
2
 
3
+ require 'tosuto/curbside_pickup_info'
4
+
3
5
  module Tosuto
4
6
  class Order < Resource
5
- ENDPOINT = "/orders/v2/orders"
7
+ ENDPOINT = "/orders/v2/orders".freeze
8
+
9
+ attr_accessor :external_id, :guid
6
10
 
7
- attr_accessor :guid, :external_id, :revenue_center, :server, :source, :void_date,
8
- :duration, :business_date, :paid_date, :restaurant_service, :voided,
9
- :estimated_fulfillment_date, :table, :required_prep_time, :approval_status,
10
- :delivery_info, :service_area, :number_of_guests, :opened_date,
11
- :void_business_date, :deleted, :closed_date, :deleted_date, :modified_date,
12
- :promised_date, :pricing_features, :restaurant_id
11
+ attr_accessor(*%i[
12
+ approval_status
13
+ business_date
14
+ closed_date
15
+ deleted
16
+ deleted_date
17
+ delivery_info
18
+ duration
19
+ estimated_fulfillment_date
20
+ modified_date
21
+ number_of_guests
22
+ opened_date
23
+ paid_date
24
+ pricing_features
25
+ promised_date
26
+ required_prep_time
27
+ restaurant_id
28
+ restaurant_service
29
+ revenue_center
30
+ server
31
+ service_area
32
+ source
33
+ table
34
+ void_business_date
35
+ void_date
36
+ voided
37
+ ])
13
38
 
14
39
  attr_collections checks: Check
40
+ attr_objects curbside_pickup_info: CurbsidePickupInfo
15
41
  attr_objects dining_option: DiningOption
16
42
 
17
43
  def self.all(restaurant_id:, token:, date_range: nil, business_date: nil, api: API.new)
@@ -1,3 +1,3 @@
1
1
  module Tosuto
2
- VERSION = '0.4.2'.freeze
2
+ VERSION = '0.4.3'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tosuto
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.2
4
+ version: 0.4.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Scott Yoder
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-10-13 00:00:00.000000000 Z
11
+ date: 2021-09-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -75,6 +75,7 @@ files:
75
75
  - lib/tosuto/api.rb
76
76
  - lib/tosuto/applied_tax_rate.rb
77
77
  - lib/tosuto/check.rb
78
+ - lib/tosuto/curbside_pickup_info.rb
78
79
  - lib/tosuto/dining_option.rb
79
80
  - lib/tosuto/menu_item_selection.rb
80
81
  - lib/tosuto/oauth_token.rb
@@ -89,7 +90,7 @@ metadata:
89
90
  homepage_uri: https://github.com/RadiusNetworks/tosuto
90
91
  source_code_uri: https://github.com/RadiusNetworks/tosuto
91
92
  changelog_uri: https://github.com/RadiusNetworks/tosuto
92
- post_install_message:
93
+ post_install_message:
93
94
  rdoc_options: []
94
95
  require_paths:
95
96
  - lib
@@ -104,9 +105,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
104
105
  - !ruby/object:Gem::Version
105
106
  version: '0'
106
107
  requirements: []
107
- rubyforge_project:
108
- rubygems_version: 2.7.6
109
- signing_key:
108
+ rubygems_version: 3.0.8
109
+ signing_key:
110
110
  specification_version: 4
111
111
  summary: A gem for accessing Toast's API
112
112
  test_files: []