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

- old
+ new

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