Class: NewStoreApi::LimitExceededWhen
- Defined in:
- lib/new_store_api/models/limit_exceeded_when.rb
Overview
LimitExceededWhen Model.
Instance Attribute Summary collapse
-
#order_amount_lt ⇒ Float
AND order amount less than.
-
#shipment_count_gt ⇒ Integer
AAAAACondition: number of shipments greater than.
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(order_amount_lt = nil, shipment_count_gt = nil) ⇒ LimitExceededWhen
constructor
A new instance of LimitExceededWhen.
-
#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(order_amount_lt = nil, shipment_count_gt = nil) ⇒ LimitExceededWhen
Returns a new instance of LimitExceededWhen.
38 39 40 41 |
# File 'lib/new_store_api/models/limit_exceeded_when.rb', line 38 def initialize(order_amount_lt = nil, shipment_count_gt = nil) @order_amount_lt = order_amount_lt @shipment_count_gt = shipment_count_gt end |
Instance Attribute Details
#order_amount_lt ⇒ Float
AND order amount less than
14 15 16 |
# File 'lib/new_store_api/models/limit_exceeded_when.rb', line 14 def order_amount_lt @order_amount_lt end |
#shipment_count_gt ⇒ Integer
AAAAACondition: number of shipments greater than
18 19 20 |
# File 'lib/new_store_api/models/limit_exceeded_when.rb', line 18 def shipment_count_gt @shipment_count_gt end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
44 45 46 47 48 49 50 51 52 53 54 55 56 |
# File 'lib/new_store_api/models/limit_exceeded_when.rb', line 44 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. order_amount_lt = hash.key?('order_amount_lt') ? hash['order_amount_lt'] : nil shipment_count_gt = hash.key?('shipment_count_gt') ? hash['shipment_count_gt'] : nil # Create object from extracted values. LimitExceededWhen.new(order_amount_lt, shipment_count_gt) end |
.names ⇒ Object
A mapping from model property names to API property names.
21 22 23 24 25 26 |
# File 'lib/new_store_api/models/limit_exceeded_when.rb', line 21 def self.names @_hash = {} if @_hash.nil? @_hash['order_amount_lt'] = 'order_amount_lt' @_hash['shipment_count_gt'] = 'shipment_count_gt' @_hash end |
.nullables ⇒ Object
An array for nullable fields
34 35 36 |
# File 'lib/new_store_api/models/limit_exceeded_when.rb', line 34 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
29 30 31 |
# File 'lib/new_store_api/models/limit_exceeded_when.rb', line 29 def self.optionals [] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
66 67 68 69 70 |
# File 'lib/new_store_api/models/limit_exceeded_when.rb', line 66 def inspect class_name = self.class.name.split('::').last "<#{class_name} order_amount_lt: #{@order_amount_lt.inspect}, shipment_count_gt:"\ " #{@shipment_count_gt.inspect}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
59 60 61 62 63 |
# File 'lib/new_store_api/models/limit_exceeded_when.rb', line 59 def to_s class_name = self.class.name.split('::').last "<#{class_name} order_amount_lt: #{@order_amount_lt}, shipment_count_gt:"\ " #{@shipment_count_gt}>" end |