invoicing_payments_processing 1.1.31 → 1.1.32

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/invoice.rb +7 -1
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 91c8cdb3f2b07357df4ed4d7e53b42f3d13ccce9
4
- data.tar.gz: 60242afcacd6a836b87324255b0a39af9cad79e7
3
+ metadata.gz: 767d1959445a933872a088246a96ce835a7aa1c1
4
+ data.tar.gz: a6d3dc28e802706eb1360daf4c5c16940e6a49c7
5
5
  SHA512:
6
- metadata.gz: 9c0951c13e1665cb9c5b5e16a5fa1024667fcd2178701d7c9f8ab8ab620a95837b45f5a8375c283eeb36dff9f240159deac6a5864d0be3ab75f6fbae0f2d4133
7
- data.tar.gz: 6cb8ab4e9a8332c7d934a3629e673a0869a62076a03dc2177987e1eec1e515a56f981b1cfdac44e33efc5c50c98f4b5b8fb67dd868dd2057f4e1c6e83e331503
6
+ metadata.gz: 5ce9bd86e5bc541e6887b48c86c1086b854b0640a3e106881241a4285d0b660251c6987d9157ad803b60b865924fa65417a876f789bba45cb6475f190831011b
7
+ data.tar.gz: 06758180d0eaa6004a541fe5eb89a13b9590357acdbe1ccb45b3d198f9cfb097002ff664420dca02594672eb53133fa4d84746d6879769e83f6d0be9085d211e
@@ -10,10 +10,16 @@ module BlackStack
10
10
 
11
11
  many_to_one :buffer_paypal_notification, :class=>:'BlackStack::BufferPayPalNotification', :key=>:id_buffer_paypal_notification
12
12
  many_to_one :client, :class=>:'BlackStack::Client', :key=>:id_client
13
- many_to_one :paypal_subscription, :class=>:'BlackStack::PayPalSubscription', :key=>:id_paypal_subscription
13
+ #many_to_one :paypal_subscription, :class=>:'BlackStack::PayPalSubscription', :key=>:id_paypal_subscription
14
14
  many_to_one :previous, :class=>:'BlackStack::Invoice', :key=>:id_previous_invoice
15
15
  one_to_many :items, :class=>:'BlackStack::InvoiceItem', :key=>:id_invoice
16
16
 
17
+ def paypal_subscription
18
+ return nil if self.subscr_id.nil?
19
+ return nil if self.subscr_id.to_s.size == 0
20
+ return BlackStack::PayPalSubscription.where(:code=>self.subscr_id.to_s).first
21
+ end
22
+
17
23
  # compara 2 planes, y retorna TRUE si ambos pueden coexistir en una misma facutra, con un mismo enlace de PayPal
18
24
  def self.compatibility?(h, i)
19
25
  return false if h[:type]!=i[:type]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: invoicing_payments_processing
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.31
4
+ version: 1.1.32
5
5
  platform: ruby
6
6
  authors:
7
7
  - Leandro Daniel Sardi