colt 0.4.1 → 0.4.2

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: 1e77c3660366de6056175fbfd1df9eaae7edd1a3
4
- data.tar.gz: 5018549f0238f82f79bab3e32abdd75248918775
3
+ metadata.gz: 5538b127725452e8dcfeff0fdf7d11c59eefa988
4
+ data.tar.gz: 14e73505495494a5a5b51a42acf3532736095a1c
5
5
  SHA512:
6
- metadata.gz: eb82c1e175443abf71059b426a535e0a226c880cb2975a05a53c20edec166a0d0dbd152608f3e10ff065da5c5229ce173ca59cfe1ef4694837c31928fd2f66d4
7
- data.tar.gz: 39ee2e0fc5a401b7753d74517afb4097f0c74dab6591d258cbe9228ddf068c51aadbf5e5b8ea6652fca1c463ab928fffd09f3c09b8e5356bfa31b79136cafafb
6
+ metadata.gz: 4bcd17dc2be6b15b69c13c1ccad2ff67ffb5d76128c4dde92abfadc629606c7a3291096958e3806362fe27742308b113eb37de780704b7caaffd7657e1548eaf
7
+ data.tar.gz: e302370cc23002fb92a9ec7b63eb5e7789b013a49bcadfd114d3d6baddf418ab5c9038478788818287a6af56280cbfa1810443fc842b0385911d636779bf648d
@@ -15,7 +15,7 @@ ERROR
15
15
  begin
16
16
  ::Stripe::Account.retrieve
17
17
  rescue ::Stripe::AuthenticationError => e
18
- raise Exception.new(message)
18
+ raise e
19
19
  end
20
20
  end
21
21
  end
@@ -4,6 +4,7 @@ module Colt
4
4
  #
5
5
  # Adds a new credit card as the active default card for an existing customer
6
6
  #
7
+ # Returns : ?
7
8
  def self.add(stripe_customer_id, stripe_token)
8
9
  customer = Stripe::Customer.retrieve(stripe_customer_id)
9
10
  card = customer.sources.create(source: stripe_token)
@@ -15,6 +16,7 @@ module Colt
15
16
  #
16
17
  # Create a new credit card for a customer
17
18
  #
19
+ # Returns : ?
18
20
  def self.save(stripe_token, description)
19
21
  Stripe::Customer.create(card: stripe_token, description: description)
20
22
  end
@@ -22,6 +24,7 @@ module Colt
22
24
  #
23
25
  # Update expiration date of an existing credit card for a customer
24
26
  #
27
+ # Returns ?
25
28
  def self.update_expiration_date(stripe_customer_id, card_month, card_year)
26
29
  customer = Stripe::Customer.retrieve(stripe_customer_id)
27
30
  card = customer.sources.first
@@ -5,8 +5,9 @@ module Colt
5
5
  class SubscriptionPayment
6
6
  SUBSCRIPTION_PAYMENT_FAILED = "invoice.payment_failed"
7
7
 
8
+ # Retrieving the event from the Stripe API guarantees its authenticity
8
9
  def initialize(id)
9
- @event = Stripe::Event.retrieve(@id)
10
+ @event = Stripe::Event.retrieve(id)
10
11
  end
11
12
 
12
13
  def failed?
@@ -1,3 +1,3 @@
1
1
  module Colt
2
- VERSION = "0.4.1"
2
+ VERSION = "0.4.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: colt
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.1
4
+ version: 0.4.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bala Paranj