Class: ShellCardManagementApIs::CustomerDetailResponse
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- ShellCardManagementApIs::CustomerDetailResponse
- Defined in:
- lib/shell_card_management_ap_is/models/customer_detail_response.rb
Overview
CustomerDetailResponse Model.
Instance Attribute Summary collapse
-
#account_id ⇒ Integer
Account Id of the selected account.
-
#account_name ⇒ String
Account Name of the selected account.
-
#account_number ⇒ String
Account Number of the selected account.
-
#account_short_name ⇒ String
Short name of the customer.
-
#account_trading_name ⇒ String
Trading name of the customer.
-
#allow_fleet_id_input ⇒ TrueClass | FalseClass
True/False.
-
#band ⇒ String
Band Id and Description of the Payer in Card Platform e.g.
-
#billing_address ⇒ Address
Band Id and Description of the Payer in Card Platform e.g.
-
#card_group_position ⇒ String
Card group position at – • Payer – Payer level • Account – Account level.
-
#correspondence_address ⇒ Address
Card group position at – • Payer – Payer level • Account – Account level.
-
#default_pin_advice_type ⇒ Integer
Default PIN AdviceType of the customer.
-
#delivery_addresses ⇒ Array[DeliveryAddresses]
Card group position at – • Payer – Payer level • Account – Account level.
-
#error ⇒ ErrorStatus
Default PIN AdviceType of the customer.
-
#fleet_pin ⇒ TrueClass | FalseClass
Is Fleet Pin optional enabled for the selected account.
-
#full_name ⇒ String
Full Name of the customer.
-
#invoice_customer_id ⇒ Integer
Customer Id of the Invoice Point of the account.
-
#invoice_customer_short_name ⇒ String
Short Name of the Invoice Point of the account.
-
#is_invoice_point ⇒ TrueClass | FalseClass
Whether the account is an invoice point.
-
#marketing_segmentation ⇒ String
Marketing Segmentation id and description e.g.
-
#payer_id ⇒ Integer
Payer Id of the selected account.
-
#payer_name ⇒ String
Payer Name of the selected account.
-
#payer_number ⇒ String
Payer Number of the selected account.
-
#pin_advice_types ⇒ Array[PINAdviceTypes]
Default PIN AdviceType of the customer.
-
#pin_change_allowed_by_cardholder ⇒ TrueClass | FalseClass
PIN change allowed for card holder or not.
-
#pin_change_allowed_from_fleet_pin ⇒ TrueClass | FalseClass
PIN change allowed from fleetpin or not.
-
#request_id ⇒ String
API Request id.
-
#self_selected_pin ⇒ TrueClass | FalseClass
Is Self-selected Pin enabled for the account.
-
#status ⇒ String
Payer current status id and description e.g.
-
#vat_number ⇒ String
VAT Registration Number of Customer.
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
Methods inherited from BaseModel
Constructor Details
#initialize(account_id = SKIP, account_name = SKIP, account_number = SKIP, account_short_name = SKIP, account_trading_name = SKIP, allow_fleet_id_input = SKIP, band = SKIP, billing_address = SKIP, card_group_position = SKIP, correspondence_address = SKIP, delivery_addresses = SKIP, fleet_pin = SKIP, full_name = SKIP, invoice_customer_id = SKIP, invoice_customer_short_name = SKIP, is_invoice_point = SKIP, marketing_segmentation = SKIP, vat_number = SKIP, payer_id = SKIP, payer_name = SKIP, payer_number = SKIP, self_selected_pin = SKIP, status = SKIP, default_pin_advice_type = SKIP, pin_advice_types = SKIP, error = SKIP, request_id = SKIP, pin_change_allowed_by_cardholder = SKIP, pin_change_allowed_from_fleet_pin = SKIP) ⇒ CustomerDetailResponse
Returns a new instance of CustomerDetailResponse.
270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 |
# File 'lib/shell_card_management_ap_is/models/customer_detail_response.rb', line 270 def initialize(account_id = SKIP, account_name = SKIP, account_number = SKIP, account_short_name = SKIP, account_trading_name = SKIP, allow_fleet_id_input = SKIP, band = SKIP, billing_address = SKIP, card_group_position = SKIP, correspondence_address = SKIP, delivery_addresses = SKIP, fleet_pin = SKIP, full_name = SKIP, invoice_customer_id = SKIP, invoice_customer_short_name = SKIP, is_invoice_point = SKIP, marketing_segmentation = SKIP, vat_number = SKIP, payer_id = SKIP, payer_name = SKIP, payer_number = SKIP, self_selected_pin = SKIP, status = SKIP, default_pin_advice_type = SKIP, pin_advice_types = SKIP, error = SKIP, request_id = SKIP, pin_change_allowed_by_cardholder = SKIP, pin_change_allowed_from_fleet_pin = SKIP) @account_id = account_id unless account_id == SKIP @account_name = account_name unless account_name == SKIP @account_number = account_number unless account_number == SKIP @account_short_name = account_short_name unless account_short_name == SKIP @account_trading_name = account_trading_name unless account_trading_name == SKIP @allow_fleet_id_input = allow_fleet_id_input unless allow_fleet_id_input == SKIP @band = band unless band == SKIP @billing_address = billing_address unless billing_address == SKIP @card_group_position = card_group_position unless card_group_position == SKIP @correspondence_address = correspondence_address unless correspondence_address == SKIP @delivery_addresses = delivery_addresses unless delivery_addresses == SKIP @fleet_pin = fleet_pin unless fleet_pin == SKIP @full_name = full_name unless full_name == SKIP @invoice_customer_id = invoice_customer_id unless invoice_customer_id == SKIP unless invoice_customer_short_name == SKIP @invoice_customer_short_name = invoice_customer_short_name end @is_invoice_point = is_invoice_point unless is_invoice_point == SKIP @marketing_segmentation = marketing_segmentation unless marketing_segmentation == SKIP @vat_number = vat_number unless vat_number == SKIP @payer_id = payer_id unless payer_id == SKIP @payer_name = payer_name unless payer_name == SKIP @payer_number = payer_number unless payer_number == SKIP @self_selected_pin = self_selected_pin unless self_selected_pin == SKIP @status = status unless status == SKIP @default_pin_advice_type = default_pin_advice_type unless default_pin_advice_type == SKIP @pin_advice_types = pin_advice_types unless pin_advice_types == SKIP @error = error unless error == SKIP @request_id = request_id unless request_id == SKIP unless pin_change_allowed_by_cardholder == SKIP @pin_change_allowed_by_cardholder = pin_change_allowed_by_cardholder end unless pin_change_allowed_from_fleet_pin == SKIP @pin_change_allowed_from_fleet_pin = pin_change_allowed_from_fleet_pin end end |
Instance Attribute Details
#account_id ⇒ Integer
Account Id of the selected account.
14 15 16 |
# File 'lib/shell_card_management_ap_is/models/customer_detail_response.rb', line 14 def account_id @account_id end |
#account_name ⇒ String
Account Name of the selected account.
18 19 20 |
# File 'lib/shell_card_management_ap_is/models/customer_detail_response.rb', line 18 def account_name @account_name end |
#account_number ⇒ String
Account Number of the selected account.
22 23 24 |
# File 'lib/shell_card_management_ap_is/models/customer_detail_response.rb', line 22 def account_number @account_number end |
#account_short_name ⇒ String
Short name of the customer.
26 27 28 |
# File 'lib/shell_card_management_ap_is/models/customer_detail_response.rb', line 26 def account_short_name @account_short_name end |
#account_trading_name ⇒ String
Trading name of the customer
30 31 32 |
# File 'lib/shell_card_management_ap_is/models/customer_detail_response.rb', line 30 def account_trading_name @account_trading_name end |
#allow_fleet_id_input ⇒ TrueClass | FalseClass
True/False. When false, users should not be allowed to enable Fleet Id prompt option while ordering cards under this account.
36 37 38 |
# File 'lib/shell_card_management_ap_is/models/customer_detail_response.rb', line 36 def allow_fleet_id_input @allow_fleet_id_input end |
#band ⇒ String
Band Id and Description of the Payer in Card Platform e.g. (Id – Description): 1-Platinum 2-Gold 3-Silver 4-Bronze
45 46 47 |
# File 'lib/shell_card_management_ap_is/models/customer_detail_response.rb', line 45 def band @band end |
#billing_address ⇒ Address
Band Id and Description of the Payer in Card Platform e.g. (Id – Description): 1-Platinum 2-Gold 3-Silver 4-Bronze
54 55 56 |
# File 'lib/shell_card_management_ap_is/models/customer_detail_response.rb', line 54 def billing_address @billing_address end |
#card_group_position ⇒ String
Card group position at – • Payer – Payer level • Account – Account level
60 61 62 |
# File 'lib/shell_card_management_ap_is/models/customer_detail_response.rb', line 60 def card_group_position @card_group_position end |
#correspondence_address ⇒ Address
Card group position at – • Payer – Payer level • Account – Account level
66 67 68 |
# File 'lib/shell_card_management_ap_is/models/customer_detail_response.rb', line 66 def correspondence_address @correspondence_address end |
#default_pin_advice_type ⇒ Integer
Default PIN AdviceType of the customer. Possible Values:
-
Paper
-
Email
-
SMS
-
None
140 141 142 |
# File 'lib/shell_card_management_ap_is/models/customer_detail_response.rb', line 140 def default_pin_advice_type @default_pin_advice_type end |
#delivery_addresses ⇒ Array[DeliveryAddresses]
Card group position at – • Payer – Payer level • Account – Account level
72 73 74 |
# File 'lib/shell_card_management_ap_is/models/customer_detail_response.rb', line 72 def delivery_addresses @delivery_addresses end |
#error ⇒ ErrorStatus
Default PIN AdviceType of the customer. Possible Values:
-
Paper
-
Email
-
SMS
-
None
158 159 160 |
# File 'lib/shell_card_management_ap_is/models/customer_detail_response.rb', line 158 def error @error end |
#fleet_pin ⇒ TrueClass | FalseClass
Is Fleet Pin optional enabled for the selected account
76 77 78 |
# File 'lib/shell_card_management_ap_is/models/customer_detail_response.rb', line 76 def fleet_pin @fleet_pin end |
#full_name ⇒ String
Full Name of the customer
80 81 82 |
# File 'lib/shell_card_management_ap_is/models/customer_detail_response.rb', line 80 def full_name @full_name end |
#invoice_customer_id ⇒ Integer
Customer Id of the Invoice Point of the account
84 85 86 |
# File 'lib/shell_card_management_ap_is/models/customer_detail_response.rb', line 84 def invoice_customer_id @invoice_customer_id end |
#invoice_customer_short_name ⇒ String
Short Name of the Invoice Point of the account
88 89 90 |
# File 'lib/shell_card_management_ap_is/models/customer_detail_response.rb', line 88 def invoice_customer_short_name @invoice_customer_short_name end |
#is_invoice_point ⇒ TrueClass | FalseClass
Whether the account is an invoice point.
92 93 94 |
# File 'lib/shell_card_management_ap_is/models/customer_detail_response.rb', line 92 def is_invoice_point @is_invoice_point end |
#marketing_segmentation ⇒ String
Marketing Segmentation id and description e.g. (Id – Description): 1-National CRT 2-International CRT & IKAs 3-Small Customers 4-National/International Fleet/IKA
101 102 103 |
# File 'lib/shell_card_management_ap_is/models/customer_detail_response.rb', line 101 def marketing_segmentation @marketing_segmentation end |
#payer_id ⇒ Integer
Payer Id of the selected account.
109 110 111 |
# File 'lib/shell_card_management_ap_is/models/customer_detail_response.rb', line 109 def payer_id @payer_id end |
#payer_name ⇒ String
Payer Name of the selected account.
113 114 115 |
# File 'lib/shell_card_management_ap_is/models/customer_detail_response.rb', line 113 def payer_name @payer_name end |
#payer_number ⇒ String
Payer Number of the selected account.
117 118 119 |
# File 'lib/shell_card_management_ap_is/models/customer_detail_response.rb', line 117 def payer_number @payer_number end |
#pin_advice_types ⇒ Array[PINAdviceTypes]
Default PIN AdviceType of the customer. Possible Values:
-
Paper
-
Email
-
SMS
-
None
149 150 151 |
# File 'lib/shell_card_management_ap_is/models/customer_detail_response.rb', line 149 def pin_advice_types @pin_advice_types end |
#pin_change_allowed_by_cardholder ⇒ TrueClass | FalseClass
PIN change allowed for card holder or not.
166 167 168 |
# File 'lib/shell_card_management_ap_is/models/customer_detail_response.rb', line 166 def pin_change_allowed_by_cardholder @pin_change_allowed_by_cardholder end |
#pin_change_allowed_from_fleet_pin ⇒ TrueClass | FalseClass
PIN change allowed from fleetpin or not.
170 171 172 |
# File 'lib/shell_card_management_ap_is/models/customer_detail_response.rb', line 170 def pin_change_allowed_from_fleet_pin @pin_change_allowed_from_fleet_pin end |
#request_id ⇒ String
API Request id
162 163 164 |
# File 'lib/shell_card_management_ap_is/models/customer_detail_response.rb', line 162 def request_id @request_id end |
#self_selected_pin ⇒ TrueClass | FalseClass
Is Self-selected Pin enabled for the account
121 122 123 |
# File 'lib/shell_card_management_ap_is/models/customer_detail_response.rb', line 121 def self_selected_pin @self_selected_pin end |
#status ⇒ String
Payer current status id and description e.g. (Id – Description): 1-Active 2-Requested from UTA 3-Awaiting embossing 4-Manufactured 5-Awaiting despatch
131 132 133 |
# File 'lib/shell_card_management_ap_is/models/customer_detail_response.rb', line 131 def status @status end |
#vat_number ⇒ String
VAT Registration Number of Customer
105 106 107 |
# File 'lib/shell_card_management_ap_is/models/customer_detail_response.rb', line 105 def vat_number @vat_number end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 |
# File 'lib/shell_card_management_ap_is/models/customer_detail_response.rb', line 326 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. account_id = hash.key?('AccountId') ? hash['AccountId'] : SKIP account_name = hash.key?('AccountName') ? hash['AccountName'] : SKIP account_number = hash.key?('AccountNumber') ? hash['AccountNumber'] : SKIP account_short_name = hash.key?('AccountShortName') ? hash['AccountShortName'] : SKIP account_trading_name = hash.key?('AccountTradingName') ? hash['AccountTradingName'] : SKIP allow_fleet_id_input = hash.key?('AllowFleetIdInput') ? hash['AllowFleetIdInput'] : SKIP band = hash.key?('Band') ? hash['Band'] : SKIP billing_address = Address.from_hash(hash['BillingAddress']) if hash['BillingAddress'] card_group_position = hash.key?('CardGroupPosition') ? hash['CardGroupPosition'] : SKIP correspondence_address = Address.from_hash(hash['CorrespondenceAddress']) if hash['CorrespondenceAddress'] # Parameter is an array, so we need to iterate through it delivery_addresses = nil unless hash['DeliveryAddresses'].nil? delivery_addresses = [] hash['DeliveryAddresses'].each do |structure| delivery_addresses << (DeliveryAddresses.from_hash(structure) if structure) end end delivery_addresses = SKIP unless hash.key?('DeliveryAddresses') fleet_pin = hash.key?('FleetPin') ? hash['FleetPin'] : SKIP full_name = hash.key?('FullName') ? hash['FullName'] : SKIP invoice_customer_id = hash.key?('InvoiceCustomerId') ? hash['InvoiceCustomerId'] : SKIP invoice_customer_short_name = hash.key?('InvoiceCustomerShortName') ? hash['InvoiceCustomerShortName'] : SKIP is_invoice_point = hash.key?('IsInvoicePoint') ? hash['IsInvoicePoint'] : SKIP marketing_segmentation = hash.key?('MarketingSegmentation') ? hash['MarketingSegmentation'] : SKIP vat_number = hash.key?('VATNumber') ? hash['VATNumber'] : SKIP payer_id = hash.key?('PayerId') ? hash['PayerId'] : SKIP payer_name = hash.key?('PayerName') ? hash['PayerName'] : SKIP payer_number = hash.key?('PayerNumber') ? hash['PayerNumber'] : SKIP self_selected_pin = hash.key?('SelfSelectedPin') ? hash['SelfSelectedPin'] : SKIP status = hash.key?('Status') ? hash['Status'] : SKIP default_pin_advice_type = hash.key?('DefaultPINAdviceType') ? hash['DefaultPINAdviceType'] : SKIP # Parameter is an array, so we need to iterate through it pin_advice_types = nil unless hash['PINAdviceTypes'].nil? pin_advice_types = [] hash['PINAdviceTypes'].each do |structure| pin_advice_types << (PINAdviceTypes.from_hash(structure) if structure) end end pin_advice_types = SKIP unless hash.key?('PINAdviceTypes') error = ErrorStatus.from_hash(hash['Error']) if hash['Error'] request_id = hash.key?('RequestId') ? hash['RequestId'] : SKIP pin_change_allowed_by_cardholder = hash.key?('PINChangeAllowedByCardholder') ? hash['PINChangeAllowedByCardholder'] : SKIP pin_change_allowed_from_fleet_pin = hash.key?('PINChangeAllowedFromFleetPIN') ? hash['PINChangeAllowedFromFleetPIN'] : SKIP # Create object from extracted values. CustomerDetailResponse.new(account_id, account_name, account_number, account_short_name, account_trading_name, allow_fleet_id_input, band, billing_address, card_group_position, correspondence_address, delivery_addresses, fleet_pin, full_name, invoice_customer_id, invoice_customer_short_name, is_invoice_point, marketing_segmentation, vat_number, payer_id, payer_name, payer_number, self_selected_pin, status, default_pin_advice_type, pin_advice_types, error, request_id, pin_change_allowed_by_cardholder, pin_change_allowed_from_fleet_pin) end |
.names ⇒ Object
A mapping from model property names to API property names.
173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 |
# File 'lib/shell_card_management_ap_is/models/customer_detail_response.rb', line 173 def self.names @_hash = {} if @_hash.nil? @_hash['account_id'] = 'AccountId' @_hash['account_name'] = 'AccountName' @_hash['account_number'] = 'AccountNumber' @_hash['account_short_name'] = 'AccountShortName' @_hash['account_trading_name'] = 'AccountTradingName' @_hash['allow_fleet_id_input'] = 'AllowFleetIdInput' @_hash['band'] = 'Band' @_hash['billing_address'] = 'BillingAddress' @_hash['card_group_position'] = 'CardGroupPosition' @_hash['correspondence_address'] = 'CorrespondenceAddress' @_hash['delivery_addresses'] = 'DeliveryAddresses' @_hash['fleet_pin'] = 'FleetPin' @_hash['full_name'] = 'FullName' @_hash['invoice_customer_id'] = 'InvoiceCustomerId' @_hash['invoice_customer_short_name'] = 'InvoiceCustomerShortName' @_hash['is_invoice_point'] = 'IsInvoicePoint' @_hash['marketing_segmentation'] = 'MarketingSegmentation' @_hash['vat_number'] = 'VATNumber' @_hash['payer_id'] = 'PayerId' @_hash['payer_name'] = 'PayerName' @_hash['payer_number'] = 'PayerNumber' @_hash['self_selected_pin'] = 'SelfSelectedPin' @_hash['status'] = 'Status' @_hash['default_pin_advice_type'] = 'DefaultPINAdviceType' @_hash['pin_advice_types'] = 'PINAdviceTypes' @_hash['error'] = 'Error' @_hash['request_id'] = 'RequestId' @_hash['pin_change_allowed_by_cardholder'] = 'PINChangeAllowedByCardholder' @_hash['pin_change_allowed_from_fleet_pin'] = 'PINChangeAllowedFromFleetPIN' @_hash end |
.nullables ⇒ Object
An array for nullable fields
245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 |
# File 'lib/shell_card_management_ap_is/models/customer_detail_response.rb', line 245 def self.nullables %w[ account_id account_name account_number account_short_name account_trading_name band card_group_position full_name invoice_customer_id invoice_customer_short_name is_invoice_point marketing_segmentation vat_number payer_id payer_name payer_number self_selected_pin status default_pin_advice_type request_id ] end |
.optionals ⇒ Object
An array for optional fields
210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 |
# File 'lib/shell_card_management_ap_is/models/customer_detail_response.rb', line 210 def self.optionals %w[ account_id account_name account_number account_short_name account_trading_name allow_fleet_id_input band billing_address card_group_position correspondence_address delivery_addresses fleet_pin full_name invoice_customer_id invoice_customer_short_name is_invoice_point marketing_segmentation vat_number payer_id payer_name payer_number self_selected_pin status default_pin_advice_type pin_advice_types error request_id pin_change_allowed_by_cardholder pin_change_allowed_from_fleet_pin ] end |