Class: Paddle::Notification
- Defined in:
- lib/paddle/models/notification.rb
Class Method Summary collapse
- .list(**params) ⇒ Object
-
.logs(id:, **params) ⇒ Object
Currently not working def replay(id) response = Client.post_request(“notifications/#id/replay”, body: {}) Notification.new(response.body) end.
- .retrieve(id:) ⇒ Object
Methods inherited from Object
#initialize, #to_ostruct, #update
Constructor Details
This class inherits a constructor from Paddle::Object
Class Method Details
.list(**params) ⇒ Object
4 5 6 7 |
# File 'lib/paddle/models/notification.rb', line 4 def list(**params) response = Client.get_request("notifications", params: params) Collection.from_response(response, type: Notification) end |
.logs(id:, **params) ⇒ Object
Currently not working def replay(id)
response = Client.post_request("notifications/#{id}/replay", body: {})
Notification.new(response.body["data"])
end
20 21 22 23 |
# File 'lib/paddle/models/notification.rb', line 20 def logs(id:, **params) response = Client.get_request("notifications/#{id}/logs", params: params) Collection.from_response(response, type: NotificationLog) end |
.retrieve(id:) ⇒ Object
9 10 11 12 |
# File 'lib/paddle/models/notification.rb', line 9 def retrieve(id:) response = Client.get_request("notifications/#{id}") Notification.new(response.body["data"]) end |