geocerts 0.0.19 → 0.0.20

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.19
1
+ 0.0.20
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{geocerts}
8
- s.version = "0.0.19"
8
+ s.version = "0.0.20"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["GeoCerts, Inc."]
@@ -39,6 +39,7 @@ Gem::Specification.new do |s|
39
39
  "lib/geo_certs/endpoints/hello.rb",
40
40
  "lib/geo_certs/endpoints/orders.rb",
41
41
  "lib/geo_certs/endpoints/products.rb",
42
+ "lib/geo_certs/endpoints/resellers.rb",
42
43
  "lib/geo_certs/errors.rb",
43
44
  "lib/geo_certs/event.rb",
44
45
  "lib/geo_certs/exceptions.rb",
@@ -52,6 +53,7 @@ Gem::Specification.new do |s|
52
53
  "lib/geo_certs/order/renewal_information.rb",
53
54
  "lib/geo_certs/parsers/order_parser.rb",
54
55
  "lib/geo_certs/product.rb",
56
+ "lib/geo_certs/reseller.rb",
55
57
  "lib/geocerts.rb",
56
58
  "test/config/initializers/_remote_tests.rb",
57
59
  "test/config/initializers/fakeweb.rb",
@@ -7,12 +7,14 @@ require 'geo_certs/order'
7
7
  require 'geo_certs/certificate'
8
8
  require 'geo_certs/agreement'
9
9
  require 'geo_certs/event'
10
+ require 'geo_certs/reseller'
10
11
  require 'geo_certs/hello'
11
12
  require 'geo_certs/endpoints/orders'
12
13
  require 'geo_certs/endpoints/certificates'
13
14
  require 'geo_certs/endpoints/agreements'
14
15
  require 'geo_certs/endpoints/products'
15
16
  require 'geo_certs/endpoints/events'
17
+ require 'geo_certs/endpoints/resellers'
16
18
  require 'geo_certs/endpoints/hello'
17
19
 
18
20
  module GeoCerts
@@ -26,6 +28,7 @@ module GeoCerts
26
28
  include Endpoints::Products
27
29
  include Endpoints::Agreements
28
30
  include Endpoints::Events
31
+ include Endpoints::Resellers
29
32
  include Endpoints::Hello
30
33
  end
31
34
 
@@ -0,0 +1,23 @@
1
+ module GeoCerts
2
+ module Endpoints # :nodoc:
3
+
4
+ module Resellers # :nodoc:
5
+
6
+ def self.included(base)
7
+ base.class_eval do
8
+ endpoint GeoCerts::API::ENDPOINT do
9
+
10
+ action :balance, :url => '/reseller/balance', :method => :get do
11
+ parser Parsers::OrderParser do
12
+ element :balance
13
+ end
14
+ end
15
+
16
+ end
17
+ end
18
+ end
19
+
20
+ end
21
+
22
+ end
23
+ end
@@ -0,0 +1,13 @@
1
+ require 'geo_certs/api_object'
2
+
3
+ module GeoCerts
4
+
5
+ class Reseller < ApiObject
6
+
7
+ def self.balance
8
+ call_api { GeoCerts.api.balance }[:balance].to_f
9
+ end
10
+
11
+ end
12
+
13
+ end
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 0
8
- - 19
9
- version: 0.0.19
8
+ - 20
9
+ version: 0.0.20
10
10
  platform: ruby
11
11
  authors:
12
12
  - GeoCerts, Inc.
@@ -119,6 +119,7 @@ files:
119
119
  - lib/geo_certs/endpoints/hello.rb
120
120
  - lib/geo_certs/endpoints/orders.rb
121
121
  - lib/geo_certs/endpoints/products.rb
122
+ - lib/geo_certs/endpoints/resellers.rb
122
123
  - lib/geo_certs/errors.rb
123
124
  - lib/geo_certs/event.rb
124
125
  - lib/geo_certs/exceptions.rb
@@ -132,6 +133,7 @@ files:
132
133
  - lib/geo_certs/order/renewal_information.rb
133
134
  - lib/geo_certs/parsers/order_parser.rb
134
135
  - lib/geo_certs/product.rb
136
+ - lib/geo_certs/reseller.rb
135
137
  - lib/geocerts.rb
136
138
  - test/config/initializers/_remote_tests.rb
137
139
  - test/config/initializers/fakeweb.rb