portatext 1.5.19 → 1.5.20

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: 6924045fdab16066dd284ab9629ef629a5ba9b4f
4
- data.tar.gz: 4d4ed09f020b9da0c6d81c9f6ccbfb4123765254
3
+ metadata.gz: 0f80d5c0a6e92a2a3b653b10cfa0131dc5f7435c
4
+ data.tar.gz: 71b530f1deadab441d42d00a37c0ea8fd0231f75
5
5
  SHA512:
6
- metadata.gz: 2647acaa43e358a6c479db36f846b6121be22dafceb2ea88fa65927879edd6d355ee782a0d492b6baa271233d8e66291e7085c998f3c89209f2ac13c465aa30b
7
- data.tar.gz: fcab14396424f9cb4b50c54291369fa5c5889efb77bc9265b45ac662a50300e53f947c32ea4f3a23241b1eb30953386bb597cb850fc72abef8ffd74e3ace92be
6
+ metadata.gz: e7508d6239a6efe10921eabfaf8a6b831139acec7b5b85f82e6b2169ce884857445c06a8f5ee049cb87fd6964b42b4bef854a67cdd1ff8b8f73755881f2f43cd
7
+ data.tar.gz: 0087b0c3b8ad44348964c5306187cd8367d4a9d44e44b3c6fbf7c04081a13975335751981f0b5fe02a8b9dff6998fc65eb2160ebdc3db4849d18102e367477af
@@ -48,6 +48,10 @@ module PortaText
48
48
  set :contacts, true
49
49
  end
50
50
 
51
+ def contact(contact)
52
+ set :contact, contact
53
+ end
54
+
51
55
  def schedule(type, details)
52
56
  schedule = {}
53
57
  schedule[type] = details
@@ -63,6 +67,7 @@ module PortaText
63
67
 
64
68
  # rubocop:disable Metrics/MethodLength
65
69
  # rubocop:disable Metrics/AbcSize
70
+ # rubocop:disable Metrics/CyclomaticComplexity
66
71
  def endpoint(_method)
67
72
  unless @args[:file].nil?
68
73
  settings = @args.clone
@@ -80,15 +85,19 @@ module PortaText
80
85
  unless @args[:id].nil?
81
86
  id = @args[:id]
82
87
  contacts = @args[:contacts]
88
+ contact = @args[:contact]
83
89
  @args.delete :type
84
90
  @args.delete :id
85
91
  @args.delete :contacts
92
+ @args.delete :contact
93
+ return "campaigns/#{id}/contacts/#{contact}" if contact
86
94
  return "campaigns/#{id}/contacts?#{qs}" if contacts
87
95
  return "campaigns/#{id}"
88
96
  end
89
97
  return "campaigns?#{qs}" unless qs.empty?
90
98
  'campaigns'
91
99
  end
100
+ # rubocop:enable Metrics/CyclomaticComplexity
92
101
  # rubocop:enable Metrics/AbcSize
93
102
  # rubocop:enable Metrics/MethodLength
94
103
  end
data/portatext.gemspec CHANGED
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'portatext'
3
- s.version = '1.5.19'
3
+ s.version = '1.5.20'
4
4
  s.summary = 'Official PortaText API ruby client'
5
5
  s.description = 'This is the official PortaText API ruby client'
6
6
  s.authors = ['PortaText']
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: portatext
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.19
4
+ version: 1.5.20
5
5
  platform: ruby
6
6
  authors:
7
7
  - PortaText
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-08-11 00:00:00.000000000 Z
11
+ date: 2016-09-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: simplecov