lib/paddle/models/product.rb in paddle-2.2.0 vs lib/paddle/models/product.rb in paddle-2.2.1

- old
+ new

@@ -1,17 +1,15 @@ module Paddle class Product < Object - class << self - def list(**params) response = Client.get_request("products", params: params) Collection.from_response(response, type: Product) end def create(name:, tax_category:, **params) - attrs = {name: name, tax_category: tax_category} + attrs = { name: name, tax_category: tax_category } response = Client.post_request("products", body: attrs.merge(params)) Product.new(response.body["data"]) end def retrieve(id:) @@ -21,10 +19,8 @@ def update(id:, **params) response = Client.patch_request("products/#{id}", body: params) Product.new(response.body["data"]) end - end - end end