Class: NewStoreApi::RequestPackageCustoms
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- NewStoreApi::RequestPackageCustoms
- Defined in:
- lib/new_store_api/models/request_package_customs.rb
Overview
RequestPackageCustoms Model.
Instance Attribute Summary collapse
-
#customs_signer ⇒ String
TODO: Write general description for this method.
-
#itn ⇒ String
TODO: Write general description for this method.
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(customs_signer = nil, itn = SKIP) ⇒ RequestPackageCustoms
constructor
A new instance of RequestPackageCustoms.
-
#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(customs_signer = nil, itn = SKIP) ⇒ RequestPackageCustoms
Returns a new instance of RequestPackageCustoms.
42 43 44 45 |
# File 'lib/new_store_api/models/request_package_customs.rb', line 42 def initialize(customs_signer = nil, itn = SKIP) @customs_signer = customs_signer @itn = itn unless itn == SKIP end |
Instance Attribute Details
#customs_signer ⇒ String
TODO: Write general description for this method
14 15 16 |
# File 'lib/new_store_api/models/request_package_customs.rb', line 14 def customs_signer @customs_signer end |
#itn ⇒ String
TODO: Write general description for this method
18 19 20 |
# File 'lib/new_store_api/models/request_package_customs.rb', line 18 def itn @itn 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 |
# File 'lib/new_store_api/models/request_package_customs.rb', line 48 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. customs_signer = hash.key?('customs_signer') ? hash['customs_signer'] : nil itn = hash.key?('itn') ? hash['itn'] : SKIP # Create object from extracted values. RequestPackageCustoms.new(customs_signer, itn) end |
.names ⇒ Object
A mapping from model property names to API property names.
21 22 23 24 25 26 |
# File 'lib/new_store_api/models/request_package_customs.rb', line 21 def self.names @_hash = {} if @_hash.nil? @_hash['customs_signer'] = 'customs_signer' @_hash['itn'] = 'itn' @_hash end |
.nullables ⇒ Object
An array for nullable fields
36 37 38 39 40 |
# File 'lib/new_store_api/models/request_package_customs.rb', line 36 def self.nullables %w[ itn ] end |
.optionals ⇒ Object
An array for optional fields
29 30 31 32 33 |
# File 'lib/new_store_api/models/request_package_customs.rb', line 29 def self.optionals %w[ itn ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
68 69 70 71 |
# File 'lib/new_store_api/models/request_package_customs.rb', line 68 def inspect class_name = self.class.name.split('::').last "<#{class_name} customs_signer: #{@customs_signer.inspect}, itn: #{@itn.inspect}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
62 63 64 65 |
# File 'lib/new_store_api/models/request_package_customs.rb', line 62 def to_s class_name = self.class.name.split('::').last "<#{class_name} customs_signer: #{@customs_signer}, itn: #{@itn}>" end |