hasoffersv3 0.6.0 → 0.6.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: 0ae8c8dcc8a60460f3f3a0954be68f9a9a2208b0
4
- data.tar.gz: e8c79bdcb82d3806749f5cb3b6cc9c7b541e79df
3
+ metadata.gz: 6e1a91847f99ca583f510d683e5b3a5b919fa783
4
+ data.tar.gz: b2656d345695ee2d376198864d42476c84c3a13e
5
5
  SHA512:
6
- metadata.gz: 976cb9593dfbed447919aac92021c5a268a696aed5e2627f586b83bd1c59a20614306947093f788aba639131f7aa390d6c5c269f1631bcac9e48c7bfcc720431
7
- data.tar.gz: ea19c6886c520a074a274b6710734f17f26b2b97d38d0c12f02aaa40e5010f242910869ef75c070fb911c3c4051792685c18ec7448b079313b92bbe4635996cf
6
+ metadata.gz: '08126a5846feb34d300d840531c5008b0ee7cc30c4610b6518d818889b39aef75cc4788f09891619b0f9794c1fe1712932df7d53b0f5cabaa939507971c5de16'
7
+ data.tar.gz: 2f9f9387e8ea730633552e2f9feee88a148c7b4c5ea09da642cf82a5d2f8f178e483b01a494fb6109cb4d70040ee32a2703aada907967933ccce00811b802d0b
data/.travis.yml CHANGED
@@ -3,7 +3,7 @@ script: bundle exec rspec spec
3
3
  before_install:
4
4
  - gem install bundler
5
5
  rvm:
6
- - 2.2.5
7
- - 2.3.1
8
- - 2.4.0
6
+ - 2.2.7
7
+ - 2.3.4
8
+ - 2.4.1
9
9
  - ruby-head
data/CHANGELOG.md CHANGED
@@ -1,3 +1,6 @@
1
+ # 0.6.1
2
+ - [#63] Added `HasOffersV3::Goal` method (@xingftw)
3
+
1
4
  # 0.6.0
2
5
  - [#61] Added configurable (via `config.raise_errors = true`) raising of internal exceptions (`HasOffersV3::Error` and its descendants) on various API error conditions. Incompatible changes: JSON parsing error now raises a `HasOffersV3::ParseError` that wraps the original error from a particular JSON driver used. (@vittorius)
3
6
 
data/README.md CHANGED
@@ -13,6 +13,7 @@ Supported ruby versions:
13
13
 
14
14
  * 2.2
15
15
  * 2.3
16
+ * 2.4
16
17
 
17
18
  ## Installation
18
19
 
data/hasoffersv3.gemspec CHANGED
@@ -7,8 +7,8 @@ Gem::Specification.new do |s|
7
7
  s.name = 'hasoffersv3'
8
8
  s.version = HasOffersV3::VERSION
9
9
  s.platform = Gem::Platform::RUBY
10
- s.authors = ['Maximilian Seifert', 'Timo Rößner']
11
- s.email = ['ms@hitfox.com', 'tr@hitfox.com']
10
+ s.authors = ['PubNative', 'Applift']
11
+ s.email = ['tech@pubnative.net', 'tech@applift.com']
12
12
  s.summary = %q{REST Client for the HasOffers API, version 3.}
13
13
  s.description = %q{REST Client for the HasOffers API, version 3.}
14
14
  s.license = "MIT"
data/lib/hasoffersv3.rb CHANGED
@@ -3,7 +3,7 @@ require 'json'
3
3
 
4
4
  require 'hasoffersv3/client'
5
5
 
6
- %w!base affiliate response conversion raw_log report configuration advertiser advertiser_user offer offer_pixel employee application logger!.each do |file|
6
+ %w!base affiliate response conversion raw_log report configuration advertiser advertiser_user offer offer_pixel employee application goal logger!.each do |file|
7
7
  require "hasoffersv3/#{file}"
8
8
  end
9
9
 
@@ -26,7 +26,8 @@ class HasOffersV3
26
26
  offer_pixels: HasOffersV3::OfferPixel,
27
27
  raw_logs: HasOffersV3::RawLog,
28
28
  reports: HasOffersV3::Report,
29
- application: HasOffersV3::Application
29
+ application: HasOffersV3::Application,
30
+ goal: HasOffersV3::Goal
30
31
  }
31
32
 
32
33
  class << self
@@ -0,0 +1,11 @@
1
+ class HasOffersV3
2
+ class Goal < Base
3
+ def find_all(params = {})
4
+ post_request 'findAll', params
5
+ end
6
+
7
+ def get_tier_payouts(params = {})
8
+ post_request 'getTierPayouts', params
9
+ end
10
+ end
11
+ end
@@ -1,3 +1,3 @@
1
1
  class HasOffersV3
2
- VERSION = '0.6.0'
2
+ VERSION = '0.6.1'
3
3
  end
@@ -0,0 +1,21 @@
1
+ describe HasOffersV3::Goal do
2
+ let(:url) { api_url 'Goal' }
3
+
4
+ describe '#find_all' do
5
+ it 'makes a proper request call' do
6
+ stub_call
7
+ response = subject.find_all
8
+ expect(a_request(:post, url).with(body: hash_including({'Method' => 'findAll'}))).to have_been_made
9
+ validate_call response
10
+ end
11
+ end
12
+
13
+ describe '#get_tier_payouts' do
14
+ it 'makes a proper request call' do
15
+ stub_call
16
+ response = subject.get_tier_payouts
17
+ expect(a_request(:post, url).with(body: hash_including({'Method' => 'getTierPayouts'}))).to have_been_made
18
+ validate_call response
19
+ end
20
+ end
21
+ end
metadata CHANGED
@@ -1,15 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hasoffersv3
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0
4
+ version: 0.6.1
5
5
  platform: ruby
6
6
  authors:
7
- - Maximilian Seifert
8
- - Timo Rößner
7
+ - PubNative
8
+ - Applift
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2017-07-11 00:00:00.000000000 Z
12
+ date: 2017-11-21 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activesupport
@@ -83,8 +83,8 @@ dependencies:
83
83
  version: '0'
84
84
  description: REST Client for the HasOffers API, version 3.
85
85
  email:
86
- - ms@hitfox.com
87
- - tr@hitfox.com
86
+ - tech@pubnative.net
87
+ - tech@applift.com
88
88
  executables: []
89
89
  extensions: []
90
90
  extra_rdoc_files: []
@@ -113,6 +113,7 @@ files:
113
113
  - lib/hasoffersv3/conversion.rb
114
114
  - lib/hasoffersv3/employee.rb
115
115
  - lib/hasoffersv3/error.rb
116
+ - lib/hasoffersv3/goal.rb
116
117
  - lib/hasoffersv3/logger.rb
117
118
  - lib/hasoffersv3/offer.rb
118
119
  - lib/hasoffersv3/offer_pixel.rb
@@ -133,6 +134,7 @@ files:
133
134
  - spec/lib/configuration_spec.rb
134
135
  - spec/lib/conversion_spec.rb
135
136
  - spec/lib/employee_spec.rb
137
+ - spec/lib/goal_spec.rb
136
138
  - spec/lib/hasoffersv3_spec.rb
137
139
  - spec/lib/logger_spec.rb
138
140
  - spec/lib/offer_pixel_spec.rb
@@ -161,7 +163,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
161
163
  version: '0'
162
164
  requirements: []
163
165
  rubyforge_project:
164
- rubygems_version: 2.6.11
166
+ rubygems_version: 2.6.13
165
167
  signing_key:
166
168
  specification_version: 4
167
169
  summary: REST Client for the HasOffers API, version 3.
@@ -178,6 +180,7 @@ test_files:
178
180
  - spec/lib/configuration_spec.rb
179
181
  - spec/lib/conversion_spec.rb
180
182
  - spec/lib/employee_spec.rb
183
+ - spec/lib/goal_spec.rb
181
184
  - spec/lib/hasoffersv3_spec.rb
182
185
  - spec/lib/logger_spec.rb
183
186
  - spec/lib/offer_pixel_spec.rb