def save
      if @id
        resource = self.class::RESOURCE % { account_id: account.id, id: id }
        response = Request.new(account.client, :put, resource, params: to_params).perform
      else
        resource = self.class::RESOURCE_COLLECTION % { account_id: account.id }
        response = Request.new(account.client, :post, resource, params: to_params).perform
      end
      from_response(response.body[:data])
    end
def save
      if @id
        resource = self.class::RESOURCE % { account_id: account.id, id: id }
        response = Request.new(account.client, :put, resource, params: to_params).perform
      else
        resource = self.class::RESOURCE_COLLECTION % { account_id: account.id }
        response = Request.new(account.client, :post, resource, params: to_params).perform
      end
      from_response(response.body[:data])
    end
Saves or updates the current object instance depending on the presence of `object.id`.

 @example
   object.save

 @return [self] Returns the instance refreshed from the API.

 @since 0.1.0