Class: WalmartApIs::UpdateFulfillmentOrderRequest
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- WalmartApIs::UpdateFulfillmentOrderRequest
- Defined in:
- lib/walmart_ap_is/models/update_fulfillment_order_request.rb
Overview
UpdateFulfillmentOrderRequest Model.
Instance Attribute Summary collapse
-
#destination_address ⇒ Address
TODO: Write general description for this method.
-
#displayable_order_comment ⇒ String
TODO: Write general description for this method.
-
#notification_emails ⇒ Array[String]
TODO: Write general description for this method.
-
#shipping_speed_category ⇒ ShippingSpeedCategory
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(displayable_order_comment: SKIP, shipping_speed_category: SKIP, destination_address: SKIP, notification_emails: SKIP, additional_properties: nil) ⇒ UpdateFulfillmentOrderRequest
constructor
A new instance of UpdateFulfillmentOrderRequest.
-
#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(displayable_order_comment: SKIP, shipping_speed_category: SKIP, destination_address: SKIP, notification_emails: SKIP, additional_properties: nil) ⇒ UpdateFulfillmentOrderRequest
Returns a new instance of UpdateFulfillmentOrderRequest.
53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 |
# File 'lib/walmart_ap_is/models/update_fulfillment_order_request.rb', line 53 def initialize(displayable_order_comment: SKIP, shipping_speed_category: SKIP, destination_address: SKIP, notification_emails: SKIP, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? unless displayable_order_comment == SKIP @displayable_order_comment = displayable_order_comment end @shipping_speed_category = shipping_speed_category unless shipping_speed_category == SKIP @destination_address = destination_address unless destination_address == SKIP @notification_emails = notification_emails unless notification_emails == SKIP @additional_properties = additional_properties end |
Instance Attribute Details
#destination_address ⇒ Address
TODO: Write general description for this method
22 23 24 |
# File 'lib/walmart_ap_is/models/update_fulfillment_order_request.rb', line 22 def destination_address @destination_address end |
#displayable_order_comment ⇒ String
TODO: Write general description for this method
14 15 16 |
# File 'lib/walmart_ap_is/models/update_fulfillment_order_request.rb', line 14 def displayable_order_comment @displayable_order_comment end |
#notification_emails ⇒ Array[String]
TODO: Write general description for this method
26 27 28 |
# File 'lib/walmart_ap_is/models/update_fulfillment_order_request.rb', line 26 def notification_emails @notification_emails end |
#shipping_speed_category ⇒ ShippingSpeedCategory
TODO: Write general description for this method
18 19 20 |
# File 'lib/walmart_ap_is/models/update_fulfillment_order_request.rb', line 18 def shipping_speed_category @shipping_speed_category end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 |
# File 'lib/walmart_ap_is/models/update_fulfillment_order_request.rb', line 70 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. displayable_order_comment = hash.key?('displayableOrderComment') ? hash['displayableOrderComment'] : SKIP shipping_speed_category = hash.key?('shippingSpeedCategory') ? hash['shippingSpeedCategory'] : SKIP destination_address = Address.from_hash(hash['destinationAddress']) if hash['destinationAddress'] notification_emails = hash.key?('notificationEmails') ? hash['notificationEmails'] : 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. UpdateFulfillmentOrderRequest.new(displayable_order_comment: displayable_order_comment, shipping_speed_category: shipping_speed_category, destination_address: destination_address, notification_emails: notification_emails, 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/update_fulfillment_order_request.rb', line 29 def self.names @_hash = {} if @_hash.nil? @_hash['displayable_order_comment'] = 'displayableOrderComment' @_hash['shipping_speed_category'] = 'shippingSpeedCategory' @_hash['destination_address'] = 'destinationAddress' @_hash['notification_emails'] = 'notificationEmails' @_hash end |
.nullables ⇒ Object
An array for nullable fields
49 50 51 |
# File 'lib/walmart_ap_is/models/update_fulfillment_order_request.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/update_fulfillment_order_request.rb', line 39 def self.optionals %w[ displayable_order_comment shipping_speed_category destination_address notification_emails ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
108 109 110 111 112 113 114 |
# File 'lib/walmart_ap_is/models/update_fulfillment_order_request.rb', line 108 def inspect class_name = self.class.name.split('::').last "<#{class_name} displayable_order_comment: #{@displayable_order_comment.inspect},"\ " shipping_speed_category: #{@shipping_speed_category.inspect}, destination_address:"\ " #{@destination_address.inspect}, notification_emails: #{@notification_emails.inspect},"\ " additional_properties: #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
99 100 101 102 103 104 105 |
# File 'lib/walmart_ap_is/models/update_fulfillment_order_request.rb', line 99 def to_s class_name = self.class.name.split('::').last "<#{class_name} displayable_order_comment: #{@displayable_order_comment},"\ " shipping_speed_category: #{@shipping_speed_category}, destination_address:"\ " #{@destination_address}, notification_emails: #{@notification_emails},"\ " additional_properties: #{@additional_properties}>" end |