cameroncox-mousetrap 0.5.3.5 → 0.5.3.6
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/lib/mousetrap/subscription.rb +13 -10
- metadata +1 -1
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.5.3.
|
1
|
+
0.5.3.6
|
@@ -54,19 +54,22 @@ module Mousetrap
|
|
54
54
|
|
55
55
|
def current_invoice
|
56
56
|
invoice_record = if invoices.kind_of?(Array)
|
57
|
-
|
57
|
+
Invoice.new({
|
58
|
+
:id => invoices['invoice'][0]['id'],
|
59
|
+
:number => invoices['invoice'][0]['number'],
|
60
|
+
:created_at => invoices['invoice'][0]['createdDatetime']
|
61
|
+
:billing_date => invoices['invoice'][0]['billingDatetime']
|
62
|
+
})
|
58
63
|
else
|
59
|
-
|
64
|
+
Invoice.new({
|
65
|
+
:id => invoices['invoice']['id'],
|
66
|
+
:number => invoices['invoice']['number'],
|
67
|
+
:created_at => invoices['invoice']['createdDatetime']
|
68
|
+
:billing_date => invoices['invoice']['billingDatetime']
|
69
|
+
})
|
60
70
|
end
|
61
71
|
|
62
|
-
|
63
|
-
:id => invoice_record['id'],
|
64
|
-
:number => invoice_record['number'],
|
65
|
-
:created_at => invoice_record['createdDatetime'],
|
66
|
-
:billing_date => invoice_record['billingDatetime']
|
67
|
-
}
|
68
|
-
|
69
|
-
Invoice.new(attributes)
|
72
|
+
invoice_record
|
70
73
|
end
|
71
74
|
|
72
75
|
def attributes_for_api
|