moxiworks_platform 0.11.0 → 0.11.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/moxiworks_platform/contact.rb +19 -3
- data/lib/moxiworks_platform/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 201fff321c965f98accc978feb376f68662aa7d5
|
4
|
+
data.tar.gz: a4b41751ad0f5e55f11ece0efb90b5259aeead6c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 68fdfdb16e6e90d0363e980986c48cda59aa1913d99ad782df04bf45bc4febd3efafb7df044773c675b008d8b2430b26ac9179a4cdb7ceef894267aa2bc286b4
|
7
|
+
data.tar.gz: a15aa254f42c32851d554fee77378588480417f2bbcd309856cb8f5702fdc86390909729bb87579d17fc029c8ac8861079d6095e844858081bc9491fb140a091
|
@@ -6,7 +6,7 @@ module MoxiworksPlatform
|
|
6
6
|
# moxi_works_agent_id is the Moxi Works Platform ID of the agent which a contact is
|
7
7
|
# or is to be associated with.
|
8
8
|
#
|
9
|
-
# this must be set for any Moxi Works Platform transaction
|
9
|
+
# this or agent_uuid must be set for any Moxi Works Platform transaction
|
10
10
|
#
|
11
11
|
# @return [String] the Moxi Works Platform ID of the agent
|
12
12
|
attr_accessor :moxi_works_agent_id
|
@@ -19,6 +19,15 @@ module MoxiworksPlatform
|
|
19
19
|
# @return [String] your system's unique ID for the contact
|
20
20
|
attr_accessor :partner_contact_id
|
21
21
|
|
22
|
+
# @!attribute agent_uuid
|
23
|
+
# The UUID of the agent the that the contact is to be associated with.
|
24
|
+
#
|
25
|
+
# this or moxi_works_agent_id must be set for any Moxi Works Platform transaction
|
26
|
+
#
|
27
|
+
# @return [String] the UUID of the agent
|
28
|
+
attr_accessor :agent_uuid
|
29
|
+
|
30
|
+
|
22
31
|
# @!attribute anniversary
|
23
32
|
# the Contact's anniversary displayed as a Unix Timestamp. This will be empty if the data is unavailable
|
24
33
|
#
|
@@ -671,7 +680,8 @@ module MoxiworksPlatform
|
|
671
680
|
#
|
672
681
|
# @param [String] method The HTTP method to be used when connecting; ex: :put, :post, :get
|
673
682
|
# @param [Hash] opts
|
674
|
-
# @option opts [String] :moxi_works_agent_id
|
683
|
+
# @option opts [String] :moxi_works_agent_id *-- either moxi_works_agent_id or agent_uuid is REQUIRED* The Moxi Works Agent ID for the agent to which this contact is to be associated
|
684
|
+
# @option opts [String] :agent_uuid *-- either moxi_works_agent_id or agent_uuid is REQUIRED* The Agent UUID for the agent to which this contact is to be associated
|
675
685
|
# @option opts [String] :partner_contact_id *REQUIRED* Your system's unique ID for this contact.
|
676
686
|
#
|
677
687
|
# optional Contact parameters
|
@@ -733,11 +743,17 @@ module MoxiworksPlatform
|
|
733
743
|
raise ::MoxiworksPlatform::Exception::ArgumentError,
|
734
744
|
'arguments must be passed as named parameters' unless opts.is_a? Hash
|
735
745
|
url ||= "#{MoxiworksPlatform::Config.url}/api/contacts"
|
736
|
-
required_opts = [:
|
746
|
+
required_opts = [:partner_contact_id]
|
737
747
|
required_opts.each do |opt|
|
738
748
|
raise ::MoxiworksPlatform::Exception::ArgumentError, "#{opt} required" if
|
739
749
|
opts[opt].nil? or opts[opt].to_s.empty?
|
740
750
|
end
|
751
|
+
|
752
|
+
raise ::MoxiworksPlatform::Exception::ArgumentError, "#{:moxi_works_agent_id} required" if
|
753
|
+
(opts[:moxi_works_agent_id].nil? or opts[:moxi_works_agent_id].to_s.empty?) and
|
754
|
+
(opts[:agent_uuid].nil? or opts[:agent_uuid].to_s.empty?)
|
755
|
+
|
756
|
+
|
741
757
|
opts[:contact_id] = opts[:partner_contact_id]
|
742
758
|
super(method, opts, url)
|
743
759
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: moxiworks_platform
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.11.
|
4
|
+
version: 0.11.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tres Wong-Godfrey
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-09-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -123,7 +123,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
123
123
|
version: '0'
|
124
124
|
requirements: []
|
125
125
|
rubyforge_project:
|
126
|
-
rubygems_version: 2.
|
126
|
+
rubygems_version: 2.6.13
|
127
127
|
signing_key:
|
128
128
|
specification_version: 4
|
129
129
|
summary: Ruby Moxi Works Platform Client
|