atech-billy 1.0.11 → 1.0.12

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.
Files changed (3) hide show
  1. data/lib/billy.rb +1 -1
  2. data/lib/billy/service.rb +7 -11
  3. metadata +12 -7
@@ -12,7 +12,7 @@ require 'billy/invoice'
12
12
 
13
13
  module Billy
14
14
 
15
- VERSION = '1.0.11'
15
+ VERSION = '1.0.12'
16
16
 
17
17
  class << self
18
18
 
@@ -1,6 +1,11 @@
1
1
  module Billy
2
2
  class Service < BaseModel
3
3
 
4
+ ## Get a paginated list of all Billy services
5
+ def list
6
+ Billy::Request.request('services/list')
7
+ end
8
+
4
9
  ## Update an existing service by passing new properties
5
10
  def update(properties)
6
11
  @attributes = Billy::Request.request('services/update', :service => @attributes['id'],:properties => properties)
@@ -9,17 +14,8 @@ module Billy
9
14
 
10
15
  ## Create a new login session and return a URL which can be used to log the user
11
16
  ## into the billing application
12
- def create_session(start_path = nil, return_url = nil)
13
- options = {}
14
- options[:id] = @attributes['id']
15
- options[:start_path] = start_path
16
- if return_url.is_a?(Hash)
17
- options.merge!(return_url)
18
- else
19
- options[:return_url] = return_url.to_s
20
- end
21
- puts options.inspect
22
- session = Billy::Request.request('services/create_session', options)
17
+ def create_session(start_path = nil, return_url = nil, auto_return_after_payment = false)
18
+ session = Billy::Request.request('services/create_session', :id => @attributes['id'], :start_path => start_path, :return_url => return_url, :auto_return_after_payment => auto_return_after_payment)
23
19
  session ? [Billy.host, 'start', session['token']].join('/') : false
24
20
  end
25
21
 
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.11
4
+ version: 1.0.12
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: 2012-06-18 00:00:00.000000000 Z
12
+ date: 2012-07-21 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: basic_ssl
16
- requirement: &70330707806540 !ruby/object:Gem::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: *70330707806540
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: []
@@ -30,10 +35,10 @@ extra_rdoc_files: []
30
35
  files:
31
36
  - lib/billy.rb
32
37
  - lib/billy/base_model.rb
38
+ - lib/billy/signup_token.rb
39
+ - lib/billy/service.rb
33
40
  - lib/billy/invoice.rb
34
41
  - lib/billy/request.rb
35
- - lib/billy/service.rb
36
- - lib/billy/signup_token.rb
37
42
  homepage: http://atechmedia.com
38
43
  licenses: []
39
44
  post_install_message:
@@ -54,7 +59,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
54
59
  version: '0'
55
60
  requirements: []
56
61
  rubyforge_project:
57
- rubygems_version: 1.8.17
62
+ rubygems_version: 1.8.24
58
63
  signing_key:
59
64
  specification_version: 3
60
65
  summary: Easy to use client library for Billy