hasoffersv3 0.2.0 → 0.2.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: 4756bb80ad0c0810d52a7eeb37a54583f353b215
4
- data.tar.gz: 381f65f864de2725357e2f4a7a9a5e0dd2fe25ae
3
+ metadata.gz: 7453bceffc7ee46496b55fcf566830b784aeafc8
4
+ data.tar.gz: 4afeea63e581e37b8bbb50a1a604cc23a26ca1ad
5
5
  SHA512:
6
- metadata.gz: 0f8cfd576d622db0094c2e2c4b1e558a111b62e180daa69e634a49ea16630badc5f84891f0d3104ca1dc15e4a8a4155cb4dcc24d8020879e5a98d765689e3296
7
- data.tar.gz: b49e82d36cef0696416f0d42d4426fc048ec51dd61d88995092960b6bb04ee8403e820b351850e79a6334266fb778bd76d2948540ae4081c80263e159789fcc6
6
+ metadata.gz: dab7532456120fbcebb9883b4483f87b881f66ce58cfeff716c16a2af6512efac9eb0e23fda14d29c0c9bcd0529118ade4b74c800da97dce17b61a7c604f14a2
7
+ data.tar.gz: 153a7882dae6d973705dfb6510be90b74fbe66adbd900633f7f1845befb7d88ff42e05103588716ce7f38f62eb545114204b2bb38117396adeb732c53fc2af61
data/CHANGELOG.md CHANGED
@@ -1,3 +1,9 @@
1
+ # 0.2.1
2
+ - Support "Affiliate_Offer/generateTrackingLink" method
3
+
4
+ # 0.2.0
5
+ - Support "Affiliate_Offer": findAll, find_by_id, get_categories, get_target_countries
6
+
1
7
  # 0.1.1
2
8
  - Support "Offer/getApprovedAffiliateIds" method
3
9
 
@@ -24,5 +24,10 @@ class HasOffersV3
24
24
  post_request 'getTargetCountries', params
25
25
  end
26
26
 
27
+ def self.generate_tracking_link(params = {})
28
+ requires! params, [:offer_id]
29
+ post_request 'generateTrackingLink', params
30
+ end
31
+
27
32
  end
28
33
  end
@@ -1,3 +1,3 @@
1
1
  class HasOffersV3
2
- VERSION = '0.2.0'
2
+ VERSION = '0.2.1'
3
3
  end
@@ -74,4 +74,21 @@ describe HasOffersV3::AffiliateOffer do
74
74
  end
75
75
  end
76
76
 
77
+ describe '.generate_tracking_link' do
78
+ it 'should make a proper request call' do
79
+ stub_call
80
+ response = subject.generate_tracking_link offer_id: 1
81
+ request = a_request(:post, url).with(body: hash_including('Method' => 'generateTrackingLink'))
82
+ expect(request).to have_been_made
83
+
84
+ validate_call response
85
+ end
86
+
87
+ context 'when there is no offer_id' do
88
+ it 'should raise exception' do
89
+ expect { subject.generate_tracking_link }.to raise_error ArgumentError
90
+ end
91
+ end
92
+ end
93
+
77
94
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hasoffersv3
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Maximilian Seifert
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-09-05 00:00:00.000000000 Z
12
+ date: 2014-09-09 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: oj
@@ -181,4 +181,3 @@ test_files:
181
181
  - spec/lib/raw_log_spec.rb
182
182
  - spec/lib/report_spec.rb
183
183
  - spec/spec_helper.rb
184
- has_rdoc: