soapy_cake 1.9.0 → 1.9.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/soapy_cake/admin.rb +6 -0
- data/lib/soapy_cake/admin_addedit.rb +4 -4
- data/lib/soapy_cake/version.rb +1 -1
- data/spec/lib/soapy_cake/admin_spec.rb +6 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ea9584bb763869cd93d048f7c4a8f02fc113a73b
|
4
|
+
data.tar.gz: 4c02757fafc59bfba147c7a4058a77e1b331aa78
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0e848ae42f70a6eb12001dd74fb58371c3569951adf78920f27d9b544b2657effe11e201b605aa5ff5fa78639f424e5f1b419657ae43b7501cb94870a88e7d29
|
7
|
+
data.tar.gz: bfe7627ac362b16e36374a3c25b5b992461c980768e769868001e5fe9c5ab977077c82e6e11e2730b6126165d88d6a70557fc562167cc3fce7c756842814c9d6
|
data/lib/soapy_cake/admin.rb
CHANGED
@@ -78,6 +78,12 @@ module SoapyCake
|
|
78
78
|
run Request.new(:admin, :reports, :caps, opts)
|
79
79
|
end
|
80
80
|
|
81
|
+
def exchange_rates(opts)
|
82
|
+
require_params(opts, %i(start_date end_date))
|
83
|
+
|
84
|
+
run Request.new(:admin, :get, :exchange_rates, opts)
|
85
|
+
end
|
86
|
+
|
81
87
|
def currencies
|
82
88
|
run Request.new(:admin, :get, :currencies, {})
|
83
89
|
end
|
@@ -69,7 +69,7 @@ module SoapyCake
|
|
69
69
|
offer_contract_is_default use_fallback_targeting
|
70
70
|
)
|
71
71
|
|
72
|
-
def add_offer(opts
|
72
|
+
def add_offer(opts)
|
73
73
|
require_params(opts, REQUIRED_NEW_OFFER_PARAMS)
|
74
74
|
|
75
75
|
addedit_offer(opts.merge(offer_id: 0))
|
@@ -87,7 +87,7 @@ module SoapyCake
|
|
87
87
|
run Request.new(:admin, :addedit, :contact, opts)
|
88
88
|
end
|
89
89
|
|
90
|
-
def add_geo_targets(opts
|
90
|
+
def add_geo_targets(opts)
|
91
91
|
require_params(opts, %i(offer_contract_id allow_countries))
|
92
92
|
|
93
93
|
if opts[:allow_countries]
|
@@ -128,7 +128,7 @@ module SoapyCake
|
|
128
128
|
addedit_offer_contract(opts)
|
129
129
|
end
|
130
130
|
|
131
|
-
def update_caps(opts
|
131
|
+
def update_caps(opts)
|
132
132
|
require_params(opts, %i(cap_type_id cap_interval_id cap_amount send_alert_only))
|
133
133
|
|
134
134
|
translate_values!(opts, %i(cap_type_id cap_interval_id))
|
@@ -136,7 +136,7 @@ module SoapyCake
|
|
136
136
|
run Request.new(:admin, :addedit, :caps, opts)
|
137
137
|
end
|
138
138
|
|
139
|
-
def add_offer_tier(opts
|
139
|
+
def add_offer_tier(opts)
|
140
140
|
require_params(opts, %i(offer_id tier_id price_format_id offer_contract_id status_id))
|
141
141
|
|
142
142
|
opts.merge!(redirect_offer_contract_id: -1, add_edit_option: 'add')
|
data/lib/soapy_cake/version.rb
CHANGED
@@ -137,6 +137,12 @@ RSpec.describe SoapyCake::Admin do
|
|
137
137
|
it_behaves_like 'a cake admin method'
|
138
138
|
end
|
139
139
|
|
140
|
+
describe '#exchange_rates' do
|
141
|
+
let(:method) { :exchange_rates }
|
142
|
+
let(:cake_opts) { { start_date: '2015-07-01', end_date: '2015-07-07' } }
|
143
|
+
it_behaves_like 'a cake admin method'
|
144
|
+
end
|
145
|
+
|
140
146
|
describe '#tiers' do
|
141
147
|
let(:method) { :tiers }
|
142
148
|
let(:cake_method) { :affiliate_tiers }
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: soapy_cake
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.9.
|
4
|
+
version: 1.9.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ad2games GmbH
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-06-
|
11
|
+
date: 2015-06-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|