hasoffersv3 0.2.4 → 0.2.6

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 667f1f3af61d4c3eb35c8ca1eebdaa767b9fd0bb
4
- data.tar.gz: 405df6a514919f645e3529a479fd704d8ff54203
3
+ metadata.gz: 14bbd72a409f04c3d63cf07b9417afdde9c296a7
4
+ data.tar.gz: 94b5449a542c94b181efa8f3b83fe34b45304f18
5
5
  SHA512:
6
- metadata.gz: 9919ca8819a7b8272242d91bac0f0c0444cde8f320da829883e4ee8f185a67305e923dd0656f63032b6a6d33ade94784efa5f5129e0812c04efda6a18b2af3f9
7
- data.tar.gz: 41e1bd782835fd46ea53907952a028c3b3826c9c5776ba26d0ef65271845a31b9d5412d8b3b64927f16575dfca2765f1d2907694a1daf934e30b77db070460a9
6
+ metadata.gz: aa0db833b68b053dd514b5a0f6fde0ed8a8152f7f5c9f7b4256133afca5d83275313e0cd5d95d2d848b9b973f440eb5750ff4b435cfb1749aba0a674da7555c3
7
+ data.tar.gz: be9248e2502ead5ab04769039b52017f1cca049de8b9a8801ae29e8d03166b4bfcbd9593f74ae9b994f7b5e7dead15b76d80f31e12e73014b54ad9f41c86161c
data/CHANGELOG.md CHANGED
@@ -1,3 +1,6 @@
1
+ # 0.2.5
2
+ - Support "Application/findAllAffiliateTiers" method
3
+
1
4
  # 0.2.4
2
5
  - Support "Offer/getTierPayouts" method
3
6
  - Support "Affiliate/getAffiliateTier" method
@@ -0,0 +1,9 @@
1
+ class HasOffersV3
2
+ class Application < Base
3
+ class << self
4
+ def get_payout_tiers(params = {})
5
+ get_request 'findAllAffiliateTiers', params
6
+ end
7
+ end
8
+ end
9
+ end
@@ -14,7 +14,7 @@ class HasOffersV3
14
14
 
15
15
  DEFAULTS = {
16
16
  host: 'api.hasoffers.com',
17
- protocol: 'http',
17
+ protocol: 'https',
18
18
  base_path: '/v3',
19
19
  network_id: '',
20
20
  api_key: '',
@@ -1,3 +1,3 @@
1
1
  class HasOffersV3
2
- VERSION = '0.2.4'
2
+ VERSION = '0.2.6'
3
3
  end
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!.each do |file|
6
+ %w!base affiliate response conversion raw_log report configuration advertiser advertiser_user offer application!.each do |file|
7
7
  require "hasoffersv3/#{file}"
8
8
  end
9
9
 
@@ -24,7 +24,8 @@ class HasOffersV3
24
24
  conversions: HasOffersV3::Conversion,
25
25
  offers: HasOffersV3::Offer,
26
26
  raw_logs: HasOffersV3::RawLog,
27
- reports: HasOffersV3::Report
27
+ reports: HasOffersV3::Report,
28
+ application: HasOffersV3::Application
28
29
  }
29
30
 
30
31
  class << self
@@ -10,7 +10,7 @@ describe HasOffersV3::AffiliateOffer do
10
10
  end
11
11
 
12
12
  context 'urls' do
13
- specify { expect(url).to eq('http://api.hasoffers.com/v3/Affiliate_Offer.json') }
13
+ specify { expect(url).to eq('https://api.hasoffers.com/v3/Affiliate_Offer.json') }
14
14
  end
15
15
 
16
16
  describe '.find_all' do
@@ -0,0 +1,15 @@
1
+ require 'spec_helper'
2
+
3
+ describe HasOffersV3::Application do
4
+ let(:url) { Regexp.new api_url('Application') }
5
+
6
+ describe '.get_payout_tiers' do
7
+ subject { HasOffersV3::Application }
8
+ it 'should make a proper request call' do
9
+ stub_call :get
10
+ response = subject.get_payout_tiers
11
+ expect(a_request(:get, url).with(query: hash_including({'Method' => 'findAllAffiliateTiers'}))).to have_been_made
12
+ validate_call response
13
+ end
14
+ end
15
+ end
@@ -13,10 +13,10 @@ describe HasOffersV3::Client do
13
13
 
14
14
  it 'should be different configs' do
15
15
  default_connection = HasOffersV3::Client.new(configuration_to_default_host)
16
- expect(default_connection.base_uri).to eq('http://api.hasoffers.com/v3')
16
+ expect(default_connection.base_uri).to eq('https://api.hasoffers.com/v3')
17
17
 
18
18
  proxy_connection = HasOffersV3::Client.new(config_for_proxy)
19
- expect(proxy_connection.base_uri).to eq('http://api.applift.com/v3')
19
+ expect(proxy_connection.base_uri).to eq('https://api.applift.com/v3')
20
20
  end
21
21
 
22
22
  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.4
4
+ version: 0.2.6
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: 2015-05-21 00:00:00.000000000 Z
12
+ date: 2015-07-31 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activesupport
@@ -108,6 +108,7 @@ files:
108
108
  - lib/hasoffersv3/affiliate.rb
109
109
  - lib/hasoffersv3/affiliate_billing.rb
110
110
  - lib/hasoffersv3/affiliate_offer.rb
111
+ - lib/hasoffersv3/application.rb
111
112
  - lib/hasoffersv3/base.rb
112
113
  - lib/hasoffersv3/client.rb
113
114
  - lib/hasoffersv3/configuration.rb
@@ -125,6 +126,7 @@ files:
125
126
  - spec/lib/affiliate_billing_spec.rb
126
127
  - spec/lib/affiliate_offer_spec.rb
127
128
  - spec/lib/affiliate_spec.rb
129
+ - spec/lib/application_spec.rb
128
130
  - spec/lib/base_spec.rb
129
131
  - spec/lib/client_spec.rb
130
132
  - spec/lib/conversion_spec.rb
@@ -165,6 +167,7 @@ test_files:
165
167
  - spec/lib/affiliate_billing_spec.rb
166
168
  - spec/lib/affiliate_offer_spec.rb
167
169
  - spec/lib/affiliate_spec.rb
170
+ - spec/lib/application_spec.rb
168
171
  - spec/lib/base_spec.rb
169
172
  - spec/lib/client_spec.rb
170
173
  - spec/lib/conversion_spec.rb