Class: StickyIoRestfulApiV2025731::UnitUpdateTrialWorkflowRequest
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- StickyIoRestfulApiV2025731::UnitUpdateTrialWorkflowRequest
- Defined in:
- lib/sticky_io_restful_api_v2025731/models/unit_update_trial_workflow_request.rb
Overview
UnitUpdateTrialWorkflowRequest Model.
Instance Attribute Summary collapse
-
#duration ⇒ Integer
TODO: Write general description for this method.
-
#is_notifiable ⇒ Integer
TODO: Write general description for this method.
-
#is_one_time_pairable ⇒ Integer
TODO: Write general description for this method.
-
#is_parent_cancellable ⇒ Integer
TODO: Write general description for this method.
-
#is_shippable ⇒ Integer
TODO: Write general description for this method.
-
#name ⇒ String
TODO: Write general description for this method.
-
#price ⇒ Float
TODO: Write general description for this method.
-
#product_id ⇒ Integer
TODO: Write general description for this method.
-
#shipping_price ⇒ Float
TODO: Write general description for this method.
-
#shipping_price_type_id ⇒ Integer
TODO: Write general description for this method.
-
#step_number ⇒ Integer
TODO: Write general description for this method.
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(step_number:, name:, duration:, price:, is_parent_cancellable:, is_shippable:, is_notifiable:, is_one_time_pairable:, product_id: SKIP, shipping_price_type_id: SKIP, shipping_price: SKIP, additional_properties: nil) ⇒ UnitUpdateTrialWorkflowRequest
constructor
A new instance of UnitUpdateTrialWorkflowRequest.
-
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
-
#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(step_number:, name:, duration:, price:, is_parent_cancellable:, is_shippable:, is_notifiable:, is_one_time_pairable:, product_id: SKIP, shipping_price_type_id: SKIP, shipping_price: SKIP, additional_properties: nil) ⇒ UnitUpdateTrialWorkflowRequest
Returns a new instance of UnitUpdateTrialWorkflowRequest.
87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 |
# File 'lib/sticky_io_restful_api_v2025731/models/unit_update_trial_workflow_request.rb', line 87 def initialize(step_number:, name:, duration:, price:, is_parent_cancellable:, is_shippable:, is_notifiable:, is_one_time_pairable:, product_id: SKIP, shipping_price_type_id: SKIP, shipping_price: SKIP, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @step_number = step_number @name = name @duration = duration @price = price @is_parent_cancellable = is_parent_cancellable @product_id = product_id unless product_id == SKIP @is_shippable = is_shippable @is_notifiable = is_notifiable @is_one_time_pairable = is_one_time_pairable @shipping_price_type_id = shipping_price_type_id unless shipping_price_type_id == SKIP @shipping_price = shipping_price unless shipping_price == SKIP @additional_properties = additional_properties end |
Instance Attribute Details
#duration ⇒ Integer
TODO: Write general description for this method
22 23 24 |
# File 'lib/sticky_io_restful_api_v2025731/models/unit_update_trial_workflow_request.rb', line 22 def duration @duration end |
#is_notifiable ⇒ Integer
TODO: Write general description for this method
42 43 44 |
# File 'lib/sticky_io_restful_api_v2025731/models/unit_update_trial_workflow_request.rb', line 42 def is_notifiable @is_notifiable end |
#is_one_time_pairable ⇒ Integer
TODO: Write general description for this method
46 47 48 |
# File 'lib/sticky_io_restful_api_v2025731/models/unit_update_trial_workflow_request.rb', line 46 def is_one_time_pairable @is_one_time_pairable end |
#is_parent_cancellable ⇒ Integer
TODO: Write general description for this method
30 31 32 |
# File 'lib/sticky_io_restful_api_v2025731/models/unit_update_trial_workflow_request.rb', line 30 def is_parent_cancellable @is_parent_cancellable end |
#is_shippable ⇒ Integer
TODO: Write general description for this method
38 39 40 |
# File 'lib/sticky_io_restful_api_v2025731/models/unit_update_trial_workflow_request.rb', line 38 def is_shippable @is_shippable end |
#name ⇒ String
TODO: Write general description for this method
18 19 20 |
# File 'lib/sticky_io_restful_api_v2025731/models/unit_update_trial_workflow_request.rb', line 18 def name @name end |
#price ⇒ Float
TODO: Write general description for this method
26 27 28 |
# File 'lib/sticky_io_restful_api_v2025731/models/unit_update_trial_workflow_request.rb', line 26 def price @price end |
#product_id ⇒ Integer
TODO: Write general description for this method
34 35 36 |
# File 'lib/sticky_io_restful_api_v2025731/models/unit_update_trial_workflow_request.rb', line 34 def product_id @product_id end |
#shipping_price ⇒ Float
TODO: Write general description for this method
54 55 56 |
# File 'lib/sticky_io_restful_api_v2025731/models/unit_update_trial_workflow_request.rb', line 54 def shipping_price @shipping_price end |
#shipping_price_type_id ⇒ Integer
TODO: Write general description for this method
50 51 52 |
# File 'lib/sticky_io_restful_api_v2025731/models/unit_update_trial_workflow_request.rb', line 50 def shipping_price_type_id @shipping_price_type_id end |
#step_number ⇒ Integer
TODO: Write general description for this method
14 15 16 |
# File 'lib/sticky_io_restful_api_v2025731/models/unit_update_trial_workflow_request.rb', line 14 def step_number @step_number 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 |
# File 'lib/sticky_io_restful_api_v2025731/models/unit_update_trial_workflow_request.rb', line 110 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. step_number = hash.key?('step_number') ? hash['step_number'] : nil name = hash.key?('name') ? hash['name'] : nil duration = hash.key?('duration') ? hash['duration'] : nil price = hash.key?('price') ? hash['price'] : nil is_parent_cancellable = hash.key?('is_parent_cancellable') ? hash['is_parent_cancellable'] : nil is_shippable = hash.key?('is_shippable') ? hash['is_shippable'] : nil is_notifiable = hash.key?('is_notifiable') ? hash['is_notifiable'] : nil is_one_time_pairable = hash.key?('is_one_time_pairable') ? hash['is_one_time_pairable'] : nil product_id = hash.key?('product_id') ? hash['product_id'] : SKIP shipping_price_type_id = hash.key?('shipping_price_type_id') ? hash['shipping_price_type_id'] : SKIP shipping_price = hash.key?('shipping_price') ? hash['shipping_price'] : SKIP # Create a new hash for additional properties, removing known properties. new_hash = hash.reject { |k, _| names.value?(k) } additional_properties = APIHelper.get_additional_properties( new_hash, proc { |value| value } ) # Create object from extracted values. UnitUpdateTrialWorkflowRequest.new(step_number: step_number, name: name, duration: duration, price: price, is_parent_cancellable: is_parent_cancellable, is_shippable: is_shippable, is_notifiable: is_notifiable, is_one_time_pairable: is_one_time_pairable, product_id: product_id, shipping_price_type_id: shipping_price_type_id, shipping_price: shipping_price, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 |
# File 'lib/sticky_io_restful_api_v2025731/models/unit_update_trial_workflow_request.rb', line 57 def self.names @_hash = {} if @_hash.nil? @_hash['step_number'] = 'step_number' @_hash['name'] = 'name' @_hash['duration'] = 'duration' @_hash['price'] = 'price' @_hash['is_parent_cancellable'] = 'is_parent_cancellable' @_hash['product_id'] = 'product_id' @_hash['is_shippable'] = 'is_shippable' @_hash['is_notifiable'] = 'is_notifiable' @_hash['is_one_time_pairable'] = 'is_one_time_pairable' @_hash['shipping_price_type_id'] = 'shipping_price_type_id' @_hash['shipping_price'] = 'shipping_price' @_hash end |
.nullables ⇒ Object
An array for nullable fields
83 84 85 |
# File 'lib/sticky_io_restful_api_v2025731/models/unit_update_trial_workflow_request.rb', line 83 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
74 75 76 77 78 79 80 |
# File 'lib/sticky_io_restful_api_v2025731/models/unit_update_trial_workflow_request.rb', line 74 def self.optionals %w[ product_id shipping_price_type_id shipping_price ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
164 165 166 167 168 169 170 171 172 173 |
# File 'lib/sticky_io_restful_api_v2025731/models/unit_update_trial_workflow_request.rb', line 164 def inspect class_name = self.class.name.split('::').last "<#{class_name} step_number: #{@step_number.inspect}, name: #{@name.inspect}, duration:"\ " #{@duration.inspect}, price: #{@price.inspect}, is_parent_cancellable:"\ " #{@is_parent_cancellable.inspect}, product_id: #{@product_id.inspect}, is_shippable:"\ " #{@is_shippable.inspect}, is_notifiable: #{@is_notifiable.inspect}, is_one_time_pairable:"\ " #{@is_one_time_pairable.inspect}, shipping_price_type_id:"\ " #{@shipping_price_type_id.inspect}, shipping_price: #{@shipping_price.inspect},"\ " additional_properties: #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
153 154 155 156 157 158 159 160 161 |
# File 'lib/sticky_io_restful_api_v2025731/models/unit_update_trial_workflow_request.rb', line 153 def to_s class_name = self.class.name.split('::').last "<#{class_name} step_number: #{@step_number}, name: #{@name}, duration: #{@duration},"\ " price: #{@price}, is_parent_cancellable: #{@is_parent_cancellable}, product_id:"\ " #{@product_id}, is_shippable: #{@is_shippable}, is_notifiable: #{@is_notifiable},"\ " is_one_time_pairable: #{@is_one_time_pairable}, shipping_price_type_id:"\ " #{@shipping_price_type_id}, shipping_price: #{@shipping_price}, additional_properties:"\ " #{@additional_properties}>" end |