Class: Magentwo::Customer
- Inherits:
-
Base
- Object
- Base
- Magentwo::Customer
show all
- Defined in:
- lib/model/customer.rb
Constant Summary
collapse
- Attributes =
%i(id group_id default_billing default_shipping created_at updated_at created_in dob email firstname lastname gender store_id website_id addresses disable_auto_group_change extension_attributes)
Constants inherited
from Base
Base::DatasetMethods
Class Method Summary
collapse
Instance Method Summary
collapse
Methods inherited from Base
[], all, base_path, call, #call, #check_presence, dataset, #delete, each, each_page, first, get, #initialize, lower_case_name, map, #save, #to_h, #to_json, unique_identifier
Constructor Details
This class inherits a constructor from Magentwo::Base
Class Method Details
.get_path ⇒ Object
16
17
18
|
# File 'lib/model/customer.rb', line 16
def get_path
"#{base_path}/search"
end
|
Instance Method Details
#validate ⇒ Object
10
11
12
13
|
# File 'lib/model/customer.rb', line 10
def validate
check_presence :email
super
end
|
#with_extension_attributes ⇒ Object
6
7
8
|
# File 'lib/model/customer.rb', line 6
def with_extension_attributes
self.class.new (self.class.get nil, path:"#{self.class.base_path}/#{self.id}")
end
|