Class: ShellCardManagementApIs::PINDeliveryDetails
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- ShellCardManagementApIs::PINDeliveryDetails
- Defined in:
- lib/shell_card_management_ap_is/models/pin_delivery_details.rb
Overview
PINDeliverDetails entity. The fields of this entity are described below. This is mandatory if PINContactType is 4 else optional and ignored.
Instance Attribute Summary collapse
-
#address_line ⇒ String
Address Lines Max Length: 1024.
-
#city ⇒ String
City Max Length: 40.
-
#company_name ⇒ String
Company Name for PIN delivery.
-
#contact_name ⇒ String
Contact Name Max Length: 50.
-
#contact_title ⇒ String
Contact Title Max Length: 50.
-
#country_id ⇒ Integer
Country.
-
#email_address ⇒ String
Cardholder email address for PIN delivery Max Length : 90 Example: [email protected] <br/>Note:Based on the international standard that there can be Max Length 64 before the @ (the ‘Local part’) =64(minimum of 1) Max Lenth after the (the domain) = 88 (Minimum of 2).
-
#phone_number ⇒ String
Cardholder phone number for PIN delivery.
-
#region_id ⇒ Integer
Region.
-
#save_pin_reminder ⇒ TrueClass | FalseClass
Save PIN Reminder If SavePINReminder is true, the contact address will be saved database for PIN reminder.
-
#zip_code ⇒ String
Zip Code Max Length: 10.
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(company_name = nil, address_line = nil, zip_code = nil, city = nil, contact_name = SKIP, contact_title = SKIP, region_id = SKIP, country_id = SKIP, phone_number = SKIP, email_address = SKIP, save_pin_reminder = SKIP) ⇒ PINDeliveryDetails
constructor
A new instance of PINDeliveryDetails.
Methods inherited from BaseModel
Constructor Details
#initialize(company_name = nil, address_line = nil, zip_code = nil, city = nil, contact_name = SKIP, contact_title = SKIP, region_id = SKIP, country_id = SKIP, phone_number = SKIP, email_address = SKIP, save_pin_reminder = SKIP) ⇒ PINDeliveryDetails
Returns a new instance of PINDeliveryDetails.
113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 |
# File 'lib/shell_card_management_ap_is/models/pin_delivery_details.rb', line 113 def initialize(company_name = nil, address_line = nil, zip_code = nil, city = nil, contact_name = SKIP, contact_title = SKIP, region_id = SKIP, country_id = SKIP, phone_number = SKIP, email_address = SKIP, save_pin_reminder = SKIP) @contact_name = contact_name unless contact_name == SKIP @contact_title = contact_title unless contact_title == SKIP @company_name = company_name @address_line = address_line @zip_code = zip_code @city = city @region_id = region_id unless region_id == SKIP @country_id = country_id unless country_id == SKIP @phone_number = phone_number unless phone_number == SKIP @email_address = email_address unless email_address == SKIP @save_pin_reminder = save_pin_reminder unless save_pin_reminder == SKIP end |
Instance Attribute Details
#address_line ⇒ String
Address Lines Max Length: 1024
31 32 33 |
# File 'lib/shell_card_management_ap_is/models/pin_delivery_details.rb', line 31 def address_line @address_line end |
#city ⇒ String
City Max Length: 40
41 42 43 |
# File 'lib/shell_card_management_ap_is/models/pin_delivery_details.rb', line 41 def city @city end |
#company_name ⇒ String
Company Name for PIN delivery. Max Length: 50
26 27 28 |
# File 'lib/shell_card_management_ap_is/models/pin_delivery_details.rb', line 26 def company_name @company_name end |
#contact_name ⇒ String
Contact Name Max Length: 50
16 17 18 |
# File 'lib/shell_card_management_ap_is/models/pin_delivery_details.rb', line 16 def contact_name @contact_name end |
#contact_title ⇒ String
Contact Title Max Length: 50
21 22 23 |
# File 'lib/shell_card_management_ap_is/models/pin_delivery_details.rb', line 21 def contact_title @contact_title end |
#country_id ⇒ Integer
Country
49 50 51 |
# File 'lib/shell_card_management_ap_is/models/pin_delivery_details.rb', line 49 def country_id @country_id end |
#email_address ⇒ String
Cardholder email address for PIN delivery Max Length : 90 Example: [email protected] <br/>Note:Based on the international standard that there can be Max Length 64 before the @ (the ‘Local part’)
64(minimum of 1) Max Lenth after the (the domain) = 88 (Minimum of 2)
61 62 63 |
# File 'lib/shell_card_management_ap_is/models/pin_delivery_details.rb', line 61 def email_address @email_address end |
#phone_number ⇒ String
Cardholder phone number for PIN delivery.
53 54 55 |
# File 'lib/shell_card_management_ap_is/models/pin_delivery_details.rb', line 53 def phone_number @phone_number end |
#region_id ⇒ Integer
Region
45 46 47 |
# File 'lib/shell_card_management_ap_is/models/pin_delivery_details.rb', line 45 def region_id @region_id end |
#save_pin_reminder ⇒ TrueClass | FalseClass
Save PIN Reminder If SavePINReminder is true, the contact address will be saved database for PIN reminder.
<br/>Only allowed for PIN Advice paper delivery.
68 69 70 |
# File 'lib/shell_card_management_ap_is/models/pin_delivery_details.rb', line 68 def save_pin_reminder @save_pin_reminder end |
#zip_code ⇒ String
Zip Code Max Length: 10
36 37 38 |
# File 'lib/shell_card_management_ap_is/models/pin_delivery_details.rb', line 36 def zip_code @zip_code end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 |
# File 'lib/shell_card_management_ap_is/models/pin_delivery_details.rb', line 131 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. company_name = hash.key?('CompanyName') ? hash['CompanyName'] : nil address_line = hash.key?('AddressLine') ? hash['AddressLine'] : nil zip_code = hash.key?('ZipCode') ? hash['ZipCode'] : nil city = hash.key?('City') ? hash['City'] : nil contact_name = hash.key?('ContactName') ? hash['ContactName'] : SKIP contact_title = hash.key?('ContactTitle') ? hash['ContactTitle'] : SKIP region_id = hash.key?('RegionID') ? hash['RegionID'] : SKIP country_id = hash.key?('CountryID') ? hash['CountryID'] : SKIP phone_number = hash.key?('PhoneNumber') ? hash['PhoneNumber'] : SKIP email_address = hash.key?('EmailAddress') ? hash['EmailAddress'] : SKIP save_pin_reminder = hash.key?('SavePINReminder') ? hash['SavePINReminder'] : SKIP # Create object from extracted values. PINDeliveryDetails.new(company_name, address_line, zip_code, city, contact_name, contact_title, region_id, country_id, phone_number, email_address, save_pin_reminder) end |
.names ⇒ Object
A mapping from model property names to API property names.
71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 |
# File 'lib/shell_card_management_ap_is/models/pin_delivery_details.rb', line 71 def self.names @_hash = {} if @_hash.nil? @_hash['contact_name'] = 'ContactName' @_hash['contact_title'] = 'ContactTitle' @_hash['company_name'] = 'CompanyName' @_hash['address_line'] = 'AddressLine' @_hash['zip_code'] = 'ZipCode' @_hash['city'] = 'City' @_hash['region_id'] = 'RegionID' @_hash['country_id'] = 'CountryID' @_hash['phone_number'] = 'PhoneNumber' @_hash['email_address'] = 'EmailAddress' @_hash['save_pin_reminder'] = 'SavePINReminder' @_hash end |
.nullables ⇒ Object
An array for nullable fields
101 102 103 104 105 106 107 108 109 110 111 |
# File 'lib/shell_card_management_ap_is/models/pin_delivery_details.rb', line 101 def self.nullables %w[ contact_name contact_title zip_code region_id country_id phone_number email_address ] end |
.optionals ⇒ Object
An array for optional fields
88 89 90 91 92 93 94 95 96 97 98 |
# File 'lib/shell_card_management_ap_is/models/pin_delivery_details.rb', line 88 def self.optionals %w[ contact_name contact_title region_id country_id phone_number email_address save_pin_reminder ] end |