vng 3.1.0 → 3.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 44bfc4eff4a138fc21a6058eb634d08e8be4bca032b43807c15fea355dfa5fe1
4
- data.tar.gz: 414e83652f42d05171fc1413c17d9a817ab02bcd49d340164338e682b886d028
3
+ metadata.gz: b010ddfb951a8a49807d40e1eae41355cfac53f9eb4774143e3b86ffbc4b892b
4
+ data.tar.gz: c495b73abd2a24b93f7fe0556a1ede1a48adeb9e08b19809099d9c95134c9fb6
5
5
  SHA512:
6
- metadata.gz: c64946b9ea2609929eb2b89b241dc93fa221df17c081e3548357eb94187d3d58215c59a6522a27d248c53c9009c5df7ec2fe64047b53367748be71988e653d60
7
- data.tar.gz: 917f9edb608a9488bd95896fad8e11803494f5598236f8271abc08853159b5a6821c328d99c4db5c9f5fcb138fb4632c99fa5349569e87355edc2a09f013d45f
6
+ metadata.gz: 50527cbbbbb3e550b54052dd9ff42e511d24fcf6904687ad46b1a7f931882a4064fed2db14243ca4f8d5c890147f806c7f2a7dbb33ff0708848b7e09448bc79b
7
+ data.tar.gz: 7611cfffca87c56f59a39e526386ebd1c224d65c6d8be53d86518f0f5dc2a616c3d80e6d4242032939a5bc6380dd259bb95a133fec775bb67f3288b4d51ff328
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## [3.2.0] - 2025-01-15
2
+
3
+ - Add Lead#notes
4
+
1
5
  ## [3.1.0] - 2025-01-11
2
6
 
3
7
  - Add Client.find(id)
data/lib/vng/lead.rb CHANGED
@@ -5,16 +5,17 @@ module Vng
5
5
  class Lead < Resource
6
6
  PATH = '/api/v1/data/Leads/'
7
7
 
8
- attr_reader :id, :name, :email, :phone
8
+ attr_reader :id, :name, :email, :phone, :notes
9
9
 
10
- def initialize(id:, name:, email:, phone:)
10
+ def initialize(id:, name:, email:, phone:, notes:)
11
11
  @id = id
12
12
  @name = name
13
13
  @email = email
14
14
  @phone = phone
15
+ @notes = notes
15
16
  end
16
17
 
17
- def self.create(name:, email:, phone:)
18
+ def self.create(name:, email:, phone:, notes: nil)
18
19
  body = {
19
20
  method: '3',
20
21
  Fields: [
@@ -25,14 +26,17 @@ module Vng
25
26
  ]
26
27
  }
27
28
 
29
+ body[:Fields] << { fieldID: 108, fieldValue: notes } if notes
30
+
28
31
  data = request path: PATH, body: body
29
32
 
30
33
  id = data['Client']['objectID']
31
34
  name = value_for_field data, 127
32
35
  email = value_for_field data, 238
33
36
  phone = value_for_field data, 1024
37
+ notes = value_for_field data, 108
34
38
 
35
- new id: id, name: name, email: email, phone: phone
39
+ new id: id, name: name, email: email, phone: phone, notes: notes
36
40
  end
37
41
  end
38
42
  end
@@ -118,6 +118,7 @@ module Vng
118
118
  { "fieldID"=>126, "fieldValue"=>"Vng Example" },
119
119
  { "fieldID"=>238, "fieldValue"=>"vng@example.com" },
120
120
  { "fieldID"=>1024, "fieldValue"=>"8648648640" },
121
+ { "fieldID"=>108, "fieldValue"=>"Lead notes" },
121
122
  ] }
122
123
  end
123
124
  when '/api/v1/data/Contacts/'
data/lib/vng/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Vng
2
- VERSION = '3.1.0'
2
+ VERSION = '3.2.0'
3
3
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vng
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.1.0
4
+ version: 3.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - claudiob
8
8
  bindir: exe
9
9
  cert_chain: []
10
- date: 2025-01-11 00:00:00.000000000 Z
10
+ date: 2025-01-15 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
13
  name: simplecov