hasoffersv3 0.5.0 → 0.5.1

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: d6d4931962a54c3bf75cc4169d8655914a15545c
4
- data.tar.gz: f780dbccf7809ffa58f85c71a86b48c9061d185f
3
+ metadata.gz: b4e0d9a5e0923b713c99b151fbca1dd57c82eac6
4
+ data.tar.gz: c7c9314e466b982bc074b3f244bd1255f806f3ad
5
5
  SHA512:
6
- metadata.gz: c65325e39ed7c68f52e94b657f0626723921c7927be29a4da35e0d208d1f8cb56f3cb0212c32ef16baddbb9947d21b4f7dfd672fd96b464a39ebd817d65e00b4
7
- data.tar.gz: cdd6b8143f3c9b0895a93c7042a65f4cbf0aea5240413a9b5a69ef22c3a161254e567436d55be75695622891d1473bc39449b2d32961682d3cd9c5c17804190b
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
@@ -1,3 +1,3 @@
1
1
  class HasOffersV3
2
- VERSION = '0.5.0'
2
+ VERSION = '0.5.1'
3
3
  end
@@ -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.0
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-08-25 00:00:00.000000000 Z
12
+ date: 2016-10-17 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activesupport