atech-billy 1.0.14 → 1.0.16
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.
- data/lib/billy.rb +3 -2
- data/lib/billy/package.rb +14 -0
- data/lib/billy/product.rb +14 -0
- data/lib/billy/version.rb +3 -0
- metadata +14 -5
data/lib/billy.rb
CHANGED
@@ -9,11 +9,12 @@ require 'billy/base_model'
|
|
9
9
|
require 'billy/service'
|
10
10
|
require 'billy/signup_token'
|
11
11
|
require 'billy/invoice'
|
12
|
+
require 'billy/product'
|
13
|
+
require 'billy/package'
|
14
|
+
require 'billy/version'
|
12
15
|
|
13
16
|
module Billy
|
14
17
|
|
15
|
-
VERSION = '1.0.14'
|
16
|
-
|
17
18
|
class << self
|
18
19
|
|
19
20
|
## Application name & key
|
@@ -0,0 +1,14 @@
|
|
1
|
+
module Billy
|
2
|
+
class Package < BaseModel
|
3
|
+
|
4
|
+
def self.find(permalink)
|
5
|
+
attributes = Billy::Request.request('product/package', :permalink => permalink)
|
6
|
+
attributes.is_a?(Hash) ? self.new(attributes) : nil
|
7
|
+
end
|
8
|
+
|
9
|
+
def hidden?
|
10
|
+
self.attributes.include?('hidden') && self.hidden
|
11
|
+
end
|
12
|
+
|
13
|
+
end
|
14
|
+
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
module Billy
|
2
|
+
class Product < BaseModel
|
3
|
+
|
4
|
+
def self.info
|
5
|
+
attributes = Billy::Request.request('product/info')
|
6
|
+
attributes.is_a?(Hash) ? self.new(attributes) : nil
|
7
|
+
end
|
8
|
+
|
9
|
+
def packages
|
10
|
+
@packages ||= Billy::Request.request('product/packages').map {|package| Billy::Package.new(package) }
|
11
|
+
end
|
12
|
+
|
13
|
+
end
|
14
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: atech-billy
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.16
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2014-05-07 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: basic_ssl
|
16
|
-
requirement:
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,7 +21,12 @@ dependencies:
|
|
21
21
|
version: '0'
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements:
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - ! '>='
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: '0'
|
25
30
|
description:
|
26
31
|
email: adam@atechmedia.com
|
27
32
|
executables: []
|
@@ -31,9 +36,12 @@ files:
|
|
31
36
|
- lib/billy.rb
|
32
37
|
- lib/billy/base_model.rb
|
33
38
|
- lib/billy/invoice.rb
|
39
|
+
- lib/billy/package.rb
|
40
|
+
- lib/billy/product.rb
|
34
41
|
- lib/billy/request.rb
|
35
42
|
- lib/billy/service.rb
|
36
43
|
- lib/billy/signup_token.rb
|
44
|
+
- lib/billy/version.rb
|
37
45
|
homepage: http://atechmedia.com
|
38
46
|
licenses: []
|
39
47
|
post_install_message:
|
@@ -54,8 +62,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
54
62
|
version: '0'
|
55
63
|
requirements: []
|
56
64
|
rubyforge_project:
|
57
|
-
rubygems_version: 1.8.
|
65
|
+
rubygems_version: 1.8.23.2
|
58
66
|
signing_key:
|
59
67
|
specification_version: 3
|
60
68
|
summary: Easy to use client library for Billy
|
61
69
|
test_files: []
|
70
|
+
has_rdoc: false
|