beyonic 0.0.7 → 0.0.9

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: aeba5779a730b3dfdd61293744687f12b15bc5dc
4
- data.tar.gz: 6ffd3ceae3a6f3264357e6ff7265c6dea01b23dd
3
+ metadata.gz: 781e00604e42a0ffc49de7be99b6edce8f0dda37
4
+ data.tar.gz: e00d89763bf86fcb71f60287fad0460f0472efa7
5
5
  SHA512:
6
- metadata.gz: 4e34c55a5f250a25e0e84f6c7378c155bf7151bb4825ba51d5b58fee1b39612804b4b42e30c5ba8ceed350d830bb264be6ef7e7ea768a40e22a92d60f3b58d74
7
- data.tar.gz: 572314f3a1fc9b541b506ab9ace642cd6c0f05cff5df4fa50d8325e3d632209ad98c7fd09e75615e765b4da9705a8370f22b2153dd0a465f51936d27760ed7ef
6
+ metadata.gz: 85c97078967b35e74ac40d1f1c4e3a8eaddd77903812ab05aa8863a77772830444c55123cd0d05d9dabbc33d97a0ff20cee80ab740a570756eb9a296dac3fe5d
7
+ data.tar.gz: b475f0895c93e60aab4db848907ac4f10f0645861ae4a111031c6a22ce599884421fa3db509a304e36b785e8e85aad956d14b476189e0243f675de6c0d9d78db
@@ -43,4 +43,11 @@ You can get detailed coverage report at coverage/index.html, after tests has bee
43
43
  For mocks [VCR](https://github.com/vcr/vcr) is used.
44
44
  All recorded API interactions cassettes located on fixtures/vcr_cassettes/ folder.
45
45
 
46
- They can be deleted, in this case on next tests run specs will access to real API and cassettes will be recorded again.
46
+ They can be deleted, in this case on next tests run specs will access to real API and cassettes will be recorded again.
47
+
48
+ ## Releasing
49
+ To release a new version of the gem:
50
+ - Increment the version in lib/beyonic/version.rb
51
+ - Push all code
52
+ - Build the gem with ```gem build beyonic.gemspec```
53
+ - Push the gem to rubygems with ```gem push beyonic-X.X.X.gem```
@@ -15,11 +15,11 @@ module Beyonic
15
15
  end
16
16
 
17
17
  def self.api_version=(version)
18
- @apk_version = version
18
+ @api_version = version
19
19
  end
20
20
 
21
21
  def self.api_version
22
- @apk_version
22
+ @api_version
23
23
  end
24
24
 
25
25
  def self.endpoint_base
@@ -22,7 +22,9 @@ module Beyonic::AbstractApi
22
22
  uri.query_values = payload
23
23
 
24
24
  resp = RestClient.get(@endpoint_url + '?' + uri.query, headers)
25
- Oj.load(resp).map { |obj_attrs| self.new(obj_attrs)}
25
+ ret = self.new(Oj.load(resp))
26
+ ret.results = ret.results.map { |obj_attrs| self.new(obj_attrs)}
27
+ return ret
26
28
  end
27
29
 
28
30
  def get(id)
@@ -48,6 +50,8 @@ module Beyonic::AbstractApi
48
50
  headers_hash = {}
49
51
  headers_hash.merge!({"Authorization" => "Token #{Beyonic.api_key}"}) if Beyonic.api_key
50
52
  headers_hash.merge!({"Beyonic-Version" => Beyonic.api_version}) if Beyonic.api_version
53
+ headers_hash.merge!({"Beyonic-Client" => "Ruby"})
54
+ headers_hash.merge!({"Beyonic-Client-Version" => Beyonic::VERSION})
51
55
  headers_hash
52
56
  end
53
57
 
@@ -2,15 +2,4 @@ require 'ostruct'
2
2
  class Beyonic::Collection < OpenStruct
3
3
  include Beyonic::AbstractApi
4
4
  set_endpoint_resource "collections"
5
-
6
- def self.claim(amount, phonenumber, remote_transaction_id)
7
- self.list(
8
- {
9
- claim: true,
10
- amount: amount,
11
- phonenumber: phonenumber,
12
- remote_transaction_id: remote_transaction_id
13
- }
14
- )
15
- end
16
5
  end
@@ -0,0 +1,5 @@
1
+ require 'ostruct'
2
+ class Beyonic::Contact < OpenStruct
3
+ include Beyonic::AbstractApi
4
+ set_endpoint_resource "contacts"
5
+ end
@@ -1,3 +1,3 @@
1
1
  module Beyonic
2
- VERSION = "0.0.7"
2
+ VERSION = "0.0.9"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: beyonic
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.7
4
+ version: 0.0.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Oleg German
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2015-07-09 00:00:00.000000000 Z
12
+ date: 2015-11-21 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rest-client
@@ -165,6 +165,7 @@ files:
165
165
  - lib/beyonic/abstract_api.rb
166
166
  - lib/beyonic/collection.rb
167
167
  - lib/beyonic/collection_request.rb
168
+ - lib/beyonic/contact.rb
168
169
  - lib/beyonic/payment.rb
169
170
  - lib/beyonic/version.rb
170
171
  - lib/beyonic/webhook.rb
@@ -188,7 +189,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
188
189
  version: '0'
189
190
  requirements: []
190
191
  rubyforge_project:
191
- rubygems_version: 2.4.6
192
+ rubygems_version: 2.4.3
192
193
  signing_key:
193
194
  specification_version: 4
194
195
  summary: Ruby library for the beyonic.com api