Class: ShellCardManagementApIs::CardDeliveryContact
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- ShellCardManagementApIs::CardDeliveryContact
- Defined in:
- lib/shell_card_management_ap_is/models/card_delivery_contact.rb
Overview
Request entity object for CardDeliveryContact Mandatory when CardDeliveryType is 2 else ignored.
Instance Attribute Summary collapse
-
#delivery_address_line1 ⇒ String
Address line 1 <br /> Mandatory<br /> Max field length: 40.
-
#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 <br /> Max field length: 40.
-
#delivery_company_name ⇒ String
Company name <br /> Mandatory <br /> Max field length: 50.
-
#delivery_contact_name ⇒ String
Name of the contact person <br /> Mandatory <br /> Max field length: 50.
-
#delivery_contact_title ⇒ String
Title of the contact person <br /> Optional Max field length: 10.
-
#delivery_country ⇒ String
The ISO code of the country.<br />.
-
#delivery_region ⇒ String
Region <br /> Optional<br /> When region is passed.
-
#delivery_region_id ⇒ Integer
Region Id <br /> Optional.
-
#delivery_zip_code ⇒ String
ZIP code <br /> Mandatory <br /> Max field length: 10 <br /> Optional.
-
#email_address ⇒ String
Email address for courier delivery.<br /> 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).
-
#phone_number ⇒ String
Phone number for courier delivery.<br /> Optional.<br /> Max field length: 20.
-
#save_for_card_reissue ⇒ TrueClass | FalseClass
If this is specified, the contact address will be saved in cards platform for card reissue processing.<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_name = nil, delivery_company_name = nil, delivery_address_line1 = nil, delivery_zip_code = nil, delivery_city = nil, delivery_country = nil, delivery_contact_title = SKIP, delivery_address_line2 = SKIP, delivery_address_line3 = SKIP, delivery_region_id = SKIP, delivery_region = SKIP, phone_number = SKIP, email_address = SKIP, save_for_card_reissue = SKIP) ⇒ CardDeliveryContact
constructor
A new instance of CardDeliveryContact.
Methods inherited from BaseModel
Constructor Details
#initialize(delivery_contact_name = nil, delivery_company_name = nil, delivery_address_line1 = nil, delivery_zip_code = nil, delivery_city = nil, delivery_country = nil, delivery_contact_title = SKIP, delivery_address_line2 = SKIP, delivery_address_line3 = SKIP, delivery_region_id = SKIP, delivery_region = SKIP, phone_number = SKIP, email_address = SKIP, save_for_card_reissue = SKIP) ⇒ CardDeliveryContact
Returns a new instance of CardDeliveryContact.
152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 |
# File 'lib/shell_card_management_ap_is/models/card_delivery_contact.rb', line 152 def initialize(delivery_contact_name = nil, delivery_company_name = nil, delivery_address_line1 = nil, delivery_zip_code = nil, delivery_city = nil, delivery_country = nil, delivery_contact_title = SKIP, delivery_address_line2 = SKIP, delivery_address_line3 = SKIP, delivery_region_id = SKIP, delivery_region = SKIP, phone_number = SKIP, email_address = SKIP, save_for_card_reissue = SKIP) @delivery_contact_title = delivery_contact_title unless delivery_contact_title == SKIP @delivery_contact_name = delivery_contact_name @delivery_company_name = delivery_company_name @delivery_address_line1 = delivery_address_line1 @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 @delivery_city = delivery_city @delivery_region_id = delivery_region_id unless delivery_region_id == SKIP @delivery_region = delivery_region unless delivery_region == SKIP @delivery_country = delivery_country @phone_number = phone_number unless phone_number == SKIP @email_address = email_address unless email_address == SKIP @save_for_card_reissue = save_for_card_reissue unless save_for_card_reissue == SKIP end |
Instance Attribute Details
#delivery_address_line1 ⇒ String
Address line 1 <br /> Mandatory<br /> Max field length: 40
35 36 37 |
# File 'lib/shell_card_management_ap_is/models/card_delivery_contact.rb', line 35 def delivery_address_line1 @delivery_address_line1 end |
#delivery_address_line2 ⇒ String
Address line 2 <br /> Optional <br /> Max field length: 40 <br /> Optional
42 43 44 |
# File 'lib/shell_card_management_ap_is/models/card_delivery_contact.rb', line 42 def delivery_address_line2 @delivery_address_line2 end |
#delivery_address_line3 ⇒ String
Address line 3 <br /> Optional <br /> Max field length: 40 <br /> Optional
49 50 51 |
# File 'lib/shell_card_management_ap_is/models/card_delivery_contact.rb', line 49 def delivery_address_line3 @delivery_address_line3 end |
#delivery_city ⇒ String
City <br /> Mandatory <br /> Max field length: 40
62 63 64 |
# File 'lib/shell_card_management_ap_is/models/card_delivery_contact.rb', line 62 def delivery_city @delivery_city end |
#delivery_company_name ⇒ String
Company name <br /> Mandatory <br /> Max field length: 50
29 30 31 |
# File 'lib/shell_card_management_ap_is/models/card_delivery_contact.rb', line 29 def delivery_company_name @delivery_company_name end |
#delivery_contact_name ⇒ String
Name of the contact person <br /> Mandatory <br /> Max field length: 50
23 24 25 |
# File 'lib/shell_card_management_ap_is/models/card_delivery_contact.rb', line 23 def delivery_contact_name @delivery_contact_name end |
#delivery_contact_title ⇒ String
Title of the contact person <br /> Optional Max field length: 10
17 18 19 |
# File 'lib/shell_card_management_ap_is/models/card_delivery_contact.rb', line 17 def delivery_contact_title @delivery_contact_title end |
#delivery_country ⇒ String
The ISO code of the country.<br />
77 78 79 |
# File 'lib/shell_card_management_ap_is/models/card_delivery_contact.rb', line 77 def delivery_country @delivery_country end |
#delivery_region ⇒ String
Region <br /> Optional<br /> When region is passed
73 74 75 |
# File 'lib/shell_card_management_ap_is/models/card_delivery_contact.rb', line 73 def delivery_region @delivery_region end |
#delivery_region_id ⇒ Integer
Region Id <br /> Optional
67 68 69 |
# File 'lib/shell_card_management_ap_is/models/card_delivery_contact.rb', line 67 def delivery_region_id @delivery_region_id end |
#delivery_zip_code ⇒ String
ZIP code <br /> Mandatory <br /> Max field length: 10 <br /> Optional
56 57 58 |
# File 'lib/shell_card_management_ap_is/models/card_delivery_contact.rb', line 56 def delivery_zip_code @delivery_zip_code end |
#email_address ⇒ String
Email address for courier delivery.<br /> 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)
91 92 93 |
# File 'lib/shell_card_management_ap_is/models/card_delivery_contact.rb', line 91 def email_address @email_address end |
#phone_number ⇒ String
Phone number for courier delivery.<br /> Optional.<br /> Max field length: 20
83 84 85 |
# File 'lib/shell_card_management_ap_is/models/card_delivery_contact.rb', line 83 def phone_number @phone_number end |
#save_for_card_reissue ⇒ TrueClass | FalseClass
If this is specified, the contact address will be saved in cards platform for card reissue processing.<br /> Optional
97 98 99 |
# File 'lib/shell_card_management_ap_is/models/card_delivery_contact.rb', line 97 def save_for_card_reissue @save_for_card_reissue end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
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 208 209 210 211 212 213 214 215 216 217 218 219 220 221 |
# File 'lib/shell_card_management_ap_is/models/card_delivery_contact.rb', line 176 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. delivery_contact_name = hash.key?('DeliveryContactName') ? hash['DeliveryContactName'] : nil delivery_company_name = hash.key?('DeliveryCompanyName') ? hash['DeliveryCompanyName'] : nil delivery_address_line1 = hash.key?('DeliveryAddressLine1') ? hash['DeliveryAddressLine1'] : nil delivery_zip_code = hash.key?('DeliveryZipCode') ? hash['DeliveryZipCode'] : nil delivery_city = hash.key?('DeliveryCity') ? hash['DeliveryCity'] : nil delivery_country = hash.key?('DeliveryCountry') ? hash['DeliveryCountry'] : nil delivery_contact_title = hash.key?('DeliveryContactTitle') ? hash['DeliveryContactTitle'] : SKIP delivery_address_line2 = hash.key?('DeliveryAddressLine2') ? hash['DeliveryAddressLine2'] : SKIP delivery_address_line3 = hash.key?('DeliveryAddressLine3') ? hash['DeliveryAddressLine3'] : SKIP delivery_region_id = hash.key?('DeliveryRegionId') ? hash['DeliveryRegionId'] : SKIP delivery_region = hash.key?('DeliveryRegion') ? hash['DeliveryRegion'] : SKIP phone_number = hash.key?('PhoneNumber') ? hash['PhoneNumber'] : SKIP email_address = hash.key?('EmailAddress') ? hash['EmailAddress'] : SKIP save_for_card_reissue = hash.key?('SaveForCardReissue') ? hash['SaveForCardReissue'] : SKIP # Create object from extracted values. CardDeliveryContact.new(delivery_contact_name, delivery_company_name, delivery_address_line1, delivery_zip_code, delivery_city, delivery_country, delivery_contact_title, delivery_address_line2, delivery_address_line3, delivery_region_id, delivery_region, phone_number, email_address, save_for_card_reissue) end |
.names ⇒ Object
A mapping from model property names to API property names.
100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 |
# File 'lib/shell_card_management_ap_is/models/card_delivery_contact.rb', line 100 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_card_reissue'] = 'SaveForCardReissue' @_hash end |
.nullables ⇒ Object
An array for nullable fields
134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 |
# File 'lib/shell_card_management_ap_is/models/card_delivery_contact.rb', line 134 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
120 121 122 123 124 125 126 127 128 129 130 131 |
# File 'lib/shell_card_management_ap_is/models/card_delivery_contact.rb', line 120 def self.optionals %w[ delivery_contact_title delivery_address_line2 delivery_address_line3 delivery_region_id delivery_region phone_number email_address save_for_card_reissue ] end |