Class: ShellCardManagementApIs::PINDeliveryContact
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- ShellCardManagementApIs::PINDeliveryContact
- Defined in:
- lib/shell_card_management_ap_is/models/pin_delivery_contact.rb
Overview
Request entity object for PINDeliveryContact Mandatory when PINDeliveryAddressType is ‘3’ (New delivery address). Else, ignored.
Instance Attribute Summary collapse
-
#delivery_address_line1 ⇒ String
Address line 1 <br /> Mandatory - if PINAdviceType is paper else optional.<br /> Max field length: 40 <br /> Optional.
-
#delivery_address_line2 ⇒ String
Address line 2 <br /> Optional <br /> Max field length: 40 <br /> Optional.
-
#delivery_address_line3 ⇒ String
Address line 3 <br /> Optional <br /> Max field length: 40 <br /> Optional.
-
#delivery_city ⇒ String
City <br /> Mandatory - If PINAdviceType is paper else optional.
-
#delivery_company_name ⇒ String
Company name <br /> Mandatory - If PINAdviceType is paper else optional.
-
#delivery_contact_name ⇒ String
Name of the contact person <br /> Mandatory - If PINAdviceType is paper else optional.
-
#delivery_contact_title ⇒ String
Title of the contact person <br /> Optional.
-
#delivery_country ⇒ String
The ISO code of the country.<br /> Mandatory if PINAdviceType is paper else optional.
-
#delivery_region ⇒ String
Region <br /> Optional<br />.
-
#delivery_region_id ⇒ Integer
Region Id <br /> Optional.
-
#delivery_zip_code ⇒ String
ZIP code <br /> Mandatory - if PINAdviceType is paper else optional.
-
#email_address ⇒ String
Email address for to send email of the PIN in case PINAdviceType is Email.<br /> Mandatory if PINAdviceType is email else optional.<br /> Max field length: 90.
-
#phone_number ⇒ String
Phone number for to send SMS of the PIN in case PINAdviceType is SMS.<br /> Mandatory if PINAdviceType is SMS else optional.<br /> Max field length: 20.
-
#save_for_pin_reminder ⇒ TrueClass | FalseClass
The given address will be used for sending PIN reminders in future when requested.<br /> Only allowed for paper delivery<br /> Optional.
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(delivery_contact_title = SKIP, delivery_contact_name = SKIP, delivery_company_name = SKIP, delivery_address_line1 = SKIP, delivery_address_line2 = SKIP, delivery_address_line3 = SKIP, delivery_zip_code = SKIP, delivery_city = SKIP, delivery_region_id = SKIP, delivery_region = SKIP, delivery_country = SKIP, phone_number = SKIP, email_address = SKIP, save_for_pin_reminder = SKIP) ⇒ PINDeliveryContact
constructor
A new instance of PINDeliveryContact.
Methods inherited from BaseModel
Constructor Details
#initialize(delivery_contact_title = SKIP, delivery_contact_name = SKIP, delivery_company_name = SKIP, delivery_address_line1 = SKIP, delivery_address_line2 = SKIP, delivery_address_line3 = SKIP, delivery_zip_code = SKIP, delivery_city = SKIP, delivery_region_id = SKIP, delivery_region = SKIP, delivery_country = SKIP, phone_number = SKIP, email_address = SKIP, save_for_pin_reminder = SKIP) ⇒ PINDeliveryContact
Returns a new instance of PINDeliveryContact.
164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 |
# File 'lib/shell_card_management_ap_is/models/pin_delivery_contact.rb', line 164 def initialize(delivery_contact_title = SKIP, delivery_contact_name = SKIP, delivery_company_name = SKIP, delivery_address_line1 = SKIP, delivery_address_line2 = SKIP, delivery_address_line3 = SKIP, delivery_zip_code = SKIP, delivery_city = SKIP, delivery_region_id = SKIP, delivery_region = SKIP, delivery_country = SKIP, phone_number = SKIP, email_address = SKIP, save_for_pin_reminder = SKIP) @delivery_contact_title = delivery_contact_title unless delivery_contact_title == SKIP @delivery_contact_name = delivery_contact_name unless delivery_contact_name == SKIP @delivery_company_name = delivery_company_name unless delivery_company_name == SKIP @delivery_address_line1 = delivery_address_line1 unless delivery_address_line1 == SKIP @delivery_address_line2 = delivery_address_line2 unless delivery_address_line2 == SKIP @delivery_address_line3 = delivery_address_line3 unless delivery_address_line3 == SKIP @delivery_zip_code = delivery_zip_code unless delivery_zip_code == SKIP @delivery_city = delivery_city unless delivery_city == SKIP @delivery_region_id = delivery_region_id unless delivery_region_id == SKIP @delivery_region = delivery_region unless delivery_region == SKIP @delivery_country = delivery_country unless delivery_country == SKIP @phone_number = phone_number unless phone_number == SKIP @email_address = email_address unless email_address == SKIP @save_for_pin_reminder = save_for_pin_reminder unless save_for_pin_reminder == SKIP end |
Instance Attribute Details
#delivery_address_line1 ⇒ String
Address line 1 <br /> Mandatory - if PINAdviceType is paper else optional.<br /> Max field length: 40 <br /> Optional
37 38 39 |
# File 'lib/shell_card_management_ap_is/models/pin_delivery_contact.rb', line 37 def delivery_address_line1 @delivery_address_line1 end |
#delivery_address_line2 ⇒ String
Address line 2 <br /> Optional <br /> Max field length: 40 <br /> Optional
44 45 46 |
# File 'lib/shell_card_management_ap_is/models/pin_delivery_contact.rb', line 44 def delivery_address_line2 @delivery_address_line2 end |
#delivery_address_line3 ⇒ String
Address line 3 <br /> Optional <br /> Max field length: 40 <br /> Optional
51 52 53 |
# File 'lib/shell_card_management_ap_is/models/pin_delivery_contact.rb', line 51 def delivery_address_line3 @delivery_address_line3 end |
#delivery_city ⇒ String
City <br /> Mandatory - If PINAdviceType is paper else optional. <br /> Max field length: 40 <br /> Optional
65 66 67 |
# File 'lib/shell_card_management_ap_is/models/pin_delivery_contact.rb', line 65 def delivery_city @delivery_city end |
#delivery_company_name ⇒ String
Company name <br /> Mandatory - If PINAdviceType is paper else optional. <br /> Max field length: 50 <br /> Optional
30 31 32 |
# File 'lib/shell_card_management_ap_is/models/pin_delivery_contact.rb', line 30 def delivery_company_name @delivery_company_name end |
#delivery_contact_name ⇒ String
Name of the contact person <br /> Mandatory - If PINAdviceType is paper else optional. <br /> Max field length: 50 <br /> Optional
23 24 25 |
# File 'lib/shell_card_management_ap_is/models/pin_delivery_contact.rb', line 23 def delivery_contact_name @delivery_contact_name end |
#delivery_contact_title ⇒ String
Title of the contact person <br /> Optional
16 17 18 |
# File 'lib/shell_card_management_ap_is/models/pin_delivery_contact.rb', line 16 def delivery_contact_title @delivery_contact_title end |
#delivery_country ⇒ String
The ISO code of the country.<br /> Mandatory if PINAdviceType is paper else optional.
80 81 82 |
# File 'lib/shell_card_management_ap_is/models/pin_delivery_contact.rb', line 80 def delivery_country @delivery_country end |
#delivery_region ⇒ String
Region <br /> Optional<br />
75 76 77 |
# File 'lib/shell_card_management_ap_is/models/pin_delivery_contact.rb', line 75 def delivery_region @delivery_region end |
#delivery_region_id ⇒ Integer
Region Id <br /> Optional
70 71 72 |
# File 'lib/shell_card_management_ap_is/models/pin_delivery_contact.rb', line 70 def delivery_region_id @delivery_region_id end |
#delivery_zip_code ⇒ String
ZIP code <br /> Mandatory - if PINAdviceType is paper else optional. <br /> Max field length: 10 <br /> Optional
58 59 60 |
# File 'lib/shell_card_management_ap_is/models/pin_delivery_contact.rb', line 58 def delivery_zip_code @delivery_zip_code end |
#email_address ⇒ String
Email address for to send email of the PIN in case PINAdviceType is Email.<br /> Mandatory if PINAdviceType is email else optional.<br /> Max field length: 90. <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)
96 97 98 |
# File 'lib/shell_card_management_ap_is/models/pin_delivery_contact.rb', line 96 def email_address @email_address end |
#phone_number ⇒ String
Phone number for to send SMS of the PIN in case PINAdviceType is SMS.<br /> Mandatory if PINAdviceType is SMS else optional.<br /> Max field length: 20
87 88 89 |
# File 'lib/shell_card_management_ap_is/models/pin_delivery_contact.rb', line 87 def phone_number @phone_number end |
#save_for_pin_reminder ⇒ TrueClass | FalseClass
The given address will be used for sending PIN reminders in future when requested.<br /> Only allowed for paper delivery<br /> Optional
103 104 105 |
# File 'lib/shell_card_management_ap_is/models/pin_delivery_contact.rb', line 103 def save_for_pin_reminder @save_for_pin_reminder end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 |
# File 'lib/shell_card_management_ap_is/models/pin_delivery_contact.rb', line 188 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. delivery_contact_title = hash.key?('DeliveryContactTitle') ? hash['DeliveryContactTitle'] : SKIP delivery_contact_name = hash.key?('DeliveryContactName') ? hash['DeliveryContactName'] : SKIP delivery_company_name = hash.key?('DeliveryCompanyName') ? hash['DeliveryCompanyName'] : SKIP delivery_address_line1 = hash.key?('DeliveryAddressLine1') ? hash['DeliveryAddressLine1'] : SKIP delivery_address_line2 = hash.key?('DeliveryAddressLine2') ? hash['DeliveryAddressLine2'] : SKIP delivery_address_line3 = hash.key?('DeliveryAddressLine3') ? hash['DeliveryAddressLine3'] : SKIP delivery_zip_code = hash.key?('DeliveryZipCode') ? hash['DeliveryZipCode'] : SKIP delivery_city = hash.key?('DeliveryCity') ? hash['DeliveryCity'] : SKIP delivery_region_id = hash.key?('DeliveryRegionId') ? hash['DeliveryRegionId'] : SKIP delivery_region = hash.key?('DeliveryRegion') ? hash['DeliveryRegion'] : SKIP delivery_country = hash.key?('DeliveryCountry') ? hash['DeliveryCountry'] : SKIP phone_number = hash.key?('PhoneNumber') ? hash['PhoneNumber'] : SKIP email_address = hash.key?('EmailAddress') ? hash['EmailAddress'] : SKIP save_for_pin_reminder = hash.key?('SaveForPINReminder') ? hash['SaveForPINReminder'] : SKIP # Create object from extracted values. PINDeliveryContact.new(delivery_contact_title, delivery_contact_name, delivery_company_name, delivery_address_line1, delivery_address_line2, delivery_address_line3, delivery_zip_code, delivery_city, delivery_region_id, delivery_region, delivery_country, phone_number, email_address, save_for_pin_reminder) end |
.names ⇒ Object
A mapping from model property names to API property names.
106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 |
# File 'lib/shell_card_management_ap_is/models/pin_delivery_contact.rb', line 106 def self.names @_hash = {} if @_hash.nil? @_hash['delivery_contact_title'] = 'DeliveryContactTitle' @_hash['delivery_contact_name'] = 'DeliveryContactName' @_hash['delivery_company_name'] = 'DeliveryCompanyName' @_hash['delivery_address_line1'] = 'DeliveryAddressLine1' @_hash['delivery_address_line2'] = 'DeliveryAddressLine2' @_hash['delivery_address_line3'] = 'DeliveryAddressLine3' @_hash['delivery_zip_code'] = 'DeliveryZipCode' @_hash['delivery_city'] = 'DeliveryCity' @_hash['delivery_region_id'] = 'DeliveryRegionId' @_hash['delivery_region'] = 'DeliveryRegion' @_hash['delivery_country'] = 'DeliveryCountry' @_hash['phone_number'] = 'PhoneNumber' @_hash['email_address'] = 'EmailAddress' @_hash['save_for_pin_reminder'] = 'SaveForPINReminder' @_hash end |
.nullables ⇒ Object
An array for nullable fields
146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 |
# File 'lib/shell_card_management_ap_is/models/pin_delivery_contact.rb', line 146 def self.nullables %w[ delivery_contact_title delivery_contact_name delivery_company_name delivery_address_line1 delivery_address_line2 delivery_address_line3 delivery_zip_code delivery_city delivery_region_id delivery_region delivery_country phone_number email_address ] end |
.optionals ⇒ Object
An array for optional fields
126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 |
# File 'lib/shell_card_management_ap_is/models/pin_delivery_contact.rb', line 126 def self.optionals %w[ delivery_contact_title delivery_contact_name delivery_company_name delivery_address_line1 delivery_address_line2 delivery_address_line3 delivery_zip_code delivery_city delivery_region_id delivery_region delivery_country phone_number email_address save_for_pin_reminder ] end |