Class: StickyIoRestfulApiV2025731::DataCreateConfiguration
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- StickyIoRestfulApiV2025731::DataCreateConfiguration
- Defined in:
- lib/sticky_io_restful_api_v2025731/models/data_create_configuration.rb
Overview
DataCreateConfiguration Model.
Instance Attribute Summary collapse
-
#billing_model ⇒ BillingModelData2
TODO: Write general description for this method.
-
#created_by ⇒ Integer
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 ⇒ Float
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.
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(name:, default_quantity:, price:, is_upsell:, step_number:, created_by:, id:, billing_model:, product:, trial_product:, additional_properties: nil) ⇒ DataCreateConfiguration
constructor
A new instance of DataCreateConfiguration.
-
#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(name:, default_quantity:, price:, is_upsell:, step_number:, created_by:, id:, billing_model:, product:, trial_product:, additional_properties: nil) ⇒ DataCreateConfiguration
Returns a new instance of DataCreateConfiguration.
78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 |
# File 'lib/sticky_io_restful_api_v2025731/models/data_create_configuration.rb', line 78 def initialize(name:, default_quantity:, price:, is_upsell:, step_number:, created_by:, id:, billing_model:, product:, trial_product:, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @name = name @default_quantity = default_quantity @price = price @is_upsell = is_upsell @step_number = step_number @created_by = created_by @id = id @billing_model = billing_model @product = product @trial_product = trial_product @additional_properties = additional_properties end |
Instance Attribute Details
#billing_model ⇒ BillingModelData2
TODO: Write general description for this method
42 43 44 |
# File 'lib/sticky_io_restful_api_v2025731/models/data_create_configuration.rb', line 42 def billing_model @billing_model end |
#created_by ⇒ Integer
TODO: Write general description for this method
34 35 36 |
# File 'lib/sticky_io_restful_api_v2025731/models/data_create_configuration.rb', line 34 def created_by @created_by end |
#default_quantity ⇒ Integer
TODO: Write general description for this method
18 19 20 |
# File 'lib/sticky_io_restful_api_v2025731/models/data_create_configuration.rb', line 18 def default_quantity @default_quantity end |
#id ⇒ Integer
TODO: Write general description for this method
38 39 40 |
# File 'lib/sticky_io_restful_api_v2025731/models/data_create_configuration.rb', line 38 def id @id end |
#is_upsell ⇒ Integer
TODO: Write general description for this method
26 27 28 |
# File 'lib/sticky_io_restful_api_v2025731/models/data_create_configuration.rb', line 26 def is_upsell @is_upsell end |
#name ⇒ String
TODO: Write general description for this method
14 15 16 |
# File 'lib/sticky_io_restful_api_v2025731/models/data_create_configuration.rb', line 14 def name @name end |
#price ⇒ Float
TODO: Write general description for this method
22 23 24 |
# File 'lib/sticky_io_restful_api_v2025731/models/data_create_configuration.rb', line 22 def price @price end |
#product ⇒ ProductData2
TODO: Write general description for this method
46 47 48 |
# File 'lib/sticky_io_restful_api_v2025731/models/data_create_configuration.rb', line 46 def product @product end |
#step_number ⇒ Integer
TODO: Write general description for this method
30 31 32 |
# File 'lib/sticky_io_restful_api_v2025731/models/data_create_configuration.rb', line 30 def step_number @step_number end |
#trial_product ⇒ TrialProduct
TODO: Write general description for this method
50 51 52 |
# File 'lib/sticky_io_restful_api_v2025731/models/data_create_configuration.rb', line 50 def trial_product @trial_product end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 |
# File 'lib/sticky_io_restful_api_v2025731/models/data_create_configuration.rb', line 98 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. 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 id = hash.key?('id') ? hash['id'] : nil billing_model = BillingModelData2.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'] # 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. DataCreateConfiguration.new(name: name, default_quantity: default_quantity, price: price, is_upsell: is_upsell, step_number: step_number, created_by: created_by, id: id, billing_model: billing_model, product: product, trial_product: trial_product, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
53 54 55 56 57 58 59 60 61 62 63 64 65 66 |
# File 'lib/sticky_io_restful_api_v2025731/models/data_create_configuration.rb', line 53 def self.names @_hash = {} if @_hash.nil? @_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['id'] = 'id' @_hash['billing_model'] = 'billing_model' @_hash['product'] = 'product' @_hash['trial_product'] = 'trial_product' @_hash end |
.nullables ⇒ Object
An array for nullable fields
74 75 76 |
# File 'lib/sticky_io_restful_api_v2025731/models/data_create_configuration.rb', line 74 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
69 70 71 |
# File 'lib/sticky_io_restful_api_v2025731/models/data_create_configuration.rb', line 69 def self.optionals [] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
145 146 147 148 149 150 151 152 |
# File 'lib/sticky_io_restful_api_v2025731/models/data_create_configuration.rb', line 145 def inspect class_name = self.class.name.split('::').last "<#{class_name} 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}, id: #{@id.inspect},"\ " billing_model: #{@billing_model.inspect}, product: #{@product.inspect}, trial_product:"\ " #{@trial_product.inspect}, additional_properties: #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
136 137 138 139 140 141 142 |
# File 'lib/sticky_io_restful_api_v2025731/models/data_create_configuration.rb', line 136 def to_s class_name = self.class.name.split('::').last "<#{class_name} name: #{@name}, default_quantity: #{@default_quantity}, price: #{@price},"\ " is_upsell: #{@is_upsell}, step_number: #{@step_number}, created_by: #{@created_by}, id:"\ " #{@id}, billing_model: #{@billing_model}, product: #{@product}, trial_product:"\ " #{@trial_product}, additional_properties: #{@additional_properties}>" end |