hasoffersv3 0.4.0 → 0.4.1
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 +4 -4
- data/.ruby-version +1 -1
- data/.travis.yml +5 -2
- data/Gemfile +0 -5
- data/lib/hasoffersv3/offer.rb +5 -0
- data/lib/hasoffersv3/version.rb +1 -1
- data/spec/lib/offer_spec.rb +15 -0
- 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: 537eb480dbf6608cf635d04031adbf6d6c33a6d7
|
4
|
+
data.tar.gz: 57ee201a3270c904e2660e8bc01e8a4f9afc20ba
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a861581ccb305f93dd235c44778edca934f1166299e6d1d9caf907cb1d47de51af19490453f28e15fe334047872078285e658bf601dcefa5dd273c5cbc79c088
|
7
|
+
data.tar.gz: 2f447bc955d8f3b2a02e06a45bcc7739f39abe2be711d0cd7f25b046e12fab673ae4bb0a5d50db2dd424b528ca17ec847e73efd49b20d1f05df64001ae50e9a2
|
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.
|
1
|
+
2.3.0
|
data/.travis.yml
CHANGED
data/Gemfile
CHANGED
data/lib/hasoffersv3/offer.rb
CHANGED
@@ -39,6 +39,11 @@ class HasOffersV3
|
|
39
39
|
post_request 'setPayout', params
|
40
40
|
end
|
41
41
|
|
42
|
+
def set_tier_payout(params = {})
|
43
|
+
requires! params, [:id, :affiliate_tier_id]
|
44
|
+
post_request 'setTierPayout', params
|
45
|
+
end
|
46
|
+
|
42
47
|
def remove_payout(params = {})
|
43
48
|
requires! params, [:id, :affiliate_id]
|
44
49
|
post_request 'removePayout', params
|
data/lib/hasoffersv3/version.rb
CHANGED
data/spec/lib/offer_spec.rb
CHANGED
@@ -112,6 +112,21 @@ describe HasOffersV3::Offer do
|
|
112
112
|
end
|
113
113
|
end
|
114
114
|
|
115
|
+
describe '.set_tier_payout' do
|
116
|
+
it 'should make a proper request call' do
|
117
|
+
stub_call
|
118
|
+
response = HasOffersV3::Offer.set_tier_payout id: 1, affiliate_tier_id: 2
|
119
|
+
expect(a_request(:post, url).with(body: hash_including({'Method' => 'setTierPayout'}))).to have_been_made
|
120
|
+
validate_call response
|
121
|
+
end
|
122
|
+
|
123
|
+
context 'when the id and/or affiliate tier id parameters are missing' do
|
124
|
+
it 'raises an exception' do
|
125
|
+
expect { HasOffersV3::Offer.set_tier_payout }.to raise_error ArgumentError
|
126
|
+
end
|
127
|
+
end
|
128
|
+
end
|
129
|
+
|
115
130
|
describe '.remove_payout' do
|
116
131
|
it 'should make a proper request call' do
|
117
132
|
stub_call
|
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.4.
|
4
|
+
version: 0.4.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: 2016-01
|
12
|
+
date: 2016-04-01 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activesupport
|
@@ -156,7 +156,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
156
156
|
version: '0'
|
157
157
|
requirements: []
|
158
158
|
rubyforge_project:
|
159
|
-
rubygems_version: 2.
|
159
|
+
rubygems_version: 2.4.8
|
160
160
|
signing_key:
|
161
161
|
specification_version: 4
|
162
162
|
summary: REST Client for the HasOffers API, version 3.
|