Module: LightspeedRestaurantClient::Operations::Create
- Included in:
- Customer, CustomerCreditChange, CustomerEstablishmentOrder, CustomerLoyaltyCard, PaymentType, ProductGroupProduct
- Defined in:
- lib/lightspeed_restaurant/operations/create.rb
Instance Method Summary collapse
Instance Method Details
#create(attributes, configuration = nil) ⇒ Object
6 7 8 9 10 11 12 |
# File 'lib/lightspeed_restaurant/operations/create.rb', line 6 def create(attributes, configuration = nil) response = JSON.parse(LightspeedRestaurantClient.post(default_resource_path, attributes, {}, configuration)) response = handle_create_response(response, attributes) return new(response) if is_a?(Class) self.class.new(response) end |