Class: WalmartApIs::ProgramActionFeedHeader
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- WalmartApIs::ProgramActionFeedHeader
- Defined in:
- lib/walmart_ap_is/models/program_action_feed_header.rb
Overview
ProgramActionFeedHeader Model.
Instance Attribute Summary collapse
-
#feed_date ⇒ String
TODO: Write general description for this method.
-
#feed_type ⇒ String
TODO: Write general description for this method.
-
#locale ⇒ String
TODO: Write general description for this method.
-
#process_mode ⇒ String
TODO: Write general description for this method.
-
#request_batch_id ⇒ String
TODO: Write general description for this method.
-
#request_id ⇒ String
TODO: Write general description for this method.
-
#selling_channel ⇒ String
TODO: Write general description for this method.
-
#subset ⇒ String
TODO: Write general description for this method.
-
#version ⇒ String
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(request_id:, request_batch_id:, process_mode:, subset:, selling_channel:, version:, locale:, feed_date:, feed_type:, additional_properties: nil) ⇒ ProgramActionFeedHeader
constructor
A new instance of ProgramActionFeedHeader.
-
#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(request_id:, request_batch_id:, process_mode:, subset:, selling_channel:, version:, locale:, feed_date:, feed_type:, additional_properties: nil) ⇒ ProgramActionFeedHeader
Returns a new instance of ProgramActionFeedHeader.
73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 |
# File 'lib/walmart_ap_is/models/program_action_feed_header.rb', line 73 def initialize(request_id:, request_batch_id:, process_mode:, subset:, selling_channel:, version:, locale:, feed_date:, feed_type:, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @request_id = request_id @request_batch_id = request_batch_id @process_mode = process_mode @subset = subset @selling_channel = selling_channel @version = version @locale = locale @feed_date = feed_date @feed_type = feed_type @additional_properties = additional_properties end |
Instance Attribute Details
#feed_date ⇒ String
TODO: Write general description for this method
42 43 44 |
# File 'lib/walmart_ap_is/models/program_action_feed_header.rb', line 42 def feed_date @feed_date end |
#feed_type ⇒ String
TODO: Write general description for this method
46 47 48 |
# File 'lib/walmart_ap_is/models/program_action_feed_header.rb', line 46 def feed_type @feed_type end |
#locale ⇒ String
TODO: Write general description for this method
38 39 40 |
# File 'lib/walmart_ap_is/models/program_action_feed_header.rb', line 38 def locale @locale end |
#process_mode ⇒ String
TODO: Write general description for this method
22 23 24 |
# File 'lib/walmart_ap_is/models/program_action_feed_header.rb', line 22 def process_mode @process_mode end |
#request_batch_id ⇒ String
TODO: Write general description for this method
18 19 20 |
# File 'lib/walmart_ap_is/models/program_action_feed_header.rb', line 18 def request_batch_id @request_batch_id end |
#request_id ⇒ String
TODO: Write general description for this method
14 15 16 |
# File 'lib/walmart_ap_is/models/program_action_feed_header.rb', line 14 def request_id @request_id end |
#selling_channel ⇒ String
TODO: Write general description for this method
30 31 32 |
# File 'lib/walmart_ap_is/models/program_action_feed_header.rb', line 30 def selling_channel @selling_channel end |
#subset ⇒ String
TODO: Write general description for this method
26 27 28 |
# File 'lib/walmart_ap_is/models/program_action_feed_header.rb', line 26 def subset @subset end |
#version ⇒ String
TODO: Write general description for this method
34 35 36 |
# File 'lib/walmart_ap_is/models/program_action_feed_header.rb', line 34 def version @version end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
92 93 94 95 96 97 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 |
# File 'lib/walmart_ap_is/models/program_action_feed_header.rb', line 92 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. request_id = hash.key?('requestId') ? hash['requestId'] : nil request_batch_id = hash.key?('requestBatchId') ? hash['requestBatchId'] : nil process_mode = hash.key?('processMode') ? hash['processMode'] : nil subset = hash.key?('subset') ? hash['subset'] : nil selling_channel = hash.key?('sellingChannel') ? hash['sellingChannel'] : nil version = hash.key?('version') ? hash['version'] : nil locale = hash.key?('locale') ? hash['locale'] : nil feed_date = hash.key?('feedDate') ? hash['feedDate'] : nil feed_type = hash.key?('feedType') ? hash['feedType'] : 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. ProgramActionFeedHeader.new(request_id: request_id, request_batch_id: request_batch_id, process_mode: process_mode, subset: subset, selling_channel: selling_channel, version: version, locale: locale, feed_date: feed_date, feed_type: feed_type, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
49 50 51 52 53 54 55 56 57 58 59 60 61 |
# File 'lib/walmart_ap_is/models/program_action_feed_header.rb', line 49 def self.names @_hash = {} if @_hash.nil? @_hash['request_id'] = 'requestId' @_hash['request_batch_id'] = 'requestBatchId' @_hash['process_mode'] = 'processMode' @_hash['subset'] = 'subset' @_hash['selling_channel'] = 'sellingChannel' @_hash['version'] = 'version' @_hash['locale'] = 'locale' @_hash['feed_date'] = 'feedDate' @_hash['feed_type'] = 'feedType' @_hash end |
.nullables ⇒ Object
An array for nullable fields
69 70 71 |
# File 'lib/walmart_ap_is/models/program_action_feed_header.rb', line 69 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
64 65 66 |
# File 'lib/walmart_ap_is/models/program_action_feed_header.rb', line 64 def self.optionals [] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
138 139 140 141 142 143 144 145 |
# File 'lib/walmart_ap_is/models/program_action_feed_header.rb', line 138 def inspect class_name = self.class.name.split('::').last "<#{class_name} request_id: #{@request_id.inspect}, request_batch_id:"\ " #{@request_batch_id.inspect}, process_mode: #{@process_mode.inspect}, subset:"\ " #{@subset.inspect}, selling_channel: #{@selling_channel.inspect}, version:"\ " #{@version.inspect}, locale: #{@locale.inspect}, feed_date: #{@feed_date.inspect},"\ " feed_type: #{@feed_type.inspect}, additional_properties: #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
129 130 131 132 133 134 135 |
# File 'lib/walmart_ap_is/models/program_action_feed_header.rb', line 129 def to_s class_name = self.class.name.split('::').last "<#{class_name} request_id: #{@request_id}, request_batch_id: #{@request_batch_id},"\ " process_mode: #{@process_mode}, subset: #{@subset}, selling_channel: #{@selling_channel},"\ " version: #{@version}, locale: #{@locale}, feed_date: #{@feed_date}, feed_type:"\ " #{@feed_type}, additional_properties: #{@additional_properties}>" end |