aptible-auth 0.5.6 → 0.5.7

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: 43af2200574e177d95b6c3d6587ab594a096d711
4
- data.tar.gz: 1f21be77e3fc9d7ea5a7e05400e8420b9177716f
3
+ metadata.gz: 0cba1c331d363d180358a0f2df28436a5a6ef08d
4
+ data.tar.gz: 721da9291f441fee611130c4496007e5f799a467
5
5
  SHA512:
6
- metadata.gz: 00d93a335ce00aa9cfbc179784608c562f230a653c05b59a9744b3756ceefe2190974e1833cb5ffd23eee9a27981361bddd56ec39368b169db70fc891da95a36
7
- data.tar.gz: 8382b3ab389cb188ea93fd641bdf569c22daab3303647174ecf0c49ec4ca04fef9b0f7f572610bbf2f0fc79c6cd3a3f1390a83c67ae2a711aee187f2243c8dd8
6
+ metadata.gz: d749065c3f32d30d0474966ddbfbb507ff57eecb60ade9a4b4f75e6ac3f1d8f054f0ceaab7db9c9c9df7080cf40723425fc4e464209035771daf5fe0373d58f8
7
+ data.tar.gz: 571c6b6e88d2c021d988c019c4319df12b33832d17b3ac2d8e8c7376f5635f76ca84c37de7516589025805edfa22b7a8e85f060b5f8fc6092a9e350aab634604
data/aptible-auth.gemspec CHANGED
@@ -20,6 +20,7 @@ Gem::Specification.new do |spec|
20
20
  spec.require_paths = ['lib']
21
21
 
22
22
  spec.add_dependency 'aptible-resource', '>= 0.2.1'
23
+ spec.add_dependency 'stripe', '>= 1.13.0'
23
24
  spec.add_dependency 'gem_config'
24
25
  spec.add_dependency 'oauth2-aptible'
25
26
 
@@ -1,3 +1,5 @@
1
+ require 'stripe'
2
+
1
3
  module Aptible
2
4
  module Auth
3
5
  class Organization < Resource
@@ -17,6 +19,11 @@ module Aptible
17
19
  field :address
18
20
  field :stripe_customer_id
19
21
 
22
+ def stripe_customer
23
+ return if stripe_customer_id.nil?
24
+ @stripe_customer ||= Stripe::Customer.retrieve(stripe_customer_id)
25
+ end
26
+
20
27
  def security_officer
21
28
  # REVIEW: Examine underlying data model for a less arbitrary solution
22
29
  security_officers_role = roles.find do |role|
@@ -1,5 +1,5 @@
1
1
  module Aptible
2
2
  module Auth
3
- VERSION = '0.5.6'
3
+ VERSION = '0.5.7'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aptible-auth
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.6
4
+ version: 0.5.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Frank Macreery
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-06-13 00:00:00.000000000 Z
11
+ date: 2014-06-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aptible-resource
@@ -24,6 +24,20 @@ dependencies:
24
24
  - - ">="
25
25
  - !ruby/object:Gem::Version
26
26
  version: 0.2.1
27
+ - !ruby/object:Gem::Dependency
28
+ name: stripe
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: 1.13.0
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: 1.13.0
27
41
  - !ruby/object:Gem::Dependency
28
42
  name: gem_config
29
43
  requirement: !ruby/object:Gem::Requirement