Sha256: 23e1aec11b360dd85a70392bedd8916a243ce33e1e14d046c28802439296f785

Contents?: true

Size: 436 Bytes

Versions: 1

Compression:

Stored size: 436 Bytes

Contents

module Paid
  class Subscription < APIResource
    include Paid::APIOperations::List
    include Paid::APIOperations::Create

    def cancel(params={}, opts={})
      api_key, headers = Util.parse_opts(opts)
      response, api_key = Paid.request(
        :post, cancel_url, api_key || @api_key, params, headers)
      refresh_from(response, api_key)
    end

    private

    def cancel_url
      api_url + '/cancel'
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
paid-0.1.0 lib/paid/subscription.rb