Class: WalmartApIs::ReportAvailabilityResponse
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- WalmartApIs::ReportAvailabilityResponse
- Defined in:
- lib/walmart_ap_is/models/report_availability_response.rb
Overview
ReportAvailabilityResponse Model.
Instance Attribute Summary collapse
-
#available_dates ⇒ Array[String]
TODO: Write general description for this method.
-
#is_legacy_report_present ⇒ TrueClass | FalseClass
TODO: Write general description for this method.
-
#is_mt_report_present ⇒ TrueClass | FalseClass
TODO: Write general description for this method.
-
#is_wfs_report_present ⇒ TrueClass | FalseClass
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(available_dates: SKIP, is_wfs_report_present: SKIP, is_legacy_report_present: SKIP, is_mt_report_present: SKIP, additional_properties: nil) ⇒ ReportAvailabilityResponse
constructor
A new instance of ReportAvailabilityResponse.
-
#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(available_dates: SKIP, is_wfs_report_present: SKIP, is_legacy_report_present: SKIP, is_mt_report_present: SKIP, additional_properties: nil) ⇒ ReportAvailabilityResponse
Returns a new instance of ReportAvailabilityResponse.
53 54 55 56 57 58 59 60 61 62 63 64 |
# File 'lib/walmart_ap_is/models/report_availability_response.rb', line 53 def initialize(available_dates: SKIP, is_wfs_report_present: SKIP, is_legacy_report_present: SKIP, is_mt_report_present: SKIP, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @available_dates = available_dates unless available_dates == SKIP @is_wfs_report_present = is_wfs_report_present unless is_wfs_report_present == SKIP @is_legacy_report_present = is_legacy_report_present unless is_legacy_report_present == SKIP @is_mt_report_present = is_mt_report_present unless is_mt_report_present == SKIP @additional_properties = additional_properties end |
Instance Attribute Details
#available_dates ⇒ Array[String]
TODO: Write general description for this method
14 15 16 |
# File 'lib/walmart_ap_is/models/report_availability_response.rb', line 14 def available_dates @available_dates end |
#is_legacy_report_present ⇒ TrueClass | FalseClass
TODO: Write general description for this method
22 23 24 |
# File 'lib/walmart_ap_is/models/report_availability_response.rb', line 22 def is_legacy_report_present @is_legacy_report_present end |
#is_mt_report_present ⇒ TrueClass | FalseClass
TODO: Write general description for this method
26 27 28 |
# File 'lib/walmart_ap_is/models/report_availability_response.rb', line 26 def is_mt_report_present @is_mt_report_present end |
#is_wfs_report_present ⇒ TrueClass | FalseClass
TODO: Write general description for this method
18 19 20 |
# File 'lib/walmart_ap_is/models/report_availability_response.rb', line 18 def is_wfs_report_present @is_wfs_report_present end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 |
# File 'lib/walmart_ap_is/models/report_availability_response.rb', line 67 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. available_dates = hash.key?('availableDates') ? hash['availableDates'] : SKIP is_wfs_report_present = hash.key?('isWfsReportPresent') ? hash['isWfsReportPresent'] : SKIP is_legacy_report_present = hash.key?('isLegacyReportPresent') ? hash['isLegacyReportPresent'] : SKIP is_mt_report_present = hash.key?('isMtReportPresent') ? hash['isMtReportPresent'] : SKIP # 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. ReportAvailabilityResponse.new(available_dates: available_dates, is_wfs_report_present: is_wfs_report_present, is_legacy_report_present: is_legacy_report_present, is_mt_report_present: is_mt_report_present, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
29 30 31 32 33 34 35 36 |
# File 'lib/walmart_ap_is/models/report_availability_response.rb', line 29 def self.names @_hash = {} if @_hash.nil? @_hash['available_dates'] = 'availableDates' @_hash['is_wfs_report_present'] = 'isWfsReportPresent' @_hash['is_legacy_report_present'] = 'isLegacyReportPresent' @_hash['is_mt_report_present'] = 'isMtReportPresent' @_hash end |
.nullables ⇒ Object
An array for nullable fields
49 50 51 |
# File 'lib/walmart_ap_is/models/report_availability_response.rb', line 49 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
39 40 41 42 43 44 45 46 |
# File 'lib/walmart_ap_is/models/report_availability_response.rb', line 39 def self.optionals %w[ available_dates is_wfs_report_present is_legacy_report_present is_mt_report_present ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
105 106 107 108 109 110 111 |
# File 'lib/walmart_ap_is/models/report_availability_response.rb', line 105 def inspect class_name = self.class.name.split('::').last "<#{class_name} available_dates: #{@available_dates.inspect}, is_wfs_report_present:"\ " #{@is_wfs_report_present.inspect}, is_legacy_report_present:"\ " #{@is_legacy_report_present.inspect}, is_mt_report_present:"\ " #{@is_mt_report_present.inspect}, additional_properties: #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
96 97 98 99 100 101 102 |
# File 'lib/walmart_ap_is/models/report_availability_response.rb', line 96 def to_s class_name = self.class.name.split('::').last "<#{class_name} available_dates: #{@available_dates}, is_wfs_report_present:"\ " #{@is_wfs_report_present}, is_legacy_report_present: #{@is_legacy_report_present},"\ " is_mt_report_present: #{@is_mt_report_present}, additional_properties:"\ " #{@additional_properties}>" end |