Sha256: 80d29f8ddde79469a39ddde44fc59ee775a937abfae4c431359e8a6d1377580c

Contents?: true

Size: 386 Bytes

Versions: 10

Compression:

Stored size: 386 Bytes

Contents

module Paddle
  module Classic
    class LicensesResource < Resource

      def generate(product_id:, allowed_uses:, **params)
        attrs = {product_id: product_id, allowed_uses: allowed_uses}

        response = post_request("2.0/product/generate_license", body: attrs.merge(params))

        License.new(response.body["response"]) if response.success?
      end

    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
paddle-2.2.0 lib/paddle/classic/resources/licenses.rb
paddle-2.1.4 lib/paddle/classic/resources/licenses.rb
paddle-2.1.3 lib/paddle/classic/resources/licenses.rb
paddle-2.1.2 lib/paddle/classic/resources/licenses.rb
paddle-2.1.1 lib/paddle/classic/resources/licenses.rb
paddle-2.1.0 lib/paddle/classic/resources/licenses.rb
paddle-2.0.0 lib/paddle/classic/resources/licenses.rb
paddle-1.1.2 lib/paddle/classic/resources/licenses.rb
paddle-1.1.1 lib/paddle/classic/resources/licenses.rb
paddle-1.1.0 lib/paddle/classic/resources/licenses.rb