Class: UnivapayClientSdk::CustomsDeclarationWebhookOtherError
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- UnivapayClientSdk::CustomsDeclarationWebhookOtherError
- Defined in:
- lib/univapay_client_sdk/models/customs_declaration_webhook_other_error.rb
Overview
Nested customs-processing error entry returned in others.
Instance Attribute Summary collapse
-
#credentials_id ⇒ UUID | String
Gateway credentials involved in the error when applicable.
-
#item_name ⇒ String
Related item name for
related_item. -
#message ⇒ Array[String]
Additional reason values for
not_selected_reasons. -
#type ⇒ String
Backend other-error type.
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.
-
.validate(value) ⇒ Object
Validates an instance of the object from a given value.
Instance Method Summary collapse
-
#initialize(type: SKIP, credentials_id: SKIP, message: SKIP, item_name: SKIP, additional_properties: nil) ⇒ CustomsDeclarationWebhookOtherError
constructor
A new instance of CustomsDeclarationWebhookOtherError.
-
#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(type: SKIP, credentials_id: SKIP, message: SKIP, item_name: SKIP, additional_properties: nil) ⇒ CustomsDeclarationWebhookOtherError
Returns a new instance of CustomsDeclarationWebhookOtherError.
57 58 59 60 61 62 63 64 65 66 67 |
# File 'lib/univapay_client_sdk/models/customs_declaration_webhook_other_error.rb', line 57 def initialize(type: SKIP, credentials_id: SKIP, message: SKIP, item_name: SKIP, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @type = type unless type == SKIP @credentials_id = credentials_id unless credentials_id == SKIP @message = unless == SKIP @item_name = item_name unless item_name == SKIP @additional_properties = additional_properties end |
Instance Attribute Details
#credentials_id ⇒ UUID | String
Gateway credentials involved in the error when applicable.
18 19 20 |
# File 'lib/univapay_client_sdk/models/customs_declaration_webhook_other_error.rb', line 18 def credentials_id @credentials_id end |
#item_name ⇒ String
Related item name for related_item.
26 27 28 |
# File 'lib/univapay_client_sdk/models/customs_declaration_webhook_other_error.rb', line 26 def item_name @item_name end |
#message ⇒ Array[String]
Additional reason values for not_selected_reasons.
22 23 24 |
# File 'lib/univapay_client_sdk/models/customs_declaration_webhook_other_error.rb', line 22 def @message end |
#type ⇒ String
Backend other-error type.
14 15 16 |
# File 'lib/univapay_client_sdk/models/customs_declaration_webhook_other_error.rb', line 14 def type @type 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 |
# File 'lib/univapay_client_sdk/models/customs_declaration_webhook_other_error.rb', line 70 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. type = hash.key?('type') ? hash['type'] : SKIP credentials_id = hash.key?('credentials_id') ? hash['credentials_id'] : SKIP = hash.key?('message') ? hash['message'] : SKIP item_name = hash.key?('item_name') ? hash['item_name'] : 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. CustomsDeclarationWebhookOtherError.new(type: type, credentials_id: credentials_id, message: , item_name: item_name, 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/univapay_client_sdk/models/customs_declaration_webhook_other_error.rb', line 29 def self.names @_hash = {} if @_hash.nil? @_hash['type'] = 'type' @_hash['credentials_id'] = 'credentials_id' @_hash['message'] = 'message' @_hash['item_name'] = 'item_name' @_hash end |
.nullables ⇒ Object
An array for nullable fields
49 50 51 52 53 54 55 |
# File 'lib/univapay_client_sdk/models/customs_declaration_webhook_other_error.rb', line 49 def self.nullables %w[ credentials_id message item_name ] end |
.optionals ⇒ Object
An array for optional fields
39 40 41 42 43 44 45 46 |
# File 'lib/univapay_client_sdk/models/customs_declaration_webhook_other_error.rb', line 39 def self.optionals %w[ type credentials_id message item_name ] end |
.validate(value) ⇒ Object
Validates an instance of the object from a given value.
97 98 99 100 101 102 103 |
# File 'lib/univapay_client_sdk/models/customs_declaration_webhook_other_error.rb', line 97 def self.validate(value) return true if value.instance_of? self return false unless value.instance_of? Hash true end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
113 114 115 116 117 118 |
# File 'lib/univapay_client_sdk/models/customs_declaration_webhook_other_error.rb', line 113 def inspect class_name = self.class.name.split('::').last "<#{class_name} type: #{@type.inspect}, credentials_id: #{@credentials_id.inspect},"\ " message: #{@message.inspect}, item_name: #{@item_name.inspect}, additional_properties:"\ " #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
106 107 108 109 110 |
# File 'lib/univapay_client_sdk/models/customs_declaration_webhook_other_error.rb', line 106 def to_s class_name = self.class.name.split('::').last "<#{class_name} type: #{@type}, credentials_id: #{@credentials_id}, message: #{@message},"\ " item_name: #{@item_name}, additional_properties: #{@additional_properties}>" end |