Class: PaypalServerSdk::OrderUpdateCallbackErrorResponseDetails
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- PaypalServerSdk::OrderUpdateCallbackErrorResponseDetails
- Defined in:
- lib/paypal_server_sdk/models/order_update_callback_error_response_details.rb
Overview
The error details. Required for client-side ‘4XX` errors.
Instance Attribute Summary collapse
-
#field ⇒ String
The field that caused the error.
-
#issue ⇒ String
The unique, fine-grained application-level error code.
-
#value ⇒ String
The value of the field that caused 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(issue:, field: SKIP, value: SKIP) ⇒ OrderUpdateCallbackErrorResponseDetails
constructor
A new instance of OrderUpdateCallbackErrorResponseDetails.
-
#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(issue:, field: SKIP, value: SKIP) ⇒ OrderUpdateCallbackErrorResponseDetails
Returns a new instance of OrderUpdateCallbackErrorResponseDetails.
47 48 49 50 51 |
# File 'lib/paypal_server_sdk/models/order_update_callback_error_response_details.rb', line 47 def initialize(issue:, field: SKIP, value: SKIP) @field = field unless field == SKIP @value = value unless value == SKIP @issue = issue end |
Instance Attribute Details
#field ⇒ String
The field that caused the error. If this field is in the body, set this value to the field’s JSON pointer value. Required for client-side errors.
15 16 17 |
# File 'lib/paypal_server_sdk/models/order_update_callback_error_response_details.rb', line 15 def field @field end |
#issue ⇒ String
The unique, fine-grained application-level error code.
23 24 25 |
# File 'lib/paypal_server_sdk/models/order_update_callback_error_response_details.rb', line 23 def issue @issue end |
#value ⇒ String
The value of the field that caused the error.
19 20 21 |
# File 'lib/paypal_server_sdk/models/order_update_callback_error_response_details.rb', line 19 def value @value end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
54 55 56 57 58 59 60 61 62 63 64 65 66 |
# File 'lib/paypal_server_sdk/models/order_update_callback_error_response_details.rb', line 54 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. issue = hash.key?('issue') ? hash['issue'] : nil field = hash.key?('field') ? hash['field'] : SKIP value = hash.key?('value') ? hash['value'] : SKIP # Create object from extracted values. OrderUpdateCallbackErrorResponseDetails.new(issue: issue, field: field, value: value) end |
.names ⇒ Object
A mapping from model property names to API property names.
26 27 28 29 30 31 32 |
# File 'lib/paypal_server_sdk/models/order_update_callback_error_response_details.rb', line 26 def self.names @_hash = {} if @_hash.nil? @_hash['field'] = 'field' @_hash['value'] = 'value' @_hash['issue'] = 'issue' @_hash end |
.nullables ⇒ Object
An array for nullable fields
43 44 45 |
# File 'lib/paypal_server_sdk/models/order_update_callback_error_response_details.rb', line 43 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
35 36 37 38 39 40 |
# File 'lib/paypal_server_sdk/models/order_update_callback_error_response_details.rb', line 35 def self.optionals %w[ field value ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
75 76 77 78 79 |
# File 'lib/paypal_server_sdk/models/order_update_callback_error_response_details.rb', line 75 def inspect class_name = self.class.name.split('::').last "<#{class_name} field: #{@field.inspect}, value: #{@value.inspect}, issue:"\ " #{@issue.inspect}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
69 70 71 72 |
# File 'lib/paypal_server_sdk/models/order_update_callback_error_response_details.rb', line 69 def to_s class_name = self.class.name.split('::').last "<#{class_name} field: #{@field}, value: #{@value}, issue: #{@issue}>" end |