Class: NewStoreApi::RequestPackageCustoms

Inherits:
BaseModel
  • Object
show all
Defined in:
lib/new_store_api/models/request_package_customs.rb

Overview

RequestPackageCustoms Model.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

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_signerString

TODO: Write general description for this method

Returns:

  • (String)


14
15
16
# File 'lib/new_store_api/models/request_package_customs.rb', line 14

def customs_signer
  @customs_signer
end

#itnString

TODO: Write general description for this method

Returns:

  • (String)


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

.namesObject

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

.nullablesObject

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

.optionalsObject

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

#inspectObject

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_sObject

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