effective_orders 1.3.5 → 1.3.6

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5056701f4a034dabf5156b21f5e6d02683869636
4
- data.tar.gz: 57b623f37257910d6623a4391c71237fe87c45aa
3
+ metadata.gz: 2320934b1b20e85e0b4b43bd665923cf2b162d3e
4
+ data.tar.gz: 2af569b2d128dc78dfce91d0d53e3bd9d39394f0
5
5
  SHA512:
6
- metadata.gz: 3f08fae3d4705001827f035985db3d3b4992b20f28b8f98fc62f627ab1bc9dda791a916033b5d16863212aa9de0ebcee01c5e9635c87ab06ff5945fed3f66a83
7
- data.tar.gz: b65667174a2bfcfb902865abce8082b50e7c904e0dc0a915249ae0b823d4897956adc81c7bcbdea318042b620a941ee2dc98dc95b2b84984f5cb7eab38e4c9e3
6
+ metadata.gz: ffbd42ef26796303772654798396323ad416c670bd72e9c252dcf1890e80461fa4362e9bb8b02a32a42c692163ba94ddea78c8c9127963b2cc9cf82cd2d7d41b
7
+ data.tar.gz: e4c189e58052bd46a814b4cf6fa2c0fa9bbc512d8bb63a2dc03f481b056b978fc2c049e6badbd4f6ca669ee0a3636a0d7677a55b46d90892f54e707a6987897d
@@ -13,6 +13,9 @@ module Effective
13
13
  @page_title ||= 'My Subscriptions'
14
14
 
15
15
  @subscriptions = @customer.subscriptions.purchased
16
+ @active_stripe_subscription = @subscriptions.map(&:stripe_subscription).find do |subscription|
17
+ subscription.present? && subscription.status == 'active' && subscription.current_period_end > Time.zone.now.to_i
18
+ end
16
19
 
17
20
  EffectiveOrders.authorized?(self, :index, Effective::Subscription)
18
21
  end
@@ -1,11 +1,16 @@
1
1
  %h4 Payment Details
2
2
 
3
- %p This order was purchased with the following details:
4
- %br
3
+ - if order.payment.present?
4
+ - if order.purchased?
5
+ %p This order was purchased with the following details:
6
+ - elsif order.declined?
7
+ %p This order was declined with the following details:
5
8
 
6
- %table.table
7
- %tbody
8
- - order.payment.each do |k, v|
9
- %tr
10
- %td= k
11
- %td= v
9
+ %table.table
10
+ %tbody
11
+ - order.payment.each do |k, v|
12
+ %tr
13
+ %td= k
14
+ %td= v
15
+ - else
16
+ %p None
@@ -11,6 +11,10 @@
11
11
  = '-'
12
12
  = link_to 'unsubscribe', effective_orders.subscription_path(subscription.stripe_plan_id), :data => {:method => :delete, :confirm => 'This will cancel your subscription. Are you sure? This cannot be undone.'}
13
13
  = ')'
14
+
15
+ - if @active_stripe_subscription.present?
16
+ %p Your current subscription will be renewed automatically at #{ Time.zone.at(@active_stripe_subscription.current_period_end).strftime('%d-%b-%Y %H:%M') }.
17
+
14
18
  - else
15
19
  %p You have no subscriptions
16
20
 
@@ -1,3 +1,3 @@
1
1
  module EffectiveOrders
2
- VERSION = '1.3.5'.freeze
2
+ VERSION = '1.3.6'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: effective_orders
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.5
4
+ version: 1.3.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Code and Effect
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-03-31 00:00:00.000000000 Z
11
+ date: 2015-04-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails