Class: ShellCardManagementApIs::PINDeliveryAddress
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- ShellCardManagementApIs::PINDeliveryAddress
- Defined in:
- lib/shell_card_management_ap_is/models/pin_delivery_address.rb
Overview
PINDeliveryAddress Model.
Instance Attribute Summary collapse
-
#address_id ⇒ Integer
Address Id in cards platform.
-
#address_line1 ⇒ String
Address line 1 Mandatory if IsNewDeliveryAddress and OrderReplacement are passed True.
-
#address_line2 ⇒ String
Address line 2 Optional Max field length- 40 Note- If the Shell Card Platform configuration is set to clear the personal details captured on card orders, this value will be cleared from the record after processing the request.
-
#address_line3 ⇒ String
Address line Optional Max field length- 40 Note- If the Shell Card Platform configuration is set to clear the personal details captured on card orders, this value will be cleared from the record after processing the request.
-
#city ⇒ String
City Max field length- 40 Note- If the Shell Card Platform configuration is set to clear the personal details captured on card orders, this value will be cleared from the record after processing the request.
-
#company_name ⇒ String
Company name Mandatory if IsNewDeliveryAddress and OrderReplacement are passed.
-
#contact_fore_name ⇒ String
Fore name of the contact person.
-
#contact_last_name ⇒ String
Last name of the contact person.
-
#contact_middle_name ⇒ String
Middle name of the contact person.
-
#contact_title ⇒ String
Title of the contact person Optional Max field length- 10 Note- If the Shell Card Platform configuration is set to clear the personal details captured on card orders, this value will be cleared from the record after processing the request.
-
#country ⇒ String
Country name.
-
#country_id ⇒ Integer
Country Id in cards platform.
-
#country_iso_code ⇒ String
The ISO code of the country.
-
#region ⇒ String
Region Optional When region is passed, Shell Card Platform will look up for the region id for the given region.
-
#region_id ⇒ Integer
Region Id.
-
#zip_code ⇒ String
ZIP code Mandatory if IsNewDeliveryAddress and OrderReplacement are passed.
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_id = nil, address_line1 = nil, zip_code = nil, country_id = nil, country_iso_code = nil, country = nil, contact_fore_name = SKIP, contact_middle_name = SKIP, contact_last_name = SKIP, contact_title = SKIP, address_line2 = SKIP, address_line3 = SKIP, city = SKIP, region_id = SKIP, region = SKIP) ⇒ PINDeliveryAddress
constructor
A new instance of PINDeliveryAddress.
Methods inherited from BaseModel
Constructor Details
#initialize(company_name = nil, address_id = nil, address_line1 = nil, zip_code = nil, country_id = nil, country_iso_code = nil, country = nil, contact_fore_name = SKIP, contact_middle_name = SKIP, contact_last_name = SKIP, contact_title = SKIP, address_line2 = SKIP, address_line3 = SKIP, city = SKIP, region_id = SKIP, region = SKIP) ⇒ PINDeliveryAddress
Returns a new instance of PINDeliveryAddress.
152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 |
# File 'lib/shell_card_management_ap_is/models/pin_delivery_address.rb', line 152 def initialize(company_name = nil, address_id = nil, address_line1 = nil, zip_code = nil, country_id = nil, country_iso_code = nil, country = nil, contact_fore_name = SKIP, contact_middle_name = SKIP, contact_last_name = SKIP, contact_title = SKIP, address_line2 = SKIP, address_line3 = SKIP, city = SKIP, region_id = SKIP, region = SKIP) @contact_fore_name = contact_fore_name unless contact_fore_name == SKIP @contact_middle_name = contact_middle_name unless contact_middle_name == SKIP @contact_last_name = contact_last_name unless contact_last_name == SKIP @contact_title = contact_title unless contact_title == SKIP @company_name = company_name @address_id = address_id @address_line1 = address_line1 @address_line2 = address_line2 unless address_line2 == SKIP @address_line3 = address_line3 unless address_line3 == SKIP @zip_code = zip_code @city = city unless city == SKIP @region_id = region_id unless region_id == SKIP @region = region unless region == SKIP @country_id = country_id @country_iso_code = country_iso_code @country = country end |
Instance Attribute Details
#address_id ⇒ Integer
Address Id in cards platform.
40 41 42 |
# File 'lib/shell_card_management_ap_is/models/pin_delivery_address.rb', line 40 def address_id @address_id end |
#address_line1 ⇒ String
Address line 1 Mandatory if IsNewDeliveryAddress and OrderReplacement are passed True. Max field length- 40 Note- If the Shell Card Platform configuration is set to clear the personal details captured on card orders, this value will be cleared from the record after processing the request.
48 49 50 |
# File 'lib/shell_card_management_ap_is/models/pin_delivery_address.rb', line 48 def address_line1 @address_line1 end |
#address_line2 ⇒ String
Address line 2 Optional Max field length- 40 Note- If the Shell Card Platform configuration is set to clear the personal details captured on card orders, this value will be cleared from the record after processing the request.
55 56 57 |
# File 'lib/shell_card_management_ap_is/models/pin_delivery_address.rb', line 55 def address_line2 @address_line2 end |
#address_line3 ⇒ String
Address line Optional Max field length- 40 Note- If the Shell Card Platform configuration is set to clear the personal details captured on card orders, this value will be cleared from the record after processing the request.
62 63 64 |
# File 'lib/shell_card_management_ap_is/models/pin_delivery_address.rb', line 62 def address_line3 @address_line3 end |
#city ⇒ String
City Max field length- 40 Note- If the Shell Card Platform configuration is set to clear the personal details captured on card orders, this value will be cleared from the record after processing the request.
76 77 78 |
# File 'lib/shell_card_management_ap_is/models/pin_delivery_address.rb', line 76 def city @city end |
#company_name ⇒ String
Company name Mandatory if IsNewDeliveryAddress and OrderReplacement are passed. True, Note- If the Shell Card Platform configuration is set to clear the personal details captured on card orders, this value will be cleared from the record after processing the request.
36 37 38 |
# File 'lib/shell_card_management_ap_is/models/pin_delivery_address.rb', line 36 def company_name @company_name end |
#contact_fore_name ⇒ String
Fore name of the contact person
14 15 16 |
# File 'lib/shell_card_management_ap_is/models/pin_delivery_address.rb', line 14 def contact_fore_name @contact_fore_name end |
#contact_last_name ⇒ String
Last name of the contact person
22 23 24 |
# File 'lib/shell_card_management_ap_is/models/pin_delivery_address.rb', line 22 def contact_last_name @contact_last_name end |
#contact_middle_name ⇒ String
Middle name of the contact person
18 19 20 |
# File 'lib/shell_card_management_ap_is/models/pin_delivery_address.rb', line 18 def contact_middle_name @contact_middle_name end |
#contact_title ⇒ String
Title of the contact person Optional Max field length- 10 Note- If the Shell Card Platform configuration is set to clear the personal details captured on card orders, this value will be cleared from the record after processing the request.
29 30 31 |
# File 'lib/shell_card_management_ap_is/models/pin_delivery_address.rb', line 29 def contact_title @contact_title end |
#country ⇒ String
Country name.
102 103 104 |
# File 'lib/shell_card_management_ap_is/models/pin_delivery_address.rb', line 102 def country @country end |
#country_id ⇒ Integer
Country Id in cards platform.
91 92 93 |
# File 'lib/shell_card_management_ap_is/models/pin_delivery_address.rb', line 91 def country_id @country_id end |
#country_iso_code ⇒ String
The ISO code of the country. Mandatory if IsNewDeliveryAddress and OrderReplacement are passed. If the option to clear personal details is set in the Shell Card Platform, then this value will be cleared from the record after processing the request .
98 99 100 |
# File 'lib/shell_card_management_ap_is/models/pin_delivery_address.rb', line 98 def country_iso_code @country_iso_code end |
#region ⇒ String
Region Optional When region is passed, Shell Card Platform will look up for the region id for the given region. If the option to clear personal details is set in the Shell Card Platform, then this value will be cleared from the record after processing the request .
87 88 89 |
# File 'lib/shell_card_management_ap_is/models/pin_delivery_address.rb', line 87 def region @region end |
#region_id ⇒ Integer
Region Id
80 81 82 |
# File 'lib/shell_card_management_ap_is/models/pin_delivery_address.rb', line 80 def region_id @region_id end |
#zip_code ⇒ String
ZIP code Mandatory if IsNewDeliveryAddress and OrderReplacement are passed. True, Max field length- 10 Note- If the Shell Card Platform configuration is set to clear the personal details captured on card orders, this value will be cleared from the record after processing the request.
70 71 72 |
# File 'lib/shell_card_management_ap_is/models/pin_delivery_address.rb', line 70 def zip_code @zip_code end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
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 |
# File 'lib/shell_card_management_ap_is/models/pin_delivery_address.rb', line 178 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. company_name = hash.key?('CompanyName') ? hash['CompanyName'] : nil address_id = hash.key?('AddressId') ? hash['AddressId'] : nil address_line1 = hash.key?('AddressLine1') ? hash['AddressLine1'] : nil zip_code = hash.key?('ZipCode') ? hash['ZipCode'] : nil country_id = hash.key?('CountryId') ? hash['CountryId'] : nil country_iso_code = hash.key?('CountryISOCode') ? hash['CountryISOCode'] : nil country = hash.key?('Country') ? hash['Country'] : nil contact_fore_name = hash.key?('ContactForeName') ? hash['ContactForeName'] : SKIP contact_middle_name = hash.key?('ContactMiddleName') ? hash['ContactMiddleName'] : SKIP contact_last_name = hash.key?('ContactLastName') ? hash['ContactLastName'] : SKIP contact_title = hash.key?('ContactTitle') ? hash['ContactTitle'] : SKIP address_line2 = hash.key?('AddressLine2') ? hash['AddressLine2'] : SKIP address_line3 = hash.key?('AddressLine3') ? hash['AddressLine3'] : SKIP city = hash.key?('City') ? hash['City'] : SKIP region_id = hash.key?('RegionId') ? hash['RegionId'] : SKIP region = hash.key?('Region') ? hash['Region'] : SKIP # Create object from extracted values. PINDeliveryAddress.new(company_name, address_id, address_line1, zip_code, country_id, country_iso_code, country, contact_fore_name, contact_middle_name, contact_last_name, contact_title, address_line2, address_line3, city, region_id, region) end |
.names ⇒ Object
A mapping from model property names to API property names.
105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 |
# File 'lib/shell_card_management_ap_is/models/pin_delivery_address.rb', line 105 def self.names @_hash = {} if @_hash.nil? @_hash['contact_fore_name'] = 'ContactForeName' @_hash['contact_middle_name'] = 'ContactMiddleName' @_hash['contact_last_name'] = 'ContactLastName' @_hash['contact_title'] = 'ContactTitle' @_hash['company_name'] = 'CompanyName' @_hash['address_id'] = 'AddressId' @_hash['address_line1'] = 'AddressLine1' @_hash['address_line2'] = 'AddressLine2' @_hash['address_line3'] = 'AddressLine3' @_hash['zip_code'] = 'ZipCode' @_hash['city'] = 'City' @_hash['region_id'] = 'RegionId' @_hash['region'] = 'Region' @_hash['country_id'] = 'CountryId' @_hash['country_iso_code'] = 'CountryISOCode' @_hash['country'] = 'Country' @_hash end |
.nullables ⇒ Object
An array for nullable fields
142 143 144 145 146 147 148 149 150 |
# File 'lib/shell_card_management_ap_is/models/pin_delivery_address.rb', line 142 def self.nullables %w[ contact_fore_name contact_middle_name contact_last_name contact_title region_id ] end |
.optionals ⇒ Object
An array for optional fields
127 128 129 130 131 132 133 134 135 136 137 138 139 |
# File 'lib/shell_card_management_ap_is/models/pin_delivery_address.rb', line 127 def self.optionals %w[ contact_fore_name contact_middle_name contact_last_name contact_title address_line2 address_line3 city region_id region ] end |