Class: InventoryManagementAndItemManagementAndOrderManagementAndPriceManagement::Charge12
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- InventoryManagementAndItemManagementAndOrderManagementAndPriceManagement::Charge12
- Defined in:
- lib/inventory_management_and_item_management_and_order_management_and_price_management/models/charge12.rb
Overview
Charge12 Model.
Instance Attribute Summary collapse
-
#charge_amount ⇒ Object
TODO: Write general description for this method.
-
#charge_name ⇒ String
TODO: Write general description for this method.
-
#charge_type ⇒ String
TODO: Write general description for this method.
-
#tax ⇒ Object
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(charge_amount = nil, charge_name = nil, charge_type = nil, tax = nil) ⇒ Charge12
constructor
A new instance of Charge12.
-
#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(charge_amount = nil, charge_name = nil, charge_type = nil, tax = nil) ⇒ Charge12
Returns a new instance of Charge12.
49 50 51 52 53 54 55 |
# File 'lib/inventory_management_and_item_management_and_order_management_and_price_management/models/charge12.rb', line 49 def initialize(charge_amount = nil, charge_name = nil, charge_type = nil, tax = nil) @charge_amount = charge_amount @charge_name = charge_name @charge_type = charge_type @tax = tax end |
Instance Attribute Details
#charge_amount ⇒ Object
TODO: Write general description for this method
15 16 17 |
# File 'lib/inventory_management_and_item_management_and_order_management_and_price_management/models/charge12.rb', line 15 def charge_amount @charge_amount end |
#charge_name ⇒ String
TODO: Write general description for this method
19 20 21 |
# File 'lib/inventory_management_and_item_management_and_order_management_and_price_management/models/charge12.rb', line 19 def charge_name @charge_name end |
#charge_type ⇒ String
TODO: Write general description for this method
23 24 25 |
# File 'lib/inventory_management_and_item_management_and_order_management_and_price_management/models/charge12.rb', line 23 def charge_type @charge_type end |
#tax ⇒ Object
TODO: Write general description for this method
27 28 29 |
# File 'lib/inventory_management_and_item_management_and_order_management_and_price_management/models/charge12.rb', line 27 def tax @tax end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 |
# File 'lib/inventory_management_and_item_management_and_order_management_and_price_management/models/charge12.rb', line 58 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. charge_amount = hash.key?('chargeAmount') ? hash['chargeAmount'] : nil charge_name = hash.key?('chargeName') ? hash['chargeName'] : nil charge_type = hash.key?('chargeType') ? hash['chargeType'] : nil tax = hash.key?('tax') ? hash['tax'] : nil # Create object from extracted values. Charge12.new(charge_amount, charge_name, charge_type, tax) end |
.names ⇒ Object
A mapping from model property names to API property names.
30 31 32 33 34 35 36 37 |
# File 'lib/inventory_management_and_item_management_and_order_management_and_price_management/models/charge12.rb', line 30 def self.names @_hash = {} if @_hash.nil? @_hash['charge_amount'] = 'chargeAmount' @_hash['charge_name'] = 'chargeName' @_hash['charge_type'] = 'chargeType' @_hash['tax'] = 'tax' @_hash end |
.nullables ⇒ Object
An array for nullable fields
45 46 47 |
# File 'lib/inventory_management_and_item_management_and_order_management_and_price_management/models/charge12.rb', line 45 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
40 41 42 |
# File 'lib/inventory_management_and_item_management_and_order_management_and_price_management/models/charge12.rb', line 40 def self.optionals [] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
82 83 84 85 86 |
# File 'lib/inventory_management_and_item_management_and_order_management_and_price_management/models/charge12.rb', line 82 def inspect class_name = self.class.name.split('::').last "<#{class_name} charge_amount: #{@charge_amount.inspect}, charge_name:"\ " #{@charge_name.inspect}, charge_type: #{@charge_type.inspect}, tax: #{@tax.inspect}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
75 76 77 78 79 |
# File 'lib/inventory_management_and_item_management_and_order_management_and_price_management/models/charge12.rb', line 75 def to_s class_name = self.class.name.split('::').last "<#{class_name} charge_amount: #{@charge_amount}, charge_name: #{@charge_name},"\ " charge_type: #{@charge_type}, tax: #{@tax}>" end |