Class: Ryext::Models::Order
- Inherits:
-
Object
- Object
- Ryext::Models::Order
- Extended by:
- Finder
- Includes:
- Model
- Defined in:
- lib/ryext/models/order.rb
Constant Summary collapse
- COLLECTION_KEY =
'customers'
- YEXT_ATTRIBUTES =
{ id: 'id', business_name: 'businessName', business_country: 'businessCountry', contact_first_name: 'contactFirstName', contact_last_name: 'contactLastName', contact_country: 'contactCountry', contact_phone: 'contactPhone', subscriptions: 'subscriptions', locations: 'locations', order: 'order' }
Class Method Summary collapse
Methods included from Finder
all, base_uri, base_url, collection_from, get, instance_klass
Methods included from Model
#build, included, #initialize, #instance_klass
Class Method Details
.default_path(params) ⇒ Object
8 9 10 |
# File 'lib/ryext/models/order.rb', line 8 def self.default_path(params) path(params) || '/orders' end |
.path(params) ⇒ Object
12 13 14 |
# File 'lib/ryext/models/order.rb', line 12 def self.path(params) "/orders/#{params[:id]}" unless params[:id].nil? end |