Class: PaypalServerSdk::OrderUpdateCallbackErrorResponse
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- PaypalServerSdk::OrderUpdateCallbackErrorResponse
- Defined in:
- lib/paypal_server_sdk/models/order_update_callback_error_response.rb
Overview
The error details.
Instance Attribute Summary collapse
-
#details ⇒ Array[OrderUpdateCallbackErrorResponseDetails]
An array of additional details about the error.
-
#message ⇒ String
The message that describes the error.
-
#name ⇒ String
The human-readable, unique name of the error.
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(name:, message: SKIP, details: SKIP) ⇒ OrderUpdateCallbackErrorResponse
constructor
A new instance of OrderUpdateCallbackErrorResponse.
-
#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(name:, message: SKIP, details: SKIP) ⇒ OrderUpdateCallbackErrorResponse
Returns a new instance of OrderUpdateCallbackErrorResponse.
46 47 48 49 50 |
# File 'lib/paypal_server_sdk/models/order_update_callback_error_response.rb', line 46 def initialize(name:, message: SKIP, details: SKIP) @name = name @message = unless == SKIP @details = details unless details == SKIP end |
Instance Attribute Details
#details ⇒ Array[OrderUpdateCallbackErrorResponseDetails]
An array of additional details about the error.
22 23 24 |
# File 'lib/paypal_server_sdk/models/order_update_callback_error_response.rb', line 22 def details @details end |
#message ⇒ String
The message that describes the error.
18 19 20 |
# File 'lib/paypal_server_sdk/models/order_update_callback_error_response.rb', line 18 def @message end |
#name ⇒ String
The human-readable, unique name of the error.
14 15 16 |
# File 'lib/paypal_server_sdk/models/order_update_callback_error_response.rb', line 14 def name @name end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 |
# File 'lib/paypal_server_sdk/models/order_update_callback_error_response.rb', line 53 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. name = hash.key?('name') ? hash['name'] : nil = hash.key?('message') ? hash['message'] : SKIP # Parameter is an array, so we need to iterate through it details = nil unless hash['details'].nil? details = [] hash['details'].each do |structure| details << (OrderUpdateCallbackErrorResponseDetails.from_hash(structure) if structure) end end details = SKIP unless hash.key?('details') # Create object from extracted values. OrderUpdateCallbackErrorResponse.new(name: name, message: , details: details) end |
.names ⇒ Object
A mapping from model property names to API property names.
25 26 27 28 29 30 31 |
# File 'lib/paypal_server_sdk/models/order_update_callback_error_response.rb', line 25 def self.names @_hash = {} if @_hash.nil? @_hash['name'] = 'name' @_hash['message'] = 'message' @_hash['details'] = 'details' @_hash end |
.nullables ⇒ Object
An array for nullable fields
42 43 44 |
# File 'lib/paypal_server_sdk/models/order_update_callback_error_response.rb', line 42 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
34 35 36 37 38 39 |
# File 'lib/paypal_server_sdk/models/order_update_callback_error_response.rb', line 34 def self.optionals %w[ message details ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
83 84 85 86 87 |
# File 'lib/paypal_server_sdk/models/order_update_callback_error_response.rb', line 83 def inspect class_name = self.class.name.split('::').last "<#{class_name} name: #{@name.inspect}, message: #{@message.inspect}, details:"\ " #{@details.inspect}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
77 78 79 80 |
# File 'lib/paypal_server_sdk/models/order_update_callback_error_response.rb', line 77 def to_s class_name = self.class.name.split('::').last "<#{class_name} name: #{@name}, message: #{@message}, details: #{@details}>" end |