Sha256: ef93e1982efe3cec3e721ab8f8e708f5d48ac9abccfeaecb6e7cffb9c168f287

Contents?: true

Size: 1.01 KB

Versions: 3

Compression:

Stored size: 1.01 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'

module LightspeedRestaurant
  class Customer < LightspeedRestaurant::Base
    include LightspeedRestaurant::Operations::Update
    extend LightspeedRestaurant::Operations::Create
    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

3 entries across 3 versions & 1 rubygems

Version Path
lightspeed_restaurant-0.1.2 lib/lightspeed_restaurant/customer.rb
lightspeed_restaurant-0.1.1 lib/lightspeed_restaurant/customer.rb
lightspeed_restaurant-0.1.0 lib/lightspeed_restaurant/customer.rb