Class: StickyIoRestfulApiV2025731::BillingModelData2
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- StickyIoRestfulApiV2025731::BillingModelData2
- Defined in:
- lib/sticky_io_restful_api_v2025731/models/billing_model_data2.rb
Overview
BillingModelData2 Model.
Instance Attribute Summary collapse
-
#bill_by_days ⇒ Integer
TODO: Write general description for this method.
-
#bill_by_type_id ⇒ Integer
TODO: Write general description for this method.
-
#buffer_days ⇒ Integer
TODO: Write general description for this method.
-
#created_by ⇒ Integer
TODO: Write general description for this method.
-
#date_in ⇒ String
TODO: Write general description for this method.
-
#expire_cycles ⇒ Integer
TODO: Write general description for this method.
-
#id ⇒ Integer
TODO: Write general description for this method.
-
#interval_day ⇒ Integer
TODO: Write general description for this method.
-
#interval_week ⇒ Integer
TODO: Write general description for this method.
-
#name ⇒ String
TODO: Write general description for this method.
-
#preserve_quantity ⇒ Integer
TODO: Write general description for this method.
-
#type_id ⇒ Integer
TODO: Write general description for this method.
-
#update_in ⇒ String
TODO: Write general description for this method.
-
#updated_by ⇒ 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(id:, name:, expire_cycles:, bill_by_type_id:, bill_by_days:, interval_day:, interval_week:, preserve_quantity:, type_id:, updated_by:, created_by:, update_in:, date_in:, buffer_days:, additional_properties: nil) ⇒ BillingModelData2
constructor
A new instance of BillingModelData2.
-
#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:, expire_cycles:, bill_by_type_id:, bill_by_days:, interval_day:, interval_week:, preserve_quantity:, type_id:, updated_by:, created_by:, update_in:, date_in:, buffer_days:, additional_properties: nil) ⇒ BillingModelData2
Returns a new instance of BillingModelData2.
100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 |
# File 'lib/sticky_io_restful_api_v2025731/models/billing_model_data2.rb', line 100 def initialize(id:, name:, expire_cycles:, bill_by_type_id:, bill_by_days:, interval_day:, interval_week:, preserve_quantity:, type_id:, updated_by:, created_by:, update_in:, date_in:, buffer_days:, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @id = id @name = name @expire_cycles = expire_cycles @bill_by_type_id = bill_by_type_id @bill_by_days = bill_by_days @interval_day = interval_day @interval_week = interval_week @preserve_quantity = preserve_quantity @type_id = type_id @updated_by = updated_by @created_by = created_by @update_in = update_in @date_in = date_in @buffer_days = buffer_days @additional_properties = additional_properties end |
Instance Attribute Details
#bill_by_days ⇒ Integer
TODO: Write general description for this method
30 31 32 |
# File 'lib/sticky_io_restful_api_v2025731/models/billing_model_data2.rb', line 30 def bill_by_days @bill_by_days end |
#bill_by_type_id ⇒ Integer
TODO: Write general description for this method
26 27 28 |
# File 'lib/sticky_io_restful_api_v2025731/models/billing_model_data2.rb', line 26 def bill_by_type_id @bill_by_type_id end |
#buffer_days ⇒ Integer
TODO: Write general description for this method
66 67 68 |
# File 'lib/sticky_io_restful_api_v2025731/models/billing_model_data2.rb', line 66 def buffer_days @buffer_days end |
#created_by ⇒ Integer
TODO: Write general description for this method
54 55 56 |
# File 'lib/sticky_io_restful_api_v2025731/models/billing_model_data2.rb', line 54 def created_by @created_by end |
#date_in ⇒ String
TODO: Write general description for this method
62 63 64 |
# File 'lib/sticky_io_restful_api_v2025731/models/billing_model_data2.rb', line 62 def date_in @date_in end |
#expire_cycles ⇒ Integer
TODO: Write general description for this method
22 23 24 |
# File 'lib/sticky_io_restful_api_v2025731/models/billing_model_data2.rb', line 22 def expire_cycles @expire_cycles end |
#id ⇒ Integer
TODO: Write general description for this method
14 15 16 |
# File 'lib/sticky_io_restful_api_v2025731/models/billing_model_data2.rb', line 14 def id @id end |
#interval_day ⇒ Integer
TODO: Write general description for this method
34 35 36 |
# File 'lib/sticky_io_restful_api_v2025731/models/billing_model_data2.rb', line 34 def interval_day @interval_day end |
#interval_week ⇒ Integer
TODO: Write general description for this method
38 39 40 |
# File 'lib/sticky_io_restful_api_v2025731/models/billing_model_data2.rb', line 38 def interval_week @interval_week end |
#name ⇒ String
TODO: Write general description for this method
18 19 20 |
# File 'lib/sticky_io_restful_api_v2025731/models/billing_model_data2.rb', line 18 def name @name end |
#preserve_quantity ⇒ Integer
TODO: Write general description for this method
42 43 44 |
# File 'lib/sticky_io_restful_api_v2025731/models/billing_model_data2.rb', line 42 def preserve_quantity @preserve_quantity end |
#type_id ⇒ Integer
TODO: Write general description for this method
46 47 48 |
# File 'lib/sticky_io_restful_api_v2025731/models/billing_model_data2.rb', line 46 def type_id @type_id end |
#update_in ⇒ String
TODO: Write general description for this method
58 59 60 |
# File 'lib/sticky_io_restful_api_v2025731/models/billing_model_data2.rb', line 58 def update_in @update_in end |
#updated_by ⇒ Integer
TODO: Write general description for this method
50 51 52 |
# File 'lib/sticky_io_restful_api_v2025731/models/billing_model_data2.rb', line 50 def updated_by @updated_by end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
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 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 |
# File 'lib/sticky_io_restful_api_v2025731/models/billing_model_data2.rb', line 125 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 expire_cycles = hash.key?('expire_cycles') ? hash['expire_cycles'] : nil bill_by_type_id = hash.key?('bill_by_type_id') ? hash['bill_by_type_id'] : nil bill_by_days = hash.key?('bill_by_days') ? hash['bill_by_days'] : nil interval_day = hash.key?('interval_day') ? hash['interval_day'] : nil interval_week = hash.key?('interval_week') ? hash['interval_week'] : nil preserve_quantity = hash.key?('preserve_quantity') ? hash['preserve_quantity'] : nil type_id = hash.key?('type_id') ? hash['type_id'] : nil updated_by = hash.key?('updated_by') ? hash['updated_by'] : nil created_by = hash.key?('created_by') ? hash['created_by'] : nil update_in = hash.key?('update_in') ? hash['update_in'] : nil date_in = hash.key?('date_in') ? hash['date_in'] : nil buffer_days = hash.key?('buffer_days') ? hash['buffer_days'] : 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. BillingModelData2.new(id: id, name: name, expire_cycles: expire_cycles, bill_by_type_id: bill_by_type_id, bill_by_days: bill_by_days, interval_day: interval_day, interval_week: interval_week, preserve_quantity: preserve_quantity, type_id: type_id, updated_by: updated_by, created_by: created_by, update_in: update_in, date_in: date_in, buffer_days: buffer_days, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 |
# File 'lib/sticky_io_restful_api_v2025731/models/billing_model_data2.rb', line 69 def self.names @_hash = {} if @_hash.nil? @_hash['id'] = 'id' @_hash['name'] = 'name' @_hash['expire_cycles'] = 'expire_cycles' @_hash['bill_by_type_id'] = 'bill_by_type_id' @_hash['bill_by_days'] = 'bill_by_days' @_hash['interval_day'] = 'interval_day' @_hash['interval_week'] = 'interval_week' @_hash['preserve_quantity'] = 'preserve_quantity' @_hash['type_id'] = 'type_id' @_hash['updated_by'] = 'updated_by' @_hash['created_by'] = 'created_by' @_hash['update_in'] = 'update_in' @_hash['date_in'] = 'date_in' @_hash['buffer_days'] = 'buffer_days' @_hash end |
.nullables ⇒ Object
An array for nullable fields
94 95 96 97 98 |
# File 'lib/sticky_io_restful_api_v2025731/models/billing_model_data2.rb', line 94 def self.nullables %w[ update_in ] end |
.optionals ⇒ Object
An array for optional fields
89 90 91 |
# File 'lib/sticky_io_restful_api_v2025731/models/billing_model_data2.rb', line 89 def self.optionals [] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
183 184 185 186 187 188 189 190 191 192 |
# File 'lib/sticky_io_restful_api_v2025731/models/billing_model_data2.rb', line 183 def inspect class_name = self.class.name.split('::').last "<#{class_name} id: #{@id.inspect}, name: #{@name.inspect}, expire_cycles:"\ " #{@expire_cycles.inspect}, bill_by_type_id: #{@bill_by_type_id.inspect}, bill_by_days:"\ " #{@bill_by_days.inspect}, interval_day: #{@interval_day.inspect}, interval_week:"\ " #{@interval_week.inspect}, preserve_quantity: #{@preserve_quantity.inspect}, type_id:"\ " #{@type_id.inspect}, updated_by: #{@updated_by.inspect}, created_by:"\ " #{@created_by.inspect}, update_in: #{@update_in.inspect}, date_in: #{@date_in.inspect},"\ " buffer_days: #{@buffer_days.inspect}, additional_properties: #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
172 173 174 175 176 177 178 179 180 |
# File 'lib/sticky_io_restful_api_v2025731/models/billing_model_data2.rb', line 172 def to_s class_name = self.class.name.split('::').last "<#{class_name} id: #{@id}, name: #{@name}, expire_cycles: #{@expire_cycles},"\ " bill_by_type_id: #{@bill_by_type_id}, bill_by_days: #{@bill_by_days}, interval_day:"\ " #{@interval_day}, interval_week: #{@interval_week}, preserve_quantity:"\ " #{@preserve_quantity}, type_id: #{@type_id}, updated_by: #{@updated_by}, created_by:"\ " #{@created_by}, update_in: #{@update_in}, date_in: #{@date_in}, buffer_days:"\ " #{@buffer_days}, additional_properties: #{@additional_properties}>" end |