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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: daea9b17f02c15476311564df71e4288afd6335c550495fbcf0d89a89c0d2989
4
- data.tar.gz: 551a56219983d6d887f86c7e543a5411c6db51d50b9d35a1ddece2a70ed202d5
3
+ metadata.gz: 9541433a68becd065647d1bc0dcf9441254e66fd3ee1cd7ab8f6b7b9a9fec95c
4
+ data.tar.gz: 8b8bbaa435248e3c6d5f62d64c5b1406c5af90eb3f506fefda70889ec9fdf908
5
5
  SHA512:
6
- metadata.gz: fe0602114ba4ef74059949ef138c40b3e4b68ce4472d7ceb96c5db5343a75908e69691bc5a7855afdd0d36b3c8b20321c900aa71a22556e9ae303425ff27cd85
7
- data.tar.gz: f0a864811e221932ec0cc2eb8963b248e60042b61e9dc33515e62cdb376c0d9aa460e1b0bfd64edcfaa98a25cf80779240a2b868d7473730d548d58e3aa46615
6
+ metadata.gz: cceb22df13187494e70b6792112ad49ef10aecf50553d7683ddbf87e8d7f648ba9d4c8fe53bb0cadabbcddb7bde4ee1afb223ae51f72cd3cdee06b32c54d9bcb
7
+ data.tar.gz: e62482b2b96781b3e3cd3f48b87efc48f8ed5ed9345016179e06e46e946e55700f0ec49201d023a4d823abf0ef172a4764040e24acd591ff426b7552edd12913
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- sellsy-client (0.6.0)
4
+ sellsy-client (0.7.0)
5
5
  multi_json (~> 1.11)
6
6
  rest-client (~> 2.0, >= 2.0.2)
7
7
 
@@ -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? || b_date.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
@@ -29,7 +29,7 @@ module Sellsy
29
29
 
30
30
  def to_params
31
31
  {
32
- 'id' => @id,
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
@@ -80,6 +80,7 @@ module Sellsy
80
80
  prospect = Prospect.new
81
81
  prospect.id = key
82
82
  prospect.name = value['fullName']
83
+ prospect.email = value['email']
83
84
  prospects << prospect
84
85
  end
85
86
  end
@@ -1,3 +1,3 @@
1
1
  module Sellsy
2
- VERSION = "0.7.0"
2
+ VERSION = "0.8.0"
3
3
  end
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.7.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-03-31 00:00:00.000000000 Z
14
+ date: 2020-04-01 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: multi_json