Class: ShellCardManagementApIs::AutoRenewCardResponseDataItems

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

Overview

AutoRenewCardResponseDataItems Model.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from BaseModel

#to_hash, #to_json

Constructor Details

#initialize(auto_renew_reference_id = SKIP, card_id_and_pan = SKIP, panid = SKIP) ⇒ AutoRenewCardResponseDataItems

Returns a new instance of AutoRenewCardResponseDataItems.



51
52
53
54
55
56
# File 'lib/shell_card_management_ap_is/models/auto_renew_card_response_data_items.rb', line 51

def initialize(auto_renew_reference_id = SKIP, card_id_and_pan = SKIP,
               panid = SKIP)
  @auto_renew_reference_id = auto_renew_reference_id unless auto_renew_reference_id == SKIP
  @card_id_and_pan = card_id_and_pan unless card_id_and_pan == SKIP
  @panid = panid unless panid == SKIP
end

Instance Attribute Details

#auto_renew_reference_idInteger

CardId and PAN of the card. ;( Semicolon is used as delimiter.

Returns:

  • (Integer)


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

def auto_renew_reference_id
  @auto_renew_reference_id
end

#card_id_and_panString

Reference number for each individual auto renew card in the order.

Returns:

  • (String)


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

def card_id_and_pan
  @card_id_and_pan
end

#panidFloat

PANID of the card

Returns:

  • (Float)


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

def panid
  @panid
end

Class Method Details

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



59
60
61
62
63
64
65
66
67
68
69
70
71
72
# File 'lib/shell_card_management_ap_is/models/auto_renew_card_response_data_items.rb', line 59

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
  auto_renew_reference_id =
    hash.key?('AutoRenewReferenceId') ? hash['AutoRenewReferenceId'] : SKIP
  card_id_and_pan = hash.key?('CardIdAndPAN') ? hash['CardIdAndPAN'] : SKIP
  panid = hash.key?('PANID') ? hash['PANID'] : SKIP

  # Create object from extracted values.
  AutoRenewCardResponseDataItems.new(auto_renew_reference_id,
                                     card_id_and_pan,
                                     panid)
end

.namesObject

A mapping from model property names to API property names.



25
26
27
28
29
30
31
# File 'lib/shell_card_management_ap_is/models/auto_renew_card_response_data_items.rb', line 25

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['auto_renew_reference_id'] = 'AutoRenewReferenceId'
  @_hash['card_id_and_pan'] = 'CardIdAndPAN'
  @_hash['panid'] = 'PANID'
  @_hash
end

.nullablesObject

An array for nullable fields



43
44
45
46
47
48
49
# File 'lib/shell_card_management_ap_is/models/auto_renew_card_response_data_items.rb', line 43

def self.nullables
  %w[
    auto_renew_reference_id
    card_id_and_pan
    panid
  ]
end

.optionalsObject

An array for optional fields



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

def self.optionals
  %w[
    auto_renew_reference_id
    card_id_and_pan
    panid
  ]
end