Class: UspsApi::CloseOpenAndDistributeContainerResponse
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- UspsApi::CloseOpenAndDistributeContainerResponse
- Defined in:
- lib/usps_api/models/close_open_and_distribute_container_response.rb
Overview
CloseOpenAndDistributeContainerResponse Model.
Instance Attribute Summary collapse
-
#close_pmod_metadata ⇒ ClosePmodMetadata
TODO: Write general description for this method.
-
#scan_form_image ⇒ String
The scan form image, Base64 encoded file contents.
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(close_pmod_metadata: SKIP, scan_form_image: SKIP) ⇒ CloseOpenAndDistributeContainerResponse
constructor
A new instance of CloseOpenAndDistributeContainerResponse.
-
#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(close_pmod_metadata: SKIP, scan_form_image: SKIP) ⇒ CloseOpenAndDistributeContainerResponse
Returns a new instance of CloseOpenAndDistributeContainerResponse.
42 43 44 45 |
# File 'lib/usps_api/models/close_open_and_distribute_container_response.rb', line 42 def initialize(close_pmod_metadata: SKIP, scan_form_image: SKIP) @close_pmod_metadata = unless == SKIP @scan_form_image = scan_form_image unless scan_form_image == SKIP end |
Instance Attribute Details
#close_pmod_metadata ⇒ ClosePmodMetadata
TODO: Write general description for this method
14 15 16 |
# File 'lib/usps_api/models/close_open_and_distribute_container_response.rb', line 14 def @close_pmod_metadata end |
#scan_form_image ⇒ String
The scan form image, Base64 encoded file contents. Only returned when requested with ‘generateScanForm`.
19 20 21 |
# File 'lib/usps_api/models/close_open_and_distribute_container_response.rb', line 19 def scan_form_image @scan_form_image end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
48 49 50 51 52 53 54 55 56 57 58 59 60 |
# File 'lib/usps_api/models/close_open_and_distribute_container_response.rb', line 48 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. = ClosePmodMetadata.from_hash(hash['closePmodMetadata']) if hash['closePmodMetadata'] scan_form_image = hash.key?('SCANFormImage') ? hash['SCANFormImage'] : SKIP # Create object from extracted values. CloseOpenAndDistributeContainerResponse.new(close_pmod_metadata: , scan_form_image: scan_form_image) end |
.names ⇒ Object
A mapping from model property names to API property names.
22 23 24 25 26 27 |
# File 'lib/usps_api/models/close_open_and_distribute_container_response.rb', line 22 def self.names @_hash = {} if @_hash.nil? @_hash['close_pmod_metadata'] = 'closePmodMetadata' @_hash['scan_form_image'] = 'SCANFormImage' @_hash end |
.nullables ⇒ Object
An array for nullable fields
38 39 40 |
# File 'lib/usps_api/models/close_open_and_distribute_container_response.rb', line 38 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
30 31 32 33 34 35 |
# File 'lib/usps_api/models/close_open_and_distribute_container_response.rb', line 30 def self.optionals %w[ close_pmod_metadata scan_form_image ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
70 71 72 73 74 |
# File 'lib/usps_api/models/close_open_and_distribute_container_response.rb', line 70 def inspect class_name = self.class.name.split('::').last "<#{class_name} close_pmod_metadata: #{@close_pmod_metadata.inspect}, scan_form_image:"\ " #{@scan_form_image.inspect}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
63 64 65 66 67 |
# File 'lib/usps_api/models/close_open_and_distribute_container_response.rb', line 63 def to_s class_name = self.class.name.split('::').last "<#{class_name} close_pmod_metadata: #{@close_pmod_metadata}, scan_form_image:"\ " #{@scan_form_image}>" end |