Class: ShellCardManagementApIs::DeliveryAddressUpdateReferences

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

Overview

List of Delivery address update entity. The fields of this entity are described below.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from BaseModel

#to_hash, #to_json

Constructor Details

#initialize(card_id = SKIP, card_pan = SKIP, account_id = SKIP, account_number = SKIP, reference_id = SKIP, error_info = SKIP) ⇒ DeliveryAddressUpdateReferences

Returns a new instance of DeliveryAddressUpdateReferences.



67
68
69
70
71
72
73
74
75
76
# File 'lib/shell_card_management_ap_is/models/delivery_address_update_references.rb', line 67

def initialize(card_id = SKIP, card_pan = SKIP,  = SKIP,
                = SKIP, reference_id = SKIP,
               error_info = SKIP)
  @card_id = card_id unless card_id == SKIP
  @card_pan = card_pan unless card_pan == SKIP
  @account_id =  unless  == SKIP
  @account_number =  unless  == SKIP
  @reference_id = reference_id unless reference_id == SKIP
  @error_info = error_info unless error_info == SKIP
end

Instance Attribute Details

#account_idInteger

AccountId

Returns:

  • (Integer)


23
24
25
# File 'lib/shell_card_management_ap_is/models/delivery_address_update_references.rb', line 23

def 
  @account_id
end

#account_numberString

Account number

Returns:

  • (String)


27
28
29
# File 'lib/shell_card_management_ap_is/models/delivery_address_update_references.rb', line 27

def 
  @account_number
end

#card_idInteger

CardId

Returns:

  • (Integer)


15
16
17
# File 'lib/shell_card_management_ap_is/models/delivery_address_update_references.rb', line 15

def card_id
  @card_id
end

#card_panString

PAN of the card.

Returns:

  • (String)


19
20
21
# File 'lib/shell_card_management_ap_is/models/delivery_address_update_references.rb', line 19

def card_pan
  @card_pan
end

#error_infoString

Individual error information for the delivery address update request.

Returns:

  • (String)


36
37
38
# File 'lib/shell_card_management_ap_is/models/delivery_address_update_references.rb', line 36

def error_info
  @error_info
end

#reference_idInteger

Individual delivery address update reference number for the delivery address update request.

Returns:

  • (Integer)


32
33
34
# File 'lib/shell_card_management_ap_is/models/delivery_address_update_references.rb', line 32

def reference_id
  @reference_id
end

Class Method Details

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
# File 'lib/shell_card_management_ap_is/models/delivery_address_update_references.rb', line 79

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
  card_id = hash.key?('CardId') ? hash['CardId'] : SKIP
  card_pan = hash.key?('CardPAN') ? hash['CardPAN'] : SKIP
   = hash.key?('AccountId') ? hash['AccountId'] : SKIP
   = hash.key?('AccountNumber') ? hash['AccountNumber'] : SKIP
  reference_id = hash.key?('ReferenceId') ? hash['ReferenceId'] : SKIP
  error_info = hash.key?('ErrorInfo') ? hash['ErrorInfo'] : SKIP

  # Create object from extracted values.
  DeliveryAddressUpdateReferences.new(card_id,
                                      card_pan,
                                      ,
                                      ,
                                      reference_id,
                                      error_info)
end

.namesObject

A mapping from model property names to API property names.



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

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['card_id'] = 'CardId'
  @_hash['card_pan'] = 'CardPAN'
  @_hash['account_id'] = 'AccountId'
  @_hash['account_number'] = 'AccountNumber'
  @_hash['reference_id'] = 'ReferenceId'
  @_hash['error_info'] = 'ErrorInfo'
  @_hash
end

.nullablesObject

An array for nullable fields



63
64
65
# File 'lib/shell_card_management_ap_is/models/delivery_address_update_references.rb', line 63

def self.nullables
  []
end

.optionalsObject

An array for optional fields



51
52
53
54
55
56
57
58
59
60
# File 'lib/shell_card_management_ap_is/models/delivery_address_update_references.rb', line 51

def self.optionals
  %w[
    card_id
    card_pan
    account_id
    account_number
    reference_id
    error_info
  ]
end