hasoffersv3 0.4.0 → 0.4.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: 488904130364dca63aaebe483eb85f170bc768ec
4
- data.tar.gz: d8e5195ff89cee5f418bf1a806a5b7018a0487ca
3
+ metadata.gz: 537eb480dbf6608cf635d04031adbf6d6c33a6d7
4
+ data.tar.gz: 57ee201a3270c904e2660e8bc01e8a4f9afc20ba
5
5
  SHA512:
6
- metadata.gz: 3851200de016fdbe5e357e93847e333db04cfe8284849b60bc9dfd64d636eb52154b76ba80286431268b53e937680d25f33b47a2c21259847d26caf63ca856be
7
- data.tar.gz: 35a1c685c0b32a8db00102bfbbb6bc8326e56724f4e2a5271e9ac381bf3734101b7fb305a19c0c90bf54e02720e80b80d371f5c14b041fc823b4acf209268696
6
+ metadata.gz: a861581ccb305f93dd235c44778edca934f1166299e6d1d9caf907cb1d47de51af19490453f28e15fe334047872078285e658bf601dcefa5dd273c5cbc79c088
7
+ data.tar.gz: 2f447bc955d8f3b2a02e06a45bcc7739f39abe2be711d0cd7f25b046e12fab673ae4bb0a5d50db2dd424b528ca17ec847e73efd49b20d1f05df64001ae50e9a2
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 2.2.2
1
+ 2.3.0
data/.travis.yml CHANGED
@@ -1,8 +1,11 @@
1
1
  language: ruby
2
2
  script: bundle exec rspec spec
3
+ before_install:
4
+ - gem install bundler
3
5
  rvm:
4
6
  - 1.9.3
5
7
  - 2.0.0
6
- - 2.1.2
7
- - 2.2.2
8
+ - 2.1.8
9
+ - 2.2.4
10
+ - 2.3.0
8
11
  - ruby-head
data/Gemfile CHANGED
@@ -1,7 +1,2 @@
1
1
  source "https://rubygems.org"
2
2
  gemspec
3
-
4
- # To support Ruby 2.2.0
5
- group :test do
6
- gem 'safe_yaml', github: 'dtao/safe_yaml'
7
- end
@@ -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
@@ -1,3 +1,3 @@
1
1
  class HasOffersV3
2
- VERSION = '0.4.0'
2
+ VERSION = '0.4.1'
3
3
  end
@@ -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.0
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-20 00:00:00.000000000 Z
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.2.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.