Class: FdxV660Api::AssetTransferNetworkList1
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- FdxV660Api::AssetTransferNetworkList1
- Defined in:
- lib/fdx_v660_api/models/asset_transfer_network_list1.rb
Overview
AssetTransferNetworkList array as a JSON response if not encrypted, or as the JSON payload which is encrypted for an application/jwt response
Instance Attribute Summary collapse
-
#asset_transfer_networks ⇒ Array[AssetTransferNetwork]
Array of asset transfer networks.
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(asset_transfer_networks: SKIP, additional_properties: nil) ⇒ AssetTransferNetworkList1
constructor
A new instance of AssetTransferNetworkList1.
-
#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(asset_transfer_networks: SKIP, additional_properties: nil) ⇒ AssetTransferNetworkList1
Returns a new instance of AssetTransferNetworkList1.
36 37 38 39 40 41 42 |
# File 'lib/fdx_v660_api/models/asset_transfer_network_list1.rb', line 36 def initialize(asset_transfer_networks: SKIP, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @asset_transfer_networks = asset_transfer_networks unless asset_transfer_networks == SKIP @additional_properties = additional_properties end |
Instance Attribute Details
#asset_transfer_networks ⇒ Array[AssetTransferNetwork]
Array of asset transfer networks
15 16 17 |
# File 'lib/fdx_v660_api/models/asset_transfer_network_list1.rb', line 15 def asset_transfer_networks @asset_transfer_networks end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 |
# File 'lib/fdx_v660_api/models/asset_transfer_network_list1.rb', line 45 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. # Parameter is an array, so we need to iterate through it asset_transfer_networks = nil unless hash['assetTransferNetworks'].nil? asset_transfer_networks = [] hash['assetTransferNetworks'].each do |structure| asset_transfer_networks << (AssetTransferNetwork.from_hash(structure) if structure) end end asset_transfer_networks = SKIP unless hash.key?('assetTransferNetworks') # 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. AssetTransferNetworkList1.new(asset_transfer_networks: asset_transfer_networks, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
18 19 20 21 22 |
# File 'lib/fdx_v660_api/models/asset_transfer_network_list1.rb', line 18 def self.names @_hash = {} if @_hash.nil? @_hash['asset_transfer_networks'] = 'assetTransferNetworks' @_hash end |
.nullables ⇒ Object
An array for nullable fields
32 33 34 |
# File 'lib/fdx_v660_api/models/asset_transfer_network_list1.rb', line 32 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
25 26 27 28 29 |
# File 'lib/fdx_v660_api/models/asset_transfer_network_list1.rb', line 25 def self.optionals %w[ asset_transfer_networks ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
80 81 82 83 84 |
# File 'lib/fdx_v660_api/models/asset_transfer_network_list1.rb', line 80 def inspect class_name = self.class.name.split('::').last "<#{class_name} asset_transfer_networks: #{@asset_transfer_networks.inspect},"\ " additional_properties: #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
73 74 75 76 77 |
# File 'lib/fdx_v660_api/models/asset_transfer_network_list1.rb', line 73 def to_s class_name = self.class.name.split('::').last "<#{class_name} asset_transfer_networks: #{@asset_transfer_networks},"\ " additional_properties: #{@additional_properties}>" end |