lib/braintree/subscription.rb in braintree-2.6.3 vs lib/braintree/subscription.rb in braintree-2.7.0

- old
+ new

@@ -25,10 +25,11 @@ attr_reader :failure_count attr_reader :transactions attr_reader :next_billing_period_amount attr_reader :number_of_billing_cycles, :billing_day_of_month attr_reader :add_ons, :discounts + attr_reader :descriptor # See http://www.braintreepaymentsolutions.com/docs/ruby/subscriptions/cancel def self.cancel(subscription_id) Configuration.gateway.subscription.cancel(subscription_id) end @@ -68,9 +69,10 @@ def initialize(gateway, attributes) # :nodoc: @gateway = gateway set_instance_variables_from_hash(attributes) @balance = Util.to_big_decimal(balance) @price = Util.to_big_decimal(price) + @descriptor = Descriptor.new(@descriptor) transactions.map! { |attrs| Transaction._new(gateway, attrs) } add_ons.map! { |attrs| AddOn._new(attrs) } discounts.map! { |attrs| Discount._new(attrs) } end