tap-vend 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f8cda227e29c5872014fa2f10473d9640648a671
4
- data.tar.gz: ec56cd6cf92c450d440d685eb9362a0d300662df
3
+ metadata.gz: 5049fbc0f8eaab8a8556dd87e553fbff91ee6dcc
4
+ data.tar.gz: f2348f55b654310d42c5d265b0ccada5c16e5d8b
5
5
  SHA512:
6
- metadata.gz: fefab4eea21fedc40dcf837abdd7a4ddbb5fea190a3f79c0c742228eb7b5d47e38779f6d86004cb68911077bff314a5af644604f2cea88271fd5d31d6cfc4189
7
- data.tar.gz: 39fcbce452db54be9e36bb540b6efb9921bce062f308bbb8d2421b57065aea1660411a4e0900db12dc332fe334f4ca6c28303bb3282de8d35e8f520cbf7bfe15
6
+ metadata.gz: 972eed4f9fdbfb5c02e46886606417a5ce989fd37c471231f49e134e62b7baa9161102a9c95db9b46ec4c62f37b285e200e21c8d622a778e065caf3c3f7d466c
7
+ data.tar.gz: f785946fe9bd9dbdf96c4450db93ea416ed4667091a3a7cae2ab1463e44811d652185713b4b90638998b12a69bcd1ccac32730c2eb6942c2602f62018c615b98
@@ -7,6 +7,7 @@ module Models
7
7
 
8
8
  schema do
9
9
  string :id
10
+ timestamps
10
11
  end
11
12
 
12
13
  def transform
@@ -22,6 +23,10 @@ module Models
22
23
  class Consignment < Base
23
24
  schema do
24
25
  string :id
26
+ datetime :consignment_date
27
+ datetime :due_at
28
+ datetime :received_at
29
+ timestamps
25
30
  end
26
31
 
27
32
  def extra_records
@@ -3,6 +3,7 @@ module Models
3
3
  class Customer < Base
4
4
  schema do
5
5
  string :id
6
+ timestamps
6
7
  end
7
8
  end
8
9
  end
@@ -3,6 +3,7 @@ module Models
3
3
  class CustomerGroup < Base
4
4
  schema do
5
5
  string :id
6
+ timestamps
6
7
  end
7
8
  end
8
9
  end
@@ -3,6 +3,7 @@ module Models
3
3
  class PriceBookProduct < Base
4
4
  schema do
5
5
  string :id
6
+ timestamps
6
7
  end
7
8
  end
8
9
  end
@@ -3,6 +3,7 @@ module Models
3
3
  class Product < Base
4
4
  schema do
5
5
  string :id
6
+ timestamps
6
7
  end
7
8
  end
8
9
  end
@@ -7,6 +7,8 @@ module Models
7
7
  string :outlet_id
8
8
  string :invoice_prefix
9
9
  string :invoice_suffix
10
+ datetime :register_open_time
11
+ datetime :register_close_time
10
12
  end
11
13
 
12
14
  def transform
data/lib/models/sale.rb CHANGED
@@ -3,6 +3,7 @@ module Models
3
3
  class Sale < Base
4
4
  schema do
5
5
  string :id
6
+ timestamps
6
7
  end
7
8
  end
8
9
  end
data/lib/models/user.rb CHANGED
@@ -6,11 +6,13 @@ module Models
6
6
  string :username
7
7
  string :displayname
8
8
  string :email, nil: true
9
- string :email_verified_at, nil: true
9
+ datetime :email_verified_at
10
10
  string :account_type
11
11
  string :created_at
12
12
  string :updated_at
13
- string :deleted_at, nil: true
13
+ datetime :deleted_at
14
+ datetime :seen_at
15
+ timestamps
14
16
  end
15
17
 
16
18
  def transform
data/lib/schema.rb CHANGED
@@ -8,6 +8,18 @@ Schema = Struct.new(:stream) do
8
8
  end
9
9
  end
10
10
 
11
+ def datetime(name)
12
+ properties[name.to_sym] = {
13
+ type: [:string, :null],
14
+ format: 'date-time'
15
+ }
16
+ end
17
+
18
+ def timestamps
19
+ datetime :created_at
20
+ datetime :updated_at
21
+ end
22
+
11
23
  def properties
12
24
  @properties ||= {}
13
25
  end
@@ -1,3 +1,3 @@
1
1
  module TapVend
2
- VERSION = '0.0.2'
2
+ VERSION = '0.0.3'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tap-vend
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joe Lind