lib/paddle/models/business.rb in paddle-2.2.0 vs lib/paddle/models/business.rb in paddle-2.2.1
- old
+ new
@@ -1,17 +1,15 @@
module Paddle
class Business < Object
-
class << self
-
def list(customer:, **params)
response = Client.get_request("customers/#{customer}/businesses", params: params)
Collection.from_response(response, type: Business)
end
def create(customer:, name:, **params)
- attrs = {name: name}
+ attrs = { name: name }
response = Client.post_request("customers/#{customer}/businesses", body: attrs.merge(params))
Business.new(response.body["data"])
end
def retrieve(customer:, id:)
@@ -21,10 +19,8 @@
def update(customer:, id:, **params)
response = Client.patch_request("customers/#{customer}/businesses/#{id}", body: params)
Business.new(response.body["data"])
end
-
end
-
end
end