Sha256: 5f8386e9d4666df077e24a1df7b46f2d1e7a3a942f35efac9d8ea87f88021d01

Contents?: true

Size: 386 Bytes

Versions: 9

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

9 entries across 9 versions & 1 rubygems

Version Path
paddle-2.7.0 lib/paddle/classic/resources/licenses.rb
paddle-2.6.0 lib/paddle/classic/resources/licenses.rb
paddle-2.5.2 lib/paddle/classic/resources/licenses.rb
paddle-2.5.1 lib/paddle/classic/resources/licenses.rb
paddle-2.5.0 lib/paddle/classic/resources/licenses.rb
paddle-2.4.1 lib/paddle/classic/resources/licenses.rb
paddle-2.4.0 lib/paddle/classic/resources/licenses.rb
paddle-2.3.0 lib/paddle/classic/resources/licenses.rb
paddle-2.2.1 lib/paddle/classic/resources/licenses.rb