Class: ApiReference::ListAlertsQueryParams
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- ApiReference::ListAlertsQueryParams
- Defined in:
- lib/api_reference/models/list_alerts_query_params.rb
Overview
ListAlertsQueryParams Model.
Instance Attribute Summary collapse
-
#created_at_gt ⇒ DateTime
Fetch alerts scoped to this subscription_id.
-
#created_at_gte ⇒ DateTime
Fetch alerts scoped to this subscription_id.
-
#created_at_lt ⇒ DateTime
Fetch alerts scoped to this subscription_id.
-
#created_at_lte ⇒ DateTime
Fetch alerts scoped to this subscription_id.
-
#cursor ⇒ String
Cursor for pagination.
-
#customer_id ⇒ String
Fetch alerts scoped to this customer_id.
-
#external_customer_id ⇒ String
Fetch alerts scoped to this external_customer_id.
-
#limit ⇒ Integer
The number of items to fetch.
-
#subscription_id ⇒ String
Fetch alerts scoped to this subscription_id.
Class Method Summary collapse
-
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
-
.names ⇒ Object
A mapping from model property names to API property names.
-
.nullables ⇒ Object
An array for nullable fields.
-
.optionals ⇒ Object
An array for optional fields.
Instance Method Summary collapse
-
#initialize(limit: 20, cursor: SKIP, customer_id: SKIP, external_customer_id: SKIP, subscription_id: SKIP, created_at_gte: SKIP, created_at_gt: SKIP, created_at_lt: SKIP, created_at_lte: SKIP) ⇒ ListAlertsQueryParams
constructor
A new instance of ListAlertsQueryParams.
-
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
- #to_custom_created_at_gt ⇒ Object
- #to_custom_created_at_gte ⇒ Object
- #to_custom_created_at_lt ⇒ Object
- #to_custom_created_at_lte ⇒ Object
-
#to_s ⇒ Object
Provides a human-readable string representation of the object.
Methods inherited from BaseModel
#check_for_conflict, #process_additional_properties, #process_array, #process_basic_value, #process_hash, #to_hash, #to_json
Constructor Details
#initialize(limit: 20, cursor: SKIP, customer_id: SKIP, external_customer_id: SKIP, subscription_id: SKIP, created_at_gte: SKIP, created_at_gt: SKIP, created_at_lt: SKIP, created_at_lte: SKIP) ⇒ ListAlertsQueryParams
Returns a new instance of ListAlertsQueryParams.
94 95 96 97 98 99 100 101 102 103 104 105 106 107 |
# File 'lib/api_reference/models/list_alerts_query_params.rb', line 94 def initialize(limit: 20, cursor: SKIP, customer_id: SKIP, external_customer_id: SKIP, subscription_id: SKIP, created_at_gte: SKIP, created_at_gt: SKIP, created_at_lt: SKIP, created_at_lte: SKIP) @limit = limit unless limit == SKIP @cursor = cursor unless cursor == SKIP @customer_id = customer_id unless customer_id == SKIP @external_customer_id = external_customer_id unless external_customer_id == SKIP @subscription_id = subscription_id unless subscription_id == SKIP @created_at_gte = created_at_gte unless created_at_gte == SKIP @created_at_gt = created_at_gt unless created_at_gt == SKIP @created_at_lt = created_at_lt unless created_at_lt == SKIP @created_at_lte = created_at_lte unless created_at_lte == SKIP end |
Instance Attribute Details
#created_at_gt ⇒ DateTime
Fetch alerts scoped to this subscription_id
40 41 42 |
# File 'lib/api_reference/models/list_alerts_query_params.rb', line 40 def created_at_gt @created_at_gt end |
#created_at_gte ⇒ DateTime
Fetch alerts scoped to this subscription_id
36 37 38 |
# File 'lib/api_reference/models/list_alerts_query_params.rb', line 36 def created_at_gte @created_at_gte end |
#created_at_lt ⇒ DateTime
Fetch alerts scoped to this subscription_id
44 45 46 |
# File 'lib/api_reference/models/list_alerts_query_params.rb', line 44 def created_at_lt @created_at_lt end |
#created_at_lte ⇒ DateTime
Fetch alerts scoped to this subscription_id
48 49 50 |
# File 'lib/api_reference/models/list_alerts_query_params.rb', line 48 def created_at_lte @created_at_lte end |
#cursor ⇒ String
Cursor for pagination. This can be populated by the next_cursor value
returned from the initial request.
20 21 22 |
# File 'lib/api_reference/models/list_alerts_query_params.rb', line 20 def cursor @cursor end |
#customer_id ⇒ String
Fetch alerts scoped to this customer_id
24 25 26 |
# File 'lib/api_reference/models/list_alerts_query_params.rb', line 24 def customer_id @customer_id end |
#external_customer_id ⇒ String
Fetch alerts scoped to this external_customer_id
28 29 30 |
# File 'lib/api_reference/models/list_alerts_query_params.rb', line 28 def external_customer_id @external_customer_id end |
#limit ⇒ Integer
The number of items to fetch. Defaults to 20.
15 16 17 |
# File 'lib/api_reference/models/list_alerts_query_params.rb', line 15 def limit @limit end |
#subscription_id ⇒ String
Fetch alerts scoped to this subscription_id
32 33 34 |
# File 'lib/api_reference/models/list_alerts_query_params.rb', line 32 def subscription_id @subscription_id end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 |
# File 'lib/api_reference/models/list_alerts_query_params.rb', line 110 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. limit = hash['limit'] ||= 20 cursor = hash.key?('cursor') ? hash['cursor'] : SKIP customer_id = hash.key?('customer_id') ? hash['customer_id'] : SKIP external_customer_id = hash.key?('external_customer_id') ? hash['external_customer_id'] : SKIP subscription_id = hash.key?('subscription_id') ? hash['subscription_id'] : SKIP created_at_gte = if hash.key?('created_at[gte]') (DateTimeHelper.from_rfc3339(hash['created_at[gte]']) if hash['created_at[gte]']) else SKIP end created_at_gt = if hash.key?('created_at[gt]') (DateTimeHelper.from_rfc3339(hash['created_at[gt]']) if hash['created_at[gt]']) else SKIP end created_at_lt = if hash.key?('created_at[lt]') (DateTimeHelper.from_rfc3339(hash['created_at[lt]']) if hash['created_at[lt]']) else SKIP end created_at_lte = if hash.key?('created_at[lte]') (DateTimeHelper.from_rfc3339(hash['created_at[lte]']) if hash['created_at[lte]']) else SKIP end # Create object from extracted values. ListAlertsQueryParams.new(limit: limit, cursor: cursor, customer_id: customer_id, external_customer_id: external_customer_id, subscription_id: subscription_id, created_at_gte: created_at_gte, created_at_gt: created_at_gt, created_at_lt: created_at_lt, created_at_lte: created_at_lte) end |
.names ⇒ Object
A mapping from model property names to API property names.
51 52 53 54 55 56 57 58 59 60 61 62 63 |
# File 'lib/api_reference/models/list_alerts_query_params.rb', line 51 def self.names @_hash = {} if @_hash.nil? @_hash['limit'] = 'limit' @_hash['cursor'] = 'cursor' @_hash['customer_id'] = 'customer_id' @_hash['external_customer_id'] = 'external_customer_id' @_hash['subscription_id'] = 'subscription_id' @_hash['created_at_gte'] = 'created_at[gte]' @_hash['created_at_gt'] = 'created_at[gt]' @_hash['created_at_lt'] = 'created_at[lt]' @_hash['created_at_lte'] = 'created_at[lte]' @_hash end |
.nullables ⇒ Object
An array for nullable fields
81 82 83 84 85 86 87 88 89 90 91 92 |
# File 'lib/api_reference/models/list_alerts_query_params.rb', line 81 def self.nullables %w[ cursor customer_id external_customer_id subscription_id created_at_gte created_at_gt created_at_lt created_at_lte ] end |
.optionals ⇒ Object
An array for optional fields
66 67 68 69 70 71 72 73 74 75 76 77 78 |
# File 'lib/api_reference/models/list_alerts_query_params.rb', line 66 def self.optionals %w[ limit cursor customer_id external_customer_id subscription_id created_at_gte created_at_gt created_at_lt created_at_lte ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
180 181 182 183 184 185 186 187 |
# File 'lib/api_reference/models/list_alerts_query_params.rb', line 180 def inspect class_name = self.class.name.split('::').last "<#{class_name} limit: #{@limit.inspect}, cursor: #{@cursor.inspect}, customer_id:"\ " #{@customer_id.inspect}, external_customer_id: #{@external_customer_id.inspect},"\ " subscription_id: #{@subscription_id.inspect}, created_at_gte: #{@created_at_gte.inspect},"\ " created_at_gt: #{@created_at_gt.inspect}, created_at_lt: #{@created_at_lt.inspect},"\ " created_at_lte: #{@created_at_lte.inspect}>" end |
#to_custom_created_at_gt ⇒ Object
158 159 160 |
# File 'lib/api_reference/models/list_alerts_query_params.rb', line 158 def to_custom_created_at_gt DateTimeHelper.to_rfc3339(created_at_gt) end |
#to_custom_created_at_gte ⇒ Object
154 155 156 |
# File 'lib/api_reference/models/list_alerts_query_params.rb', line 154 def to_custom_created_at_gte DateTimeHelper.to_rfc3339(created_at_gte) end |
#to_custom_created_at_lt ⇒ Object
162 163 164 |
# File 'lib/api_reference/models/list_alerts_query_params.rb', line 162 def to_custom_created_at_lt DateTimeHelper.to_rfc3339(created_at_lt) end |
#to_custom_created_at_lte ⇒ Object
166 167 168 |
# File 'lib/api_reference/models/list_alerts_query_params.rb', line 166 def to_custom_created_at_lte DateTimeHelper.to_rfc3339(created_at_lte) end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
171 172 173 174 175 176 177 |
# File 'lib/api_reference/models/list_alerts_query_params.rb', line 171 def to_s class_name = self.class.name.split('::').last "<#{class_name} limit: #{@limit}, cursor: #{@cursor}, customer_id: #{@customer_id},"\ " external_customer_id: #{@external_customer_id}, subscription_id: #{@subscription_id},"\ " created_at_gte: #{@created_at_gte}, created_at_gt: #{@created_at_gt}, created_at_lt:"\ " #{@created_at_lt}, created_at_lte: #{@created_at_lte}>" end |