Class: ShellCardManagementApIs::SubmittedCard
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- ShellCardManagementApIs::SubmittedCard
- Defined in:
- lib/shell_card_management_ap_is/models/submitted_card.rb
Overview
Response entity object for SubmittedCard list <br/>Note: This list will be empty for status 9006 and 9012 i.e., request for all the cards failed.
Instance Attribute Summary collapse
-
#account_id ⇒ Integer
Account Id of the customer.<br /> Optional if AccountNumber is passed, else Mandatory.
-
#account_number ⇒ String
Account Number of the customer.<br /> Optional if AccountId is passed, else Mandatory.
-
#card_expiry_date ⇒ String
Expiry date of the card.<br /> Mandatory if PAN is passed, else optional.<br /> Format: yyyyMMdd.
-
#card_id ⇒ Integer
Card Id of the card.<br /> Optional if PAN is passed, else Mandatory.
-
#col_co_code ⇒ Integer
Collecting company code of the customer.
-
#col_co_id ⇒ Integer
Collecting company id of the customer.
-
#masked_pan ⇒ String
Card PAN.
-
#pan ⇒ String
PAN of the card.<br /> Optional if CardId is passed, else Mandatory.<br />.
-
#panid ⇒ Float
PANID of the card.
-
#payer_id ⇒ Integer
Payer id of the customer.<br /> Optional if PayerNumber is passed, else Mandatory.
-
#payer_number ⇒ String
PayerNumber of the customer.<br /> Optional if PayerId is passed, else Mandatory.
-
#replacement_card_reference ⇒ Integer
Reference number for tracking of replacement card order request of the specific card,<br /> This is applicable for requests with target status as Block and OrderReplacement passed as True.
-
#update_card_reference ⇒ Integer
Reference number for tracking of update status request of the specific card,.
Class Method Summary collapse
-
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
-
.names ⇒ Object
A mapping from model property names to API property names.
-
.nullables ⇒ Object
An array for nullable fields.
-
.optionals ⇒ Object
An array for optional fields.
Instance Method Summary collapse
-
#initialize(replacement_card_reference = SKIP, update_card_reference = SKIP, account_id = SKIP, account_number = SKIP, card_expiry_date = SKIP, card_id = SKIP, col_co_code = SKIP, col_co_id = SKIP, pan = SKIP, panid = SKIP, masked_pan = SKIP, payer_id = SKIP, payer_number = SKIP) ⇒ SubmittedCard
constructor
A new instance of SubmittedCard.
Methods inherited from BaseModel
Constructor Details
#initialize(replacement_card_reference = SKIP, update_card_reference = SKIP, account_id = SKIP, account_number = SKIP, card_expiry_date = SKIP, card_id = SKIP, col_co_code = SKIP, col_co_id = SKIP, pan = SKIP, panid = SKIP, masked_pan = SKIP, payer_id = SKIP, payer_number = SKIP) ⇒ SubmittedCard
Returns a new instance of SubmittedCard.
136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 |
# File 'lib/shell_card_management_ap_is/models/submitted_card.rb', line 136 def initialize(replacement_card_reference = SKIP, update_card_reference = SKIP, account_id = SKIP, account_number = SKIP, card_expiry_date = SKIP, card_id = SKIP, col_co_code = SKIP, col_co_id = SKIP, pan = SKIP, panid = SKIP, masked_pan = SKIP, payer_id = SKIP, payer_number = SKIP) unless replacement_card_reference == SKIP @replacement_card_reference = replacement_card_reference end @update_card_reference = update_card_reference unless update_card_reference == SKIP @account_id = account_id unless account_id == SKIP @account_number = account_number unless account_number == SKIP @card_expiry_date = card_expiry_date unless card_expiry_date == SKIP @card_id = card_id unless card_id == SKIP @col_co_code = col_co_code unless col_co_code == SKIP @col_co_id = col_co_id unless col_co_id == SKIP @pan = pan unless pan == SKIP @panid = panid unless panid == SKIP @masked_pan = masked_pan unless masked_pan == SKIP @payer_id = payer_id unless payer_id == SKIP @payer_number = payer_number unless payer_number == SKIP end |
Instance Attribute Details
#account_id ⇒ Integer
Account Id of the customer.<br /> Optional if AccountNumber is passed, else Mandatory.
28 29 30 |
# File 'lib/shell_card_management_ap_is/models/submitted_card.rb', line 28 def account_id @account_id end |
#account_number ⇒ String
Account Number of the customer.<br /> Optional if AccountId is passed, else Mandatory.
33 34 35 |
# File 'lib/shell_card_management_ap_is/models/submitted_card.rb', line 33 def account_number @account_number end |
#card_expiry_date ⇒ String
Expiry date of the card.<br /> Mandatory if PAN is passed, else optional.<br /> Format: yyyyMMdd
39 40 41 |
# File 'lib/shell_card_management_ap_is/models/submitted_card.rb', line 39 def card_expiry_date @card_expiry_date end |
#card_id ⇒ Integer
Card Id of the card.<br /> Optional if PAN is passed, else Mandatory.
44 45 46 |
# File 'lib/shell_card_management_ap_is/models/submitted_card.rb', line 44 def card_id @card_id end |
#col_co_code ⇒ Integer
Collecting company code of the customer. <br /> Optional if ColCoId is passed, else Mandatory.<br />
49 50 51 |
# File 'lib/shell_card_management_ap_is/models/submitted_card.rb', line 49 def col_co_code @col_co_code end |
#col_co_id ⇒ Integer
Collecting company id of the customer. <br /> Optional if ColCoCode is passed, else Mandatory.<br />
54 55 56 |
# File 'lib/shell_card_management_ap_is/models/submitted_card.rb', line 54 def col_co_id @col_co_id end |
#masked_pan ⇒ String
Card PAN
67 68 69 |
# File 'lib/shell_card_management_ap_is/models/submitted_card.rb', line 67 def masked_pan @masked_pan end |
#pan ⇒ String
PAN of the card.<br /> Optional if CardId is passed, else Mandatory.<br />
59 60 61 |
# File 'lib/shell_card_management_ap_is/models/submitted_card.rb', line 59 def pan @pan end |
#panid ⇒ Float
PANID of the card
63 64 65 |
# File 'lib/shell_card_management_ap_is/models/submitted_card.rb', line 63 def panid @panid end |
#payer_id ⇒ Integer
Payer id of the customer.<br /> Optional if PayerNumber is passed, else Mandatory.
72 73 74 |
# File 'lib/shell_card_management_ap_is/models/submitted_card.rb', line 72 def payer_id @payer_id end |
#payer_number ⇒ String
PayerNumber of the customer.<br /> Optional if PayerId is passed, else Mandatory.
77 78 79 |
# File 'lib/shell_card_management_ap_is/models/submitted_card.rb', line 77 def payer_number @payer_number end |
#replacement_card_reference ⇒ Integer
Reference number for tracking of replacement card order request of the specific card,<br /> This is applicable for requests with target status as Block and OrderReplacement passed as True.
18 19 20 |
# File 'lib/shell_card_management_ap_is/models/submitted_card.rb', line 18 def replacement_card_reference @replacement_card_reference end |
#update_card_reference ⇒ Integer
Reference number for tracking of update status request of the specific card,
23 24 25 |
# File 'lib/shell_card_management_ap_is/models/submitted_card.rb', line 23 def update_card_reference @update_card_reference end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 |
# File 'lib/shell_card_management_ap_is/models/submitted_card.rb', line 161 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. replacement_card_reference = hash.key?('ReplacementCardReference') ? hash['ReplacementCardReference'] : SKIP update_card_reference = hash.key?('UpdateCardReference') ? hash['UpdateCardReference'] : SKIP account_id = hash.key?('AccountId') ? hash['AccountId'] : SKIP account_number = hash.key?('AccountNumber') ? hash['AccountNumber'] : SKIP card_expiry_date = hash.key?('CardExpiryDate') ? hash['CardExpiryDate'] : SKIP card_id = hash.key?('CardId') ? hash['CardId'] : SKIP col_co_code = hash.key?('ColCoCode') ? hash['ColCoCode'] : SKIP col_co_id = hash.key?('ColCoId') ? hash['ColCoId'] : SKIP pan = hash.key?('PAN') ? hash['PAN'] : SKIP panid = hash.key?('PANID') ? hash['PANID'] : SKIP masked_pan = hash.key?('MaskedPAN') ? hash['MaskedPAN'] : SKIP payer_id = hash.key?('PayerId') ? hash['PayerId'] : SKIP payer_number = hash.key?('PayerNumber') ? hash['PayerNumber'] : SKIP # Create object from extracted values. SubmittedCard.new(replacement_card_reference, update_card_reference, account_id, account_number, card_expiry_date, card_id, col_co_code, col_co_id, pan, panid, masked_pan, payer_id, payer_number) end |
.names ⇒ Object
A mapping from model property names to API property names.
80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 |
# File 'lib/shell_card_management_ap_is/models/submitted_card.rb', line 80 def self.names @_hash = {} if @_hash.nil? @_hash['replacement_card_reference'] = 'ReplacementCardReference' @_hash['update_card_reference'] = 'UpdateCardReference' @_hash['account_id'] = 'AccountId' @_hash['account_number'] = 'AccountNumber' @_hash['card_expiry_date'] = 'CardExpiryDate' @_hash['card_id'] = 'CardId' @_hash['col_co_code'] = 'ColCoCode' @_hash['col_co_id'] = 'ColCoId' @_hash['pan'] = 'PAN' @_hash['panid'] = 'PANID' @_hash['masked_pan'] = 'MaskedPAN' @_hash['payer_id'] = 'PayerId' @_hash['payer_number'] = 'PayerNumber' @_hash end |
.nullables ⇒ Object
An array for nullable fields
118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 |
# File 'lib/shell_card_management_ap_is/models/submitted_card.rb', line 118 def self.nullables %w[ replacement_card_reference update_card_reference account_id account_number card_expiry_date card_id col_co_code col_co_id pan panid masked_pan payer_id payer_number ] end |
.optionals ⇒ Object
An array for optional fields
99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 |
# File 'lib/shell_card_management_ap_is/models/submitted_card.rb', line 99 def self.optionals %w[ replacement_card_reference update_card_reference account_id account_number card_expiry_date card_id col_co_code col_co_id pan panid masked_pan payer_id payer_number ] end |