Module: LightspeedRestaurantClient::Operations::Create

Included in:
Customer, CustomerCreditChange, CustomerLoyaltyCard
Defined in:
lib/lightspeed_restaurant/operations/create.rb

Instance Method Summary collapse

Instance Method Details

#create(attributes) ⇒ Object



4
5
6
7
8
9
10
# File 'lib/lightspeed_restaurant/operations/create.rb', line 4

def create(attributes)
  response = LightspeedRestaurantClient.post(resource_path, attributes)
  payload = build_payload(attributes, response)
  return new(payload) if is_a?(Class)

  self.class.new(payload)
end