caren-api 0.4.23 → 0.4.24

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.4.23
1
+ 0.4.24
data/caren-api.gemspec CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "caren-api"
8
- s.version = "0.4.23"
8
+ s.version = "0.4.24"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Andre Foeken"]
data/lib/caren/base.rb CHANGED
@@ -9,7 +9,13 @@ class Caren::Base
9
9
  def initialize args={}
10
10
  self.attributes = {}
11
11
  self.class.keys.each do |key|
12
- self.attributes[key] = args[key] || args[key.to_s] || nil
12
+ if args.has_key?(key)
13
+ self.attributes[key] = args[key]
14
+ elsif args.has_key?(key.to_s)
15
+ self.attributes[key] = args[key.to_s]
16
+ else
17
+ self.attributes[key] = nil
18
+ end
13
19
  end
14
20
  # We want to use #id and #type (in Ruby 1.8.x we need to undef it)
15
21
  self.instance_eval('undef id') if self.respond_to?(:id)
@@ -16,7 +16,7 @@ class Caren::Billable < Caren::Base
16
16
  :min_amount, # Integer (in minutes)
17
17
  :default_amount, # Integer (in minutes)
18
18
  :vat_promillage, # Integer
19
- :type, # String (Product,Service,ChatSession)
19
+ :type, # String (Store::Product,Store::Service,Store::ChatSession)
20
20
  :status, # String (pending, active)
21
21
  :send_reminder_subject, # Boolean
22
22
  :send_reminder_person, # Boolean
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: caren-api
3
3
  version: !ruby/object:Gem::Version
4
- hash: 33
4
+ hash: 63
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 4
9
- - 23
10
- version: 0.4.23
9
+ - 24
10
+ version: 0.4.24
11
11
  platform: ruby
12
12
  authors:
13
13
  - Andre Foeken