Class: ShellCardManagementApIs::CreateCardGroupResponseSuccessfulRequestsItems

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

Overview

CreateCardGroupResponseSuccessfulRequestsItems Model.

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, pan = SKIP, reference = SKIP) ⇒ CreateCardGroupResponseSuccessfulRequestsItems

Returns a new instance of CreateCardGroupResponseSuccessfulRequestsItems.



48
49
50
51
52
# File 'lib/shell_card_management_ap_is/models/create_card_group_response_successful_requests_items.rb', line 48

def initialize(card_id = SKIP, pan = SKIP, reference = SKIP)
  @card_id = card_id unless card_id == SKIP
  @pan = pan unless pan == SKIP
  @reference = reference unless reference == SKIP
end

Instance Attribute Details

#card_idInteger

Card Id of the card.

Returns:

  • (Integer)


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

def card_id
  @card_id
end

#panString

PAN of the card.

Returns:

  • (String)


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

def pan
  @pan
end

#referenceInteger

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

Returns:

  • (Integer)


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

def reference
  @reference
end

Class Method Details

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



55
56
57
58
59
60
61
62
63
64
65
66
67
# File 'lib/shell_card_management_ap_is/models/create_card_group_response_successful_requests_items.rb', line 55

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
  card_id = hash.key?('CardId') ? hash['CardId'] : SKIP
  pan = hash.key?('PAN') ? hash['PAN'] : SKIP
  reference = hash.key?('Reference') ? hash['Reference'] : SKIP

  # Create object from extracted values.
  CreateCardGroupResponseSuccessfulRequestsItems.new(card_id,
                                                     pan,
                                                     reference)
end

.namesObject

A mapping from model property names to API property names.



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

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['card_id'] = 'CardId'
  @_hash['pan'] = 'PAN'
  @_hash['reference'] = 'Reference'
  @_hash
end

.nullablesObject

An array for nullable fields



44
45
46
# File 'lib/shell_card_management_ap_is/models/create_card_group_response_successful_requests_items.rb', line 44

def self.nullables
  []
end

.optionalsObject

An array for optional fields



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

def self.optionals
  %w[
    card_id
    pan
    reference
  ]
end