invoicing_payments_processing 1.1.31 → 1.1.32
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 +4 -4
- data/lib/invoice.rb +7 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 767d1959445a933872a088246a96ce835a7aa1c1
|
4
|
+
data.tar.gz: a6d3dc28e802706eb1360daf4c5c16940e6a49c7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5ce9bd86e5bc541e6887b48c86c1086b854b0640a3e106881241a4285d0b660251c6987d9157ad803b60b865924fa65417a876f789bba45cb6475f190831011b
|
7
|
+
data.tar.gz: 06758180d0eaa6004a541fe5eb89a13b9590357acdbe1ccb45b3d198f9cfb097002ff664420dca02594672eb53133fa4d84746d6879769e83f6d0be9085d211e
|
data/lib/invoice.rb
CHANGED
@@ -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]
|