move-to-go 5.0.2 → 5.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: f87f9f21453dd23fe598edc61a1070ab12c9f1a3
4
- data.tar.gz: 6906165abe6583bd4829cc941473d1b32682bf1e
3
+ metadata.gz: b474cea86c5251fbe5fa94d936fd2a2779948569
4
+ data.tar.gz: 565396591e0ac2f14183dac43a40710c4035479a
5
5
  SHA512:
6
- metadata.gz: 6284ca8b72a79386e4818457631bb5b82b939ccbbab2e3155cfab54ebfe04a4e445c28496c59d2cff818f27cc494765171ffc30850adad0ef483d2562a0850af
7
- data.tar.gz: 7327f192a0aa81329bbbc2bb228a8ddbb99ec9a409264635a2a6a733590a4d0c31a0a2245f52a57db2e0bb459b4ce9a1265d0c8a1e35d66226f9db5bff39b157
6
+ metadata.gz: eb13a6afdddc872efd5bc031ae199ecfb977af90531db1c99fa82f6c7524d03d69a5b27d81ab27cd85c0c148e5c2dc490fd7bf6d93bbd192f1cf3c6ceda49d30
7
+ data.tar.gz: 3702af23b3c206160d2c46314a1fab1b8e0fdf8d887ea77d28eeb5570b8cf8553ea63330852b5210a4fd6ae732b6dfee390e9e348eee9b03031cbb4165df9d42
@@ -1,9 +1,9 @@
1
1
  require 'iso_country_codes'
2
2
  module MoveToGo
3
3
  class Address
4
- attr_accessor :street, :zip_code, :city, :country_code, :location
4
+ attr_accessor :street, :zip_code, :city, :country_code
5
5
  def serialize_variables
6
- [ :street, :zip_code, :city, :country_code, :location].map {|p| {:id=>p,:type=>:string} }
6
+ [ :street, :zip_code, :city, :country_code].map {|p| {:id=>p,:type=>:string} }
7
7
  end
8
8
  include SerializeHelper
9
9
  def initialize()
@@ -1,13 +1,36 @@
1
1
  module MoveToGo
2
2
  class Coworker < CanBecomeImmutable
3
3
  include SerializeHelper
4
+ ##
5
+ # :attr_accessor: id
4
6
  immutable_accessor :id
7
+
8
+ ##
9
+ # :attr_accessor: integration_id
5
10
  immutable_accessor :integration_id
11
+
12
+ ##
13
+ # :attr_accessor: email
6
14
  immutable_accessor :email
15
+
16
+ ##
17
+ # :attr_accessor: first_name
7
18
  immutable_accessor :first_name
19
+
20
+ ##
21
+ # :attr_accessor: last_name
8
22
  immutable_accessor :last_name
23
+
24
+ ##
25
+ # :attr_accessor: direct_phone_number
9
26
  immutable_accessor :direct_phone_number
27
+
28
+ ##
29
+ # :attr_accessor: mobile_phone_number
10
30
  immutable_accessor :mobile_phone_number
31
+
32
+ ##
33
+ # :attr_accessor: home_phone_number
11
34
  immutable_accessor :home_phone_number
12
35
 
13
36
  def initialize(opt = nil)
@@ -37,16 +37,33 @@ module MoveToGo
37
37
  class Deal < CanBecomeImmutable
38
38
  include SerializeHelper, ModelHasCustomFields, ModelHasTags
39
39
 
40
+ ##
41
+ # :attr_accessor: status
40
42
  # Get/set the deal's status. Statuses must be configured in
41
43
  # LIME Go before the import.
42
44
  immutable_accessor :status
43
45
 
46
+ ##
47
+ # :attr_accessor: id
44
48
  immutable_accessor :id
49
+ ##
50
+ # :attr_accessor: integration_id
45
51
  immutable_accessor :integration_id
52
+ ##
53
+ # :attr_accessor: name
46
54
  immutable_accessor :name
55
+ ##
56
+ # :attr_accessor: description
47
57
  immutable_accessor :description
58
+ ##
59
+ # :attr_accessor: probability
48
60
  immutable_accessor :probability
61
+ ##
62
+ # :attr_accessor: order_date
49
63
  immutable_accessor :order_date
64
+ ##
65
+ # :attr_accessor: offer_date
66
+ immutable_accessor :offer_date
50
67
 
51
68
  # you add custom values by using {#set_custom_value}
52
69
  attr_reader :custom_values
@@ -54,7 +71,7 @@ module MoveToGo
54
71
  attr_reader :customer, :responsible_coworker, :customer_contact, :value
55
72
 
56
73
  def serialize_variables
57
- [ :id, :integration_id, :name, :description, :probability, :value, :order_date ].map {
74
+ [ :id, :integration_id, :name, :description, :probability, :value, :order_date, :offer_date ].map {
58
75
  |p| {
59
76
  :id => p,
60
77
  :type => :string
@@ -104,6 +121,10 @@ module MoveToGo
104
121
  error = "A name is required for deal.\n}"
105
122
  end
106
123
 
124
+ if !@value.nil? && @value < 0
125
+ error = "The value must be possitive for deal.\n}"
126
+ end
127
+
107
128
  if !@status.nil? && @status.status_reference.nil?
108
129
  error = "#{error}\nStatus must have a status reference."
109
130
  end
@@ -1,8 +1,14 @@
1
1
  module MoveToGo
2
2
  class History < CanBecomeImmutable
3
3
  include SerializeHelper
4
+ ##
5
+ # :attr_accessor: id
4
6
  immutable_accessor :id
7
+ ##
8
+ # :attr_accessor: integration_id
5
9
  immutable_accessor :integration_id
10
+ ##
11
+ # :attr_accessor: date
6
12
  immutable_accessor :date
7
13
 
8
14
  attr_reader :text
@@ -41,15 +41,35 @@ module MoveToGo
41
41
  class Organization < CanBecomeImmutable
42
42
  include SerializeHelper, ModelHasCustomFields, ModelHasTags
43
43
 
44
+ ##
45
+ # :attr_accessor: id
44
46
  immutable_accessor :id
47
+ ##
48
+ # :attr_accessor: integration_id
45
49
  immutable_accessor :integration_id
50
+ ##
51
+ # :attr_accessor: name
46
52
  immutable_accessor :name
53
+ ##
54
+ # :attr_accessor: organization_number
47
55
  immutable_accessor :organization_number
56
+ ##
57
+ # :attr_accessor: email
48
58
  immutable_accessor :email
59
+ ##
60
+ # :attr_accessor: web_site
49
61
  immutable_accessor :web_site
62
+ ##
63
+ # :attr_accessor: postal_address
50
64
  immutable_accessor :postal_address
65
+ ##
66
+ # :attr_accessor: visit_address
51
67
  immutable_accessor :visit_address
68
+ ##
69
+ # :attr_accessor: central_phone_number
52
70
  immutable_accessor :central_phone_number
71
+ ##
72
+ # :attr_accessor: source_data
53
73
  immutable_accessor :source_data
54
74
 
55
75
  # Sets/gets the date when this organization's relation was
@@ -31,18 +31,44 @@ module MoveToGo
31
31
  class Person < CanBecomeImmutable
32
32
  include SerializeHelper, ModelHasCustomFields, ModelHasTags
33
33
 
34
+ ##
35
+ # :attr_accessor: id
34
36
  immutable_accessor :id
37
+ ##
38
+ # :attr_accessor: integration_id
35
39
  immutable_accessor :integration_id
40
+ ##
41
+ # :attr_accessor: first_name
36
42
  immutable_accessor :first_name
43
+ ##
44
+ # :attr_accessor: last_name
37
45
  immutable_accessor :last_name
46
+ ##
47
+ # :attr_accessor: direct_phone_number
38
48
  immutable_accessor :direct_phone_number
49
+ ##
50
+ # :attr_accessor: fax_phone_number
39
51
  immutable_accessor :fax_phone_number
52
+ ##
53
+ # :attr_accessor: mobile_phone_number
40
54
  immutable_accessor :mobile_phone_number
55
+ ##
56
+ # :attr_accessor: home_phone_number
41
57
  immutable_accessor :home_phone_number
58
+ ##
59
+ # :attr_accessor: position
42
60
  immutable_accessor :position
61
+ ##
62
+ # :attr_accessor: email
43
63
  immutable_accessor :email
64
+ ##
65
+ # :attr_accessor: alternative_email
44
66
  immutable_accessor :alternative_email
67
+ ##
68
+ # :attr_accessor: postal_address
45
69
  immutable_accessor :postal_address
70
+ ##
71
+ # :attr_accessor: currently_employed
46
72
  immutable_accessor :currently_employed
47
73
 
48
74
  # you add custom values by using {#set_custom_value}
@@ -157,7 +157,6 @@ class Converter
157
157
  # address.street = row['potstaladdress1']
158
158
  # address.zip_code = row['postalzipcode']
159
159
  # address.city = row['postalcity']
160
- # address.location = row['country']
161
160
  # end
162
161
 
163
162
  # # Same as visting address
@@ -142,7 +142,6 @@ class Converter
142
142
  # address.street = row['street']
143
143
  # address.zip_code = row['zip']
144
144
  # address.city = row['city']
145
- # address.location = row['location']
146
145
  # end
147
146
 
148
147
  # Same as visting address
@@ -212,7 +212,6 @@ describe MoveToGo::SerializeHelper do
212
212
  {:id => 'zip_code',:name => 'Zip code', :type => :string},
213
213
  {:id => 'city',:name => 'City', :type => :string},
214
214
  {:id => 'country_code',:name => 'Country code', :type => :string},
215
- {:id => 'location',:name => 'Location', :type => :string},
216
215
  {:id => 'country_name',:name => 'Country name', :type => :string},
217
216
  ]}
218
217
  import_rows.should include(expected)
@@ -243,7 +242,6 @@ describe MoveToGo::SerializeHelper do
243
242
  {:id => 'zip_code',:name => 'Zip code', :type => :string},
244
243
  {:id => 'city',:name => 'City', :type => :string},
245
244
  {:id => 'country_code',:name => 'Country code', :type => :string},
246
- {:id => 'location',:name => 'Location', :type => :string},
247
245
  {:id => 'country_name',:name => 'Country name', :type => :string},
248
246
  ]}
249
247
  import_rows.should include(expected)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: move-to-go
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.0.2
4
+ version: 5.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Petter Sandholdt
@@ -13,7 +13,7 @@ authors:
13
13
  autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
- date: 2016-09-14 00:00:00.000000000 Z
16
+ date: 2016-11-17 00:00:00.000000000 Z
17
17
  dependencies:
18
18
  - !ruby/object:Gem::Dependency
19
19
  name: iso_country_codes