soapy_cake 1.5.0 → 1.5.1

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: 63cbcc04e20f7fbe8cf51ceaba0b6d42874caee6
4
- data.tar.gz: e203b1955f3ff6cc0dad787d0105ed771168106b
3
+ metadata.gz: 5bcf0067941e0d432e690af36ff8c322ceee13d4
4
+ data.tar.gz: acae806481ff9548ede98ca9e0a142662ac5226a
5
5
  SHA512:
6
- metadata.gz: c3e2017089a8eb0fd1893c4dfc8d7bc81197c51d69ef0a4f666175238c7aa42a9dac1d4aa7b663df7b424e8ac158f739a35bfca55f8afa787d75a211c2ebda11
7
- data.tar.gz: bd253fbebfcd9c3d4d15e9c55e913f516c9655329d3d7338eaa1ab4c7b6b86236a42e87bd9639b5ecc3aba3b44618c257bd5d869ee2d018c1a554c52e29c8571
6
+ metadata.gz: 9175e5a10a5772f31f873135a7818d212d34d7d0078a48b9d25f5f8784ec54a34ae4c2c60f9fba316fc90a60d01332db1bff8c72ff29ba6ed64e92841aedeeb8
7
+ data.tar.gz: 8863619ff45ee977129f6eaea225703c63bbfb1d1605fe41ef14678fc3e18efcf90099d4e4d5763c686cc7c6670663712c7ca1c693d6db3b2f7e02b1e19d8a30
@@ -92,6 +92,10 @@ module SoapyCake
92
92
  run Request.new(:admin, :signup, :affiliate, opts)
93
93
  end
94
94
 
95
+ def decrypt_affiliate_link(opts = {})
96
+ run Request.new(:admin, :track, :decrypt_affiliate_link, opts)
97
+ end
98
+
95
99
  def verticals(*)
96
100
  run Request.new(:admin, :get, :verticals, {})
97
101
  end
@@ -21,7 +21,7 @@ module SoapyCake
21
21
  url = "https://#{domain}#{request.path}"
22
22
  body = HTTParty.post(url, headers: headers, body: request.xml).body
23
23
 
24
- response = Response.new(body, request.addedit?)
24
+ response = Response.new(body, %w(addedit track).include?(request.service))
25
25
  response.time_offset = time_offset
26
26
  response.collection
27
27
  end
@@ -27,10 +27,6 @@ module SoapyCake
27
27
  end.to_xml
28
28
  end
29
29
 
30
- def addedit?
31
- service == 'addedit'
32
- end
33
-
34
30
  private
35
31
 
36
32
  def api_path
@@ -3,17 +3,17 @@ module SoapyCake
3
3
  include Helper
4
4
 
5
5
  attr_accessor :time_offset
6
- attr_reader :body, :addedit
6
+ attr_reader :body, :short_response
7
7
 
8
- def initialize(body, addedit)
8
+ def initialize(body, short_response)
9
9
  @body = body
10
- @addedit = addedit
10
+ @short_response = short_response
11
11
  end
12
12
 
13
13
  def collection
14
14
  check_errors!
15
15
 
16
- return typed_element(sax.at_depth(3).first) if addedit
16
+ return typed_element(sax.at_depth(3).first) if short_response
17
17
 
18
18
  sax.at_depth(5).map do |element|
19
19
  typed_element(element)
@@ -1,3 +1,3 @@
1
1
  module SoapyCake
2
- VERSION = '1.5.0'
2
+ VERSION = '1.5.1'
3
3
  end
@@ -176,4 +176,13 @@ RSpec.describe SoapyCake::Admin do
176
176
  it_behaves_like 'a cake admin method'
177
177
  end
178
178
  end
179
+
180
+ describe 'track service' do
181
+ let(:service) { :track }
182
+
183
+ describe '#decrypt_affiliate_link' do
184
+ let(:method) { :decrypt_affiliate_link }
185
+ it_behaves_like 'a cake admin method'
186
+ end
187
+ end
179
188
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: soapy_cake
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.0
4
+ version: 1.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - ad2games GmbH
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-03-27 00:00:00.000000000 Z
11
+ date: 2015-03-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -229,7 +229,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
229
229
  version: '0'
230
230
  requirements: []
231
231
  rubyforge_project:
232
- rubygems_version: 2.4.5
232
+ rubygems_version: 2.4.6
233
233
  signing_key:
234
234
  specification_version: 4
235
235
  summary: Simple client for the CAKE API