sellsy-client 0.7.0 → 0.8.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/sellsy/contact.rb +3 -2
- data/lib/sellsy/customer.rb +2 -2
- data/lib/sellsy/prospect.rb +1 -0
- data/lib/sellsy/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9541433a68becd065647d1bc0dcf9441254e66fd3ee1cd7ab8f6b7b9a9fec95c
|
4
|
+
data.tar.gz: 8b8bbaa435248e3c6d5f62d64c5b1406c5af90eb3f506fefda70889ec9fdf908
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cceb22df13187494e70b6792112ad49ef10aecf50553d7683ddbf87e8d7f648ba9d4c8fe53bb0cadabbcddb7bde4ee1afb223ae51f72cd3cdee06b32c54d9bcb
|
7
|
+
data.tar.gz: e62482b2b96781b3e3cd3f48b87efc48f8ed5ed9345016179e06e46e946e55700f0ec49201d023a4d823abf0ef172a4764040e24acd591ff426b7552edd12913
|
data/Gemfile.lock
CHANGED
data/lib/sellsy/contact.rb
CHANGED
@@ -71,10 +71,10 @@ module Sellsy
|
|
71
71
|
contact
|
72
72
|
end
|
73
73
|
|
74
|
-
def self.search(name, b_date)
|
74
|
+
def self.search(name, b_date = nil)
|
75
75
|
contacts = []
|
76
76
|
|
77
|
-
unless name.blank?
|
77
|
+
unless name.blank?
|
78
78
|
command = {
|
79
79
|
'method' => 'Peoples.getList',
|
80
80
|
'params' => {
|
@@ -95,6 +95,7 @@ module Sellsy
|
|
95
95
|
contact.linked_id = value['linkedid']
|
96
96
|
contact.name = value['name']
|
97
97
|
contact.first_name = value['forename']
|
98
|
+
contact.email = value['email']
|
98
99
|
contact.third_ids = ((value['prospectList'] || []) + (value['thirdList'] || []) + (value['supplierList'] || [])).map {|e| e['id']}
|
99
100
|
contacts << contact
|
100
101
|
end
|
data/lib/sellsy/customer.rb
CHANGED
@@ -29,7 +29,7 @@ module Sellsy
|
|
29
29
|
|
30
30
|
def to_params
|
31
31
|
{
|
32
|
-
'
|
32
|
+
'clientid' => @id,
|
33
33
|
'third' => {
|
34
34
|
'name' => person_type == 'pp' ? @name : @structure_name,
|
35
35
|
'type' => person_type == 'pp' ? 'person' : 'corporation',
|
@@ -61,7 +61,6 @@ module Sellsy
|
|
61
61
|
value = response['response']['client']
|
62
62
|
client.id = value['id']
|
63
63
|
client.name = value['name']
|
64
|
-
client.type = value['type']
|
65
64
|
client.contacts = response['response']['contacts']
|
66
65
|
end
|
67
66
|
|
@@ -82,6 +81,7 @@ module Sellsy
|
|
82
81
|
client = Customer.new
|
83
82
|
client.id = key
|
84
83
|
client.name = value['fullName']
|
84
|
+
client.email = value['email']
|
85
85
|
clients << client
|
86
86
|
end
|
87
87
|
end
|
data/lib/sellsy/prospect.rb
CHANGED
data/lib/sellsy/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sellsy-client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.8.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jens Stammers
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date: 2020-
|
14
|
+
date: 2020-04-01 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: multi_json
|