hasoffersv3 0.5.0 → 0.5.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/hasoffersv3/affiliate.rb +5 -0
- data/lib/hasoffersv3/version.rb +1 -1
- data/spec/lib/affiliate_spec.rb +18 -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: b4e0d9a5e0923b713c99b151fbca1dd57c82eac6
|
4
|
+
data.tar.gz: c7c9314e466b982bc074b3f244bd1255f806f3ad
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3ec43e771158392096b11134d390eb2cf61d873d208bb6f0393f07cbc8ab0799c71eb820154c3abff8c3015b9b327bf1f89e534285afdeb74ff9000d446cd8eb
|
7
|
+
data.tar.gz: c2323da50c9adcfba14f1da55b9319da65b6636b686e0288f906edc0395cc091422b45b806ce38cc0ffe8bfb6f5246b75004145e5962ce20891389c46c31eb34
|
@@ -9,6 +9,11 @@ class HasOffersV3
|
|
9
9
|
get_request 'findById', params
|
10
10
|
end
|
11
11
|
|
12
|
+
def update(params = {})
|
13
|
+
requires! params, [:id, :data]
|
14
|
+
post_request 'update', params
|
15
|
+
end
|
16
|
+
|
12
17
|
def update_payment_method_wire(params = {})
|
13
18
|
post_request 'updatePaymentMethodWire', params
|
14
19
|
end
|
data/lib/hasoffersv3/version.rb
CHANGED
data/spec/lib/affiliate_spec.rb
CHANGED
@@ -28,6 +28,24 @@ describe HasOffersV3::Affiliate do
|
|
28
28
|
end
|
29
29
|
end
|
30
30
|
|
31
|
+
describe '#update' do
|
32
|
+
it 'makes a proper request call' do
|
33
|
+
response = subject.update id: 1, data: {}
|
34
|
+
expect(a_request(:post, url).with(body: hash_including({'Method' => 'update'}))).to have_been_made
|
35
|
+
validate_call response
|
36
|
+
end
|
37
|
+
|
38
|
+
context 'when required params are missing' do
|
39
|
+
it 'fails without id' do
|
40
|
+
expect { subject.create data: {} }.to raise_error ArgumentError
|
41
|
+
end
|
42
|
+
|
43
|
+
it 'fails without data' do
|
44
|
+
expect { subject.create id: 1 }.to raise_error ArgumentError
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
48
|
+
|
31
49
|
describe '#update_payment_method_wire' do
|
32
50
|
it 'makes a proper request call' do
|
33
51
|
response = subject.update_payment_method_wire
|
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.5.
|
4
|
+
version: 0.5.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-
|
12
|
+
date: 2016-10-17 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activesupport
|