Sha256: dbe3e868b69e7f2cc58fe145da2ee3ad5d64008a1bb6d0e857c6a5c0aeb80863

Contents?: true

Size: 433 Bytes

Versions: 10

Compression:

Stored size: 433 Bytes

Contents

module Stripe
  class Subscription < APIResource
    extend Stripe::APIOperations::List
    extend Stripe::APIOperations::Create
    include Stripe::APIOperations::Save
    include Stripe::APIOperations::Delete

    def delete_discount
      _, opts = request(:delete, discount_url)
      initialize_from({ :discount => nil }, opts, true)
    end

    private

    def discount_url
      resource_url + '/discount'
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
stripe-1.51.1 lib/stripe/subscription.rb
stripe-1.51.0 lib/stripe/subscription.rb
stripe-1.50.1 lib/stripe/subscription.rb
stripe-1.50.0 lib/stripe/subscription.rb
stripe-1.49.0 lib/stripe/subscription.rb
stripe-1.48.0 lib/stripe/subscription.rb
stripe-1.47.0 lib/stripe/subscription.rb
stripe-1.46.0 lib/stripe/subscription.rb
stripe-1.45.0 lib/stripe/subscription.rb
stripe-1.44.0 lib/stripe/subscription.rb