Class: ApolloDeploySignalSdkRails::DeliveryWindowRequest
- Inherits:
-
Object
- Object
- ApolloDeploySignalSdkRails::DeliveryWindowRequest
- Defined in:
- lib/apollo_deploy_signal_sdk_rails/types.rb
Overview
Schema type: DeliveryWindowRequest
Instance Attribute Summary collapse
Class Method Summary collapse
-
.from_json(attributes) ⇒ DeliveryWindowRequest
Create an instance from a parsed JSON hash.
Instance Method Summary collapse
-
#initialize(start:, end_:) ⇒ DeliveryWindowRequest
constructor
A new instance of DeliveryWindowRequest.
-
#to_h ⇒ Hash
A hash representation of this object.
Constructor Details
#initialize(start:, end_:) ⇒ DeliveryWindowRequest
Returns a new instance of DeliveryWindowRequest.
61 62 63 64 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 61 def initialize(start: , end_: ) @start = start @end_ = end_ end |
Instance Attribute Details
#end_ ⇒ String
58 59 60 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 58 def end_ @end_ end |
#start ⇒ String
56 57 58 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 56 def start @start end |
Class Method Details
.from_json(attributes) ⇒ DeliveryWindowRequest
Create an instance from a parsed JSON hash.
77 78 79 80 81 82 83 84 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 77 def self.from_json(attributes) return nil unless attributes.is_a?(Hash) new( start: attributes.key?("start") ? attributes["start"] : attributes[:start], end_: attributes.key?("end") ? attributes["end"] : attributes[:end_], ) end |
Instance Method Details
#to_h ⇒ Hash
Returns a hash representation of this object.
67 68 69 70 71 72 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 67 def to_h { start: @start, end_: @end_, }.compact end |