Module: Userlist::Push::Operations::Create::ClassMethods
- Defined in:
- lib/userlist/push/operations/create.rb
Instance Method Summary collapse
- #create(payload = {}, config = self.config) ⇒ Object (also: #push)
Instance Method Details
#create(payload = {}, config = self.config) ⇒ Object Also known as: push
6 7 8 9 10 |
# File 'lib/userlist/push/operations/create.rb', line 6 def create(payload = {}, config = self.config) return false unless resource = from_payload(payload, config) strategy.call(:post, endpoint, resource) if resource.create? end |