Class: ShellCardManagementApIs::DeliveryAddressUpdateResponse

Inherits:
BaseModel
  • Object
show all
Defined in:
lib/shell_card_management_ap_is/models/delivery_address_update_response.rb

Overview

DeliveryAddressUpdateResponse Model.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from BaseModel

#to_hash, #to_json

Constructor Details

#initialize(request_id = SKIP, service_reference = SKIP, delivery_address_update_references = SKIP, error = SKIP) ⇒ DeliveryAddressUpdateResponse

Returns a new instance of DeliveryAddressUpdateResponse.



54
55
56
57
58
59
60
61
62
63
# File 'lib/shell_card_management_ap_is/models/delivery_address_update_response.rb', line 54

def initialize(request_id = SKIP, service_reference = SKIP,
               delivery_address_update_references = SKIP, error = SKIP)
  @request_id = request_id unless request_id == SKIP
  @service_reference = service_reference unless service_reference == SKIP
  unless delivery_address_update_references == SKIP
    @delivery_address_update_references =
      delivery_address_update_references
  end
  @error = error unless error == SKIP
end

Instance Attribute Details

#delivery_address_update_referencesDeliveryAddressUpdateReferences2

Service reference number for tracking.



22
23
24
# File 'lib/shell_card_management_ap_is/models/delivery_address_update_response.rb', line 22

def delivery_address_update_references
  @delivery_address_update_references
end

#errorErrorStatus

Service reference number for tracking.

Returns:



26
27
28
# File 'lib/shell_card_management_ap_is/models/delivery_address_update_response.rb', line 26

def error
  @error
end

#request_idString

Request ID to which was passed on the API request.

Returns:

  • (String)


14
15
16
# File 'lib/shell_card_management_ap_is/models/delivery_address_update_response.rb', line 14

def request_id
  @request_id
end

#service_referenceInteger

Service reference number for tracking.

Returns:

  • (Integer)


18
19
20
# File 'lib/shell_card_management_ap_is/models/delivery_address_update_response.rb', line 18

def service_reference
  @service_reference
end

Class Method Details

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
# File 'lib/shell_card_management_ap_is/models/delivery_address_update_response.rb', line 66

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
  request_id = hash.key?('RequestId') ? hash['RequestId'] : SKIP
  service_reference =
    hash.key?('ServiceReference') ? hash['ServiceReference'] : SKIP
  if hash['DeliveryAddressUpdateReferences']
    delivery_address_update_references = DeliveryAddressUpdateReferences2.from_hash(hash['DeliveryAddressUpdateReferences'])
  end
  error = ErrorStatus.from_hash(hash['Error']) if hash['Error']

  # Create object from extracted values.
  DeliveryAddressUpdateResponse.new(request_id,
                                    service_reference,
                                    delivery_address_update_references,
                                    error)
end

.namesObject

A mapping from model property names to API property names.



29
30
31
32
33
34
35
36
37
# File 'lib/shell_card_management_ap_is/models/delivery_address_update_response.rb', line 29

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['request_id'] = 'RequestId'
  @_hash['service_reference'] = 'ServiceReference'
  @_hash['delivery_address_update_references'] =
    'DeliveryAddressUpdateReferences'
  @_hash['error'] = 'Error'
  @_hash
end

.nullablesObject

An array for nullable fields



50
51
52
# File 'lib/shell_card_management_ap_is/models/delivery_address_update_response.rb', line 50

def self.nullables
  []
end

.optionalsObject

An array for optional fields



40
41
42
43
44
45
46
47
# File 'lib/shell_card_management_ap_is/models/delivery_address_update_response.rb', line 40

def self.optionals
  %w[
    request_id
    service_reference
    delivery_address_update_references
    error
  ]
end