Sha256: 0528cc4d127e6879dea57fcfb8bf223c2445998726b4a95b9ef53e6917163e37

Contents?: true

Size: 1.1 KB

Versions: 1

Compression:

Stored size: 1.1 KB

Contents

require 'lightspeed_restaurant/base'
require 'lightspeed_restaurant/operations/list'
require 'lightspeed_restaurant/operations/find'
require 'lightspeed_restaurant/operations/create'
require 'lightspeed_restaurant/operations/update'
require 'lightspeed_restaurant/operations/save'

module LightspeedRestaurant
  class Customer < LightspeedRestaurant::Base
    include LightspeedRestaurant::Operations::Save
    extend LightspeedRestaurant::Operations::Create
    extend LightspeedRestaurant::Operations::Update
    extend LightspeedRestaurant::Operations::Find
    extend LightspeedRestaurant::Operations::List

    def self.attributes
      [:id,
       :city,
       :country,
       :deliveryCity,
       :deliveryCountry,
       :deliveryStreet,
       :deliveryStreetNumber,
       :deliveryZip,
       :email,
       :firstName,
       :lastName,
       :street,
       :streetNumber,
       :telephone,
       :zip,
       :links].freeze
    end

    attr_accessor(*attributes)

    def self.resource_name
      'Customer'
    end

    def self.resource_path
      "/rest/core/#{resource_name.downcase}"
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
lightspeed_restaurant-0.1.3 lib/lightspeed_restaurant/customer.rb