Class: ShellCardManagementApIs::SubmittedMoveCard

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

Overview

SubmittedMoveCard 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(account_id = SKIP, account_number = SKIP, card_id = SKIP, pan = SKIP, move_card_reference = SKIP) ⇒ SubmittedMoveCard

Returns a new instance of SubmittedMoveCard.



60
61
62
63
64
65
66
67
# File 'lib/shell_card_management_ap_is/models/submitted_move_card.rb', line 60

def initialize( = SKIP,  = SKIP, card_id = SKIP,
               pan = SKIP, move_card_reference = SKIP)
  @account_id =  unless  == SKIP
  @account_number =  unless  == SKIP
  @card_id = card_id unless card_id == SKIP
  @pan = pan unless pan == SKIP
  @move_card_reference = move_card_reference unless move_card_reference == SKIP
end

Instance Attribute Details

#account_idString

TODO: Write general description for this method

Returns:

  • (String)


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

def 
  @account_id
end

#account_numberString

TODO: Write general description for this method

Returns:

  • (String)


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

def 
  @account_number
end

#card_idString

Card Id of the card.

Returns:

  • (String)


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

def card_id
  @card_id
end

#move_card_referenceString

Reference number for tracking of update status request of the specific card,

Returns:

  • (String)


31
32
33
# File 'lib/shell_card_management_ap_is/models/submitted_move_card.rb', line 31

def move_card_reference
  @move_card_reference
end

#panString

PAN of the card

Returns:

  • (String)


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

def pan
  @pan
end

Class Method Details

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
# File 'lib/shell_card_management_ap_is/models/submitted_move_card.rb', line 70

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
   = hash.key?('AccountId') ? hash['AccountId'] : SKIP
   = hash.key?('AccountNumber') ? hash['AccountNumber'] : SKIP
  card_id = hash.key?('CardId') ? hash['CardId'] : SKIP
  pan = hash.key?('PAN') ? hash['PAN'] : SKIP
  move_card_reference =
    hash.key?('MoveCardReference') ? hash['MoveCardReference'] : SKIP

  # Create object from extracted values.
  SubmittedMoveCard.new(,
                        ,
                        card_id,
                        pan,
                        move_card_reference)
end

.namesObject

A mapping from model property names to API property names.



34
35
36
37
38
39
40
41
42
# File 'lib/shell_card_management_ap_is/models/submitted_move_card.rb', line 34

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['account_id'] = 'AccountId'
  @_hash['account_number'] = 'AccountNumber'
  @_hash['card_id'] = 'CardId'
  @_hash['pan'] = 'PAN'
  @_hash['move_card_reference'] = 'MoveCardReference'
  @_hash
end

.nullablesObject

An array for nullable fields



56
57
58
# File 'lib/shell_card_management_ap_is/models/submitted_move_card.rb', line 56

def self.nullables
  []
end

.optionalsObject

An array for optional fields



45
46
47
48
49
50
51
52
53
# File 'lib/shell_card_management_ap_is/models/submitted_move_card.rb', line 45

def self.optionals
  %w[
    account_id
    account_number
    card_id
    pan
    move_card_reference
  ]
end

Instance Method Details

#inspectObject

Provides a debugging-friendly string with detailed object information.



97
98
99
100
101
102
# File 'lib/shell_card_management_ap_is/models/submitted_move_card.rb', line 97

def inspect
  class_name = self.class.name.split('::').last
  "<#{class_name} account_id: #{@account_id.inspect}, account_number:"\
  " #{@account_number.inspect}, card_id: #{@card_id.inspect}, pan: #{@pan.inspect},"\
  " move_card_reference: #{@move_card_reference.inspect}>"
end

#to_sObject

Provides a human-readable string representation of the object.



90
91
92
93
94
# File 'lib/shell_card_management_ap_is/models/submitted_move_card.rb', line 90

def to_s
  class_name = self.class.name.split('::').last
  "<#{class_name} account_id: #{@account_id}, account_number: #{@account_number}, card_id:"\
  " #{@card_id}, pan: #{@pan}, move_card_reference: #{@move_card_reference}>"
end