ish_models 0.0.33.268 → 0.0.33.270

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
  SHA256:
3
- metadata.gz: dd66d24c0e32d8c2062bb683a462892ec79779902e66cd184d5a087bb1e439ad
4
- data.tar.gz: 164dbb6e924555332d22f0f8e07dfc172910810c232c64784d089e5459a3f697
3
+ metadata.gz: 2d127d11648710572a0ccfd485e9b83c6c9f86d751c5d017ddc0cc49318276a4
4
+ data.tar.gz: ef1bec175600344e71e4fc7965f35e3a5ffd053e0f046f20676a2983c79a8d6f
5
5
  SHA512:
6
- metadata.gz: 4719d9a45e7de490242687d6022a0ebd478529ca584ba6d475f889d02c2f964fd3fb513c5b11b87c4fd831e9e063bf6fa248e45b13570fa98155af884ccb7fbe
7
- data.tar.gz: a0438c17da408bff68f51947332b7f4c110b29eeee46837555097c29343db513afb8b58e591b0cd302b05025cf915d8338a086d95aee5354df752a954125c1b7
6
+ metadata.gz: 6c19cf76354a8913e5427928a76d3b7bbc5bd288d13964d76753e3bf1836909d376666ea9c7ad66a1ee4b2bd3133e17bef4cc74dea1556b6711de495e56f0397
7
+ data.tar.gz: add6b003c34a83b1f0ef27248c7f0645506dd378f7d9daf3a2883fdb949a4aa6c6dd985f8ceaa4413090b91284d0160bfd3e7fa7c827807d2cab2e18ffb03b1e
data/lib/ish/invoice.rb CHANGED
@@ -27,17 +27,16 @@ class Ish::Invoice
27
27
 
28
28
  field :month_on, type: Date
29
29
 
30
- has_one :asset, class_name: '::Gameui::Asset3d'
30
+ has_one :asset, class_name: '::Gameui::Asset3d' ## the pdf
31
31
 
32
32
  def filename
33
33
  "invoice-#{number}.pdf"
34
34
  end
35
35
 
36
36
  # field :amount_cents, type: Integer
37
- # has_many :payments, :class_name => 'Ish::Payment'
38
- # field :paid_amount_cents, type: Integer, :default => 0 ## @TODO: unused? _vp_ 2023-08-18
39
- # field :description, type: String
40
- # field :items, type: Array
37
+
38
+ field :description, type: String
39
+ field :items, type: Array # used by stripe
41
40
 
42
41
 
43
42
 
data/lib/office/action.rb CHANGED
@@ -1,10 +1,13 @@
1
1
 
2
+ ##
3
+ ## 2023-09-13 _vp_ I don't know if it's even used.
4
+ ##
2
5
  class Office::Action
3
6
  include Mongoid::Document
4
7
  include Mongoid::Timestamps
5
8
  store_in collection: 'office_actions'
6
9
 
7
- field :slug, type: :string
10
+ field :slug, type: :string
8
11
  validates :slug, uniqueness: true, allow_nil: true
9
12
 
10
13
  field :descr, type: :string ## optional
@@ -1,7 +1,7 @@
1
1
 
2
2
  ##
3
3
  ## 2023-03-04 _vp_ When I receive one.
4
- ## 2023-03-04 _vp_ Also when I send one, forever.
4
+ ## 2023-03-04 _vp_ When I send one, forever.
5
5
  ##
6
6
  class Office::EmailAction
7
7
  include Mongoid::Document
data/lib/wco/price.rb CHANGED
@@ -18,7 +18,7 @@ class Wco::Price
18
18
 
19
19
  field :price_id # stripe
20
20
 
21
- def to_s
21
+ def name
22
22
  "$#{ amount_cents.to_f/100 } / #{interval}"
23
23
  end
24
24
 
data/lib/wco/product.rb CHANGED
@@ -7,23 +7,29 @@ class Wco::Product
7
7
 
8
8
  field :product_id # stripe
9
9
 
10
- ## @TODO: remove, interval makes no sense on product! replace with Wco::Price . _vp_ 2023-09-07
11
- # INTERVALS = [ nil, 'day', 'week', 'month', 'year' ]
12
- # field :interval, type: String
13
-
14
- ## @TODO: remove, interval makes no sense on product! replace with Wco::Price . _vp_ 2023-09-07
15
- # field :price_id # stripe
16
-
17
- ## @TODO: remove, interval makes no sense on product! replace with Wco::Price . _vp_ 2023-09-07
18
- # field :price_cents, type: Integer
19
-
20
10
  ## @TODO: remove, interval makes no sense on product! replace with Wco::Price . _vp_ 2023-09-07
21
11
  # has_many :subscriptions, class_name: '::Wco::Subscription', inverse_of: :subscription
22
12
 
23
13
  has_many :prices, class_name: '::Wco::Price', inverse_of: :product
24
14
 
25
15
  def self.list
26
- [ [nil,nil] ] + self.all.map { |i| [i.name, i.id] }
16
+ [ [nil,nil] ] + self.all.order_by({ name: :asc }).map { |i| [i.name, i.id] }
27
17
  end
28
18
 
29
19
  end
20
+
21
+
22
+
23
+
24
+
25
+
26
+
27
+
28
+
29
+ ## @TODO: remove, interval makes no sense on product! replace with Wco::Price . _vp_ 2023-09-07
30
+ # INTERVALS = [ nil, 'day', 'week', 'month', 'year' ]
31
+ # field :interval, type: String
32
+ ## @TODO: remove, interval makes no sense on product! replace with Wco::Price . _vp_ 2023-09-07
33
+ # field :price_id # stripe
34
+ ## @TODO: remove, interval makes no sense on product! replace with Wco::Price . _vp_ 2023-09-07
35
+ # field :price_cents, type: Integer
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ish_models
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.33.268
4
+ version: 0.0.33.270
5
5
  platform: ruby
6
6
  authors:
7
7
  - piousbox