Class: Unit::Webhook::ListWebhookParams
- Inherits:
-
Object
- Object
- Unit::Webhook::ListWebhookParams
- Defined in:
- lib/unit/models/webhook/list_webhook_params.rb
Instance Attribute Summary collapse
-
#from_id ⇒ Object
Returns the value of attribute from_id.
-
#limit ⇒ Object
Returns the value of attribute limit.
-
#offset ⇒ Object
Returns the value of attribute offset.
-
#since ⇒ Object
Returns the value of attribute since.
-
#told ⇒ Object
Returns the value of attribute told.
-
#until_ ⇒ Object
Returns the value of attribute until_.
Instance Method Summary collapse
-
#initialize(limit = WEBHOOK_LIMIT, offset = WEBHOOK_OFFSET, since = nil, until_ = nil, from_id = nil, told = nil) ⇒ ListWebhookParams
constructor
A new instance of ListWebhookParams.
- #to_hash ⇒ Object
Constructor Details
#initialize(limit = WEBHOOK_LIMIT, offset = WEBHOOK_OFFSET, since = nil, until_ = nil, from_id = nil, told = nil) ⇒ ListWebhookParams
Returns a new instance of ListWebhookParams.
16 17 18 19 20 21 22 23 24 |
# File 'lib/unit/models/webhook/list_webhook_params.rb', line 16 def initialize(limit = WEBHOOK_LIMIT, offset = WEBHOOK_OFFSET, since = nil, until_ = nil, from_id = nil, told = nil) @limit = limit @offset = offset @since = since @until_ = until_ @from_id = from_id @told = told end |
Instance Attribute Details
#from_id ⇒ Object
Returns the value of attribute from_id.
8 9 10 |
# File 'lib/unit/models/webhook/list_webhook_params.rb', line 8 def from_id @from_id end |
#limit ⇒ Object
Returns the value of attribute limit.
8 9 10 |
# File 'lib/unit/models/webhook/list_webhook_params.rb', line 8 def limit @limit end |
#offset ⇒ Object
Returns the value of attribute offset.
8 9 10 |
# File 'lib/unit/models/webhook/list_webhook_params.rb', line 8 def offset @offset end |
#since ⇒ Object
Returns the value of attribute since.
8 9 10 |
# File 'lib/unit/models/webhook/list_webhook_params.rb', line 8 def since @since end |
#told ⇒ Object
Returns the value of attribute told.
8 9 10 |
# File 'lib/unit/models/webhook/list_webhook_params.rb', line 8 def told @told end |
#until_ ⇒ Object
Returns the value of attribute until_.
8 9 10 |
# File 'lib/unit/models/webhook/list_webhook_params.rb', line 8 def until_ @until_ end |
Instance Method Details
#to_hash ⇒ Object
26 27 28 29 30 31 32 33 34 35 36 |
# File 'lib/unit/models/webhook/list_webhook_params.rb', line 26 def to_hash payload = { "page[limit]": limit, "page[offset]": offset, "filter[since]": since, "filter[until]": until_, "filter[fromId]": from_id, "filter[told]": told } payload.compact! end |