Class: StickyIoRestfulApiV2025731::DataGetConfiguration
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- StickyIoRestfulApiV2025731::DataGetConfiguration
- Defined in:
- lib/sticky_io_restful_api_v2025731/models/data_get_configuration.rb
Overview
DataGetConfiguration Model.
Instance Attribute Summary collapse
-
#billing_model ⇒ BillingModelData3
TODO: Write general description for this method.
-
#created_at ⇒ CreatedAt
TODO: Write general description for this method.
-
#created_by ⇒ Integer
TODO: Write general description for this method.
-
#creator ⇒ Creator
TODO: Write general description for this method.
-
#default_quantity ⇒ Integer
TODO: Write general description for this method.
-
#id ⇒ Integer
TODO: Write general description for this method.
-
#is_upsell ⇒ Integer
TODO: Write general description for this method.
-
#name ⇒ String
TODO: Write general description for this method.
-
#price ⇒ String
TODO: Write general description for this method.
-
#product ⇒ ProductData2
TODO: Write general description for this method.
-
#step_number ⇒ Integer
TODO: Write general description for this method.
-
#trial_product ⇒ TrialProduct
TODO: Write general description for this method.
-
#updated_at ⇒ UpdatedAtData
TODO: Write general description for this method.
-
#updated_by ⇒ String
TODO: Write general description for this method.
-
#updator ⇒ String
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(id:, name:, default_quantity:, price:, is_upsell:, step_number:, created_by:, updated_by:, created_at:, updated_at:, billing_model:, product:, trial_product:, creator:, updator:, additional_properties: nil) ⇒ DataGetConfiguration
constructor
A new instance of DataGetConfiguration.
-
#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(id:, name:, default_quantity:, price:, is_upsell:, step_number:, created_by:, updated_by:, created_at:, updated_at:, billing_model:, product:, trial_product:, creator:, updator:, additional_properties: nil) ⇒ DataGetConfiguration
Returns a new instance of DataGetConfiguration.
106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 |
# File 'lib/sticky_io_restful_api_v2025731/models/data_get_configuration.rb', line 106 def initialize(id:, name:, default_quantity:, price:, is_upsell:, step_number:, created_by:, updated_by:, created_at:, updated_at:, billing_model:, product:, trial_product:, creator:, updator:, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @id = id @name = name @default_quantity = default_quantity @price = price @is_upsell = is_upsell @step_number = step_number @created_by = created_by @updated_by = updated_by @created_at = created_at @updated_at = updated_at @billing_model = billing_model @product = product @trial_product = trial_product @creator = creator @updator = updator @additional_properties = additional_properties end |
Instance Attribute Details
#billing_model ⇒ BillingModelData3
TODO: Write general description for this method
54 55 56 |
# File 'lib/sticky_io_restful_api_v2025731/models/data_get_configuration.rb', line 54 def billing_model @billing_model end |
#created_at ⇒ CreatedAt
TODO: Write general description for this method
46 47 48 |
# File 'lib/sticky_io_restful_api_v2025731/models/data_get_configuration.rb', line 46 def created_at @created_at end |
#created_by ⇒ Integer
TODO: Write general description for this method
38 39 40 |
# File 'lib/sticky_io_restful_api_v2025731/models/data_get_configuration.rb', line 38 def created_by @created_by end |
#creator ⇒ Creator
TODO: Write general description for this method
66 67 68 |
# File 'lib/sticky_io_restful_api_v2025731/models/data_get_configuration.rb', line 66 def creator @creator end |
#default_quantity ⇒ Integer
TODO: Write general description for this method
22 23 24 |
# File 'lib/sticky_io_restful_api_v2025731/models/data_get_configuration.rb', line 22 def default_quantity @default_quantity end |
#id ⇒ Integer
TODO: Write general description for this method
14 15 16 |
# File 'lib/sticky_io_restful_api_v2025731/models/data_get_configuration.rb', line 14 def id @id end |
#is_upsell ⇒ Integer
TODO: Write general description for this method
30 31 32 |
# File 'lib/sticky_io_restful_api_v2025731/models/data_get_configuration.rb', line 30 def is_upsell @is_upsell end |
#name ⇒ String
TODO: Write general description for this method
18 19 20 |
# File 'lib/sticky_io_restful_api_v2025731/models/data_get_configuration.rb', line 18 def name @name end |
#price ⇒ String
TODO: Write general description for this method
26 27 28 |
# File 'lib/sticky_io_restful_api_v2025731/models/data_get_configuration.rb', line 26 def price @price end |
#product ⇒ ProductData2
TODO: Write general description for this method
58 59 60 |
# File 'lib/sticky_io_restful_api_v2025731/models/data_get_configuration.rb', line 58 def product @product end |
#step_number ⇒ Integer
TODO: Write general description for this method
34 35 36 |
# File 'lib/sticky_io_restful_api_v2025731/models/data_get_configuration.rb', line 34 def step_number @step_number end |
#trial_product ⇒ TrialProduct
TODO: Write general description for this method
62 63 64 |
# File 'lib/sticky_io_restful_api_v2025731/models/data_get_configuration.rb', line 62 def trial_product @trial_product end |
#updated_at ⇒ UpdatedAtData
TODO: Write general description for this method
50 51 52 |
# File 'lib/sticky_io_restful_api_v2025731/models/data_get_configuration.rb', line 50 def updated_at @updated_at end |
#updated_by ⇒ String
TODO: Write general description for this method
42 43 44 |
# File 'lib/sticky_io_restful_api_v2025731/models/data_get_configuration.rb', line 42 def updated_by @updated_by end |
#updator ⇒ String
TODO: Write general description for this method
70 71 72 |
# File 'lib/sticky_io_restful_api_v2025731/models/data_get_configuration.rb', line 70 def updator @updator end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 |
# File 'lib/sticky_io_restful_api_v2025731/models/data_get_configuration.rb', line 132 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. id = hash.key?('id') ? hash['id'] : nil name = hash.key?('name') ? hash['name'] : nil default_quantity = hash.key?('default_quantity') ? hash['default_quantity'] : nil price = hash.key?('price') ? hash['price'] : nil is_upsell = hash.key?('is_upsell') ? hash['is_upsell'] : nil step_number = hash.key?('step_number') ? hash['step_number'] : nil created_by = hash.key?('created_by') ? hash['created_by'] : nil updated_by = hash.key?('updated_by') ? hash['updated_by'] : nil created_at = CreatedAt.from_hash(hash['created_at']) if hash['created_at'] updated_at = UpdatedAtData.from_hash(hash['updated_at']) if hash['updated_at'] billing_model = BillingModelData3.from_hash(hash['billing_model']) if hash['billing_model'] product = ProductData2.from_hash(hash['product']) if hash['product'] trial_product = TrialProduct.from_hash(hash['trial_product']) if hash['trial_product'] creator = Creator.from_hash(hash['creator']) if hash['creator'] updator = hash.key?('updator') ? hash['updator'] : nil # 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. DataGetConfiguration.new(id: id, name: name, default_quantity: default_quantity, price: price, is_upsell: is_upsell, step_number: step_number, created_by: created_by, updated_by: updated_by, created_at: created_at, updated_at: updated_at, billing_model: billing_model, product: product, trial_product: trial_product, creator: creator, updator: updator, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 |
# File 'lib/sticky_io_restful_api_v2025731/models/data_get_configuration.rb', line 73 def self.names @_hash = {} if @_hash.nil? @_hash['id'] = 'id' @_hash['name'] = 'name' @_hash['default_quantity'] = 'default_quantity' @_hash['price'] = 'price' @_hash['is_upsell'] = 'is_upsell' @_hash['step_number'] = 'step_number' @_hash['created_by'] = 'created_by' @_hash['updated_by'] = 'updated_by' @_hash['created_at'] = 'created_at' @_hash['updated_at'] = 'updated_at' @_hash['billing_model'] = 'billing_model' @_hash['product'] = 'product' @_hash['trial_product'] = 'trial_product' @_hash['creator'] = 'creator' @_hash['updator'] = 'updator' @_hash end |
.nullables ⇒ Object
An array for nullable fields
99 100 101 102 103 104 |
# File 'lib/sticky_io_restful_api_v2025731/models/data_get_configuration.rb', line 99 def self.nullables %w[ updated_by updator ] end |
.optionals ⇒ Object
An array for optional fields
94 95 96 |
# File 'lib/sticky_io_restful_api_v2025731/models/data_get_configuration.rb', line 94 def self.optionals [] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
191 192 193 194 195 196 197 198 199 200 201 |
# File 'lib/sticky_io_restful_api_v2025731/models/data_get_configuration.rb', line 191 def inspect class_name = self.class.name.split('::').last "<#{class_name} id: #{@id.inspect}, name: #{@name.inspect}, default_quantity:"\ " #{@default_quantity.inspect}, price: #{@price.inspect}, is_upsell: #{@is_upsell.inspect},"\ " step_number: #{@step_number.inspect}, created_by: #{@created_by.inspect}, updated_by:"\ " #{@updated_by.inspect}, created_at: #{@created_at.inspect}, updated_at:"\ " #{@updated_at.inspect}, billing_model: #{@billing_model.inspect}, product:"\ " #{@product.inspect}, trial_product: #{@trial_product.inspect}, creator:"\ " #{@creator.inspect}, updator: #{@updator.inspect}, additional_properties:"\ " #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
180 181 182 183 184 185 186 187 188 |
# File 'lib/sticky_io_restful_api_v2025731/models/data_get_configuration.rb', line 180 def to_s class_name = self.class.name.split('::').last "<#{class_name} id: #{@id}, name: #{@name}, default_quantity: #{@default_quantity}, price:"\ " #{@price}, is_upsell: #{@is_upsell}, step_number: #{@step_number}, created_by:"\ " #{@created_by}, updated_by: #{@updated_by}, created_at: #{@created_at}, updated_at:"\ " #{@updated_at}, billing_model: #{@billing_model}, product: #{@product}, trial_product:"\ " #{@trial_product}, creator: #{@creator}, updator: #{@updator}, additional_properties:"\ " #{@additional_properties}>" end |