lib/monza/transaction_receipt.rb in monza-1.1.1 vs lib/monza/transaction_receipt.rb in monza-1.1.2
- old
+ new
@@ -20,10 +20,11 @@
attr_reader :expires_date
attr_reader :expires_date_ms
attr_reader :expires_date_pst
attr_reader :is_trial_period
+ attr_reader :cancellation_date
def initialize(attributes)
@quantity = attributes['quantity'].to_i
@product_id = attributes['product_id']
@transaction_id = attributes['transaction_id']
@@ -45,9 +46,12 @@
if attributes['expires_date_pst']
@expires_date_pst = DateTime.parse(attributes['expires_date_pst'].gsub("America/Los_Angeles","PST"))
end
if attributes['is_trial_period']
@is_trial_period = attributes['is_trial_period'].to_bool
+ end
+ if attributes['cancellation_date']
+ @cancellation_date = DateTime.parse(attributes['cancellation_date'])
end
end # end initialize
#
# Depcrecating - don't use these