Class: ShellCardManagementApIs::UpdateCardRenewalAddress
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- ShellCardManagementApIs::UpdateCardRenewalAddress
- Defined in:
- lib/shell_card_management_ap_is/models/update_card_renewal_address.rb
Overview
Delivery address of card. This address will be used for card reissue and PIN reminders in future. Note: Mandatory when ‘UseCustomerDefaultAddress’ is set to ‘false’. The field is ignored otherwise.
Instance Attribute Summary collapse
-
#address_line ⇒ String
Address line 1,2 and 3 Note: Mandatory when ‘UseCustomerDefaultAddress’ is set to ‘false’.
-
#city ⇒ String
City Note: Mandatory when ‘UseCustomerDefaultAddress’ is set to ‘false’.
-
#company_name ⇒ String
Company name.
-
#contact_name ⇒ String
Contact name Note: Mandatory when ‘UseCustomerDefaultAddress’ is set to ‘false’.
-
#contact_title ⇒ String
Title Max Length: 50.
-
#country_id ⇒ Integer
Country ID Note: Mandatory when ‘UseCustomerDefaultAddress’ is set to ‘false’.
-
#email_address ⇒ String
Email Address Max Length: 90 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 Optional Max Length: 16.
-
#region_id ⇒ Integer
Region id of card.
-
#zip_code ⇒ String
ZipCode Note: Mandatory when ‘UseCustomerDefaultAddress’ is set to ‘false’.
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(contact_name = nil, company_name = nil, address_line = nil, zip_code = nil, country_id = nil, contact_title = SKIP, city = SKIP, region_id = SKIP, email_address = SKIP, phone_number = SKIP) ⇒ UpdateCardRenewalAddress
constructor
A new instance of UpdateCardRenewalAddress.
Methods inherited from BaseModel
Constructor Details
#initialize(contact_name = nil, company_name = nil, address_line = nil, zip_code = nil, country_id = nil, contact_title = SKIP, city = SKIP, region_id = SKIP, email_address = SKIP, phone_number = SKIP) ⇒ UpdateCardRenewalAddress
Returns a new instance of UpdateCardRenewalAddress.
112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 |
# File 'lib/shell_card_management_ap_is/models/update_card_renewal_address.rb', line 112 def initialize(contact_name = nil, company_name = nil, address_line = nil, zip_code = nil, country_id = nil, contact_title = SKIP, city = SKIP, region_id = SKIP, email_address = SKIP, phone_number = SKIP) @contact_name = contact_name @contact_title = contact_title unless contact_title == SKIP @company_name = company_name @address_line = address_line @zip_code = zip_code @city = city unless city == SKIP @region_id = region_id unless region_id == SKIP @country_id = country_id @email_address = email_address unless email_address == SKIP @phone_number = phone_number unless phone_number == SKIP end |
Instance Attribute Details
#address_line ⇒ String
Address line 1,2 and 3 Note: Mandatory when ‘UseCustomerDefaultAddress’ is set to ‘false’. The field is ignored otherwise. Max Length: 128 Note: -Each address line should be separated by “rn”.
39 40 41 |
# File 'lib/shell_card_management_ap_is/models/update_card_renewal_address.rb', line 39 def address_line @address_line end |
#city ⇒ String
City Note: Mandatory when ‘UseCustomerDefaultAddress’ is set to ‘false’. The field is ignored otherwise. Max Length: 40
53 54 55 |
# File 'lib/shell_card_management_ap_is/models/update_card_renewal_address.rb', line 53 def city @city end |
#company_name ⇒ String
Company name. Note: Mandatory when ‘UseCustomerDefaultAddress’ is set to ‘false’. The field is ignored otherwise. Max Length: 50
31 32 33 |
# File 'lib/shell_card_management_ap_is/models/update_card_renewal_address.rb', line 31 def company_name @company_name end |
#contact_name ⇒ String
Contact name Note: Mandatory when ‘UseCustomerDefaultAddress’ is set to ‘false’. The field is ignored otherwise. Max Length: 50
19 20 21 |
# File 'lib/shell_card_management_ap_is/models/update_card_renewal_address.rb', line 19 def contact_name @contact_name end |
#contact_title ⇒ String
Title Max Length: 50
24 25 26 |
# File 'lib/shell_card_management_ap_is/models/update_card_renewal_address.rb', line 24 def contact_title @contact_title end |
#country_id ⇒ Integer
Country ID Note: Mandatory when ‘UseCustomerDefaultAddress’ is set to ‘false’. The field is ignored otherwise.
63 64 65 |
# File 'lib/shell_card_management_ap_is/models/update_card_renewal_address.rb', line 63 def country_id @country_id end |
#email_address ⇒ String
Email Address Max Length: 90 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)
72 73 74 |
# File 'lib/shell_card_management_ap_is/models/update_card_renewal_address.rb', line 72 def email_address @email_address end |
#phone_number ⇒ String
Phone number Optional Max Length: 16
78 79 80 |
# File 'lib/shell_card_management_ap_is/models/update_card_renewal_address.rb', line 78 def phone_number @phone_number end |
#region_id ⇒ Integer
Region id of card.
57 58 59 |
# File 'lib/shell_card_management_ap_is/models/update_card_renewal_address.rb', line 57 def region_id @region_id end |
#zip_code ⇒ String
ZipCode Note: Mandatory when ‘UseCustomerDefaultAddress’ is set to ‘false’. The field is ignored otherwise. Max Length: 10
46 47 48 |
# File 'lib/shell_card_management_ap_is/models/update_card_renewal_address.rb', line 46 def zip_code @zip_code end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
129 130 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 |
# File 'lib/shell_card_management_ap_is/models/update_card_renewal_address.rb', line 129 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. contact_name = hash.key?('ContactName') ? hash['ContactName'] : nil company_name = hash.key?('CompanyName') ? hash['CompanyName'] : nil address_line = hash.key?('AddressLine') ? hash['AddressLine'] : nil zip_code = hash.key?('ZipCode') ? hash['ZipCode'] : nil country_id = hash.key?('CountryID') ? hash['CountryID'] : nil contact_title = hash.key?('ContactTitle') ? hash['ContactTitle'] : SKIP city = hash.key?('City') ? hash['City'] : SKIP region_id = hash.key?('RegionID') ? hash['RegionID'] : SKIP email_address = hash.key?('EmailAddress') ? hash['EmailAddress'] : SKIP phone_number = hash.key?('PhoneNumber') ? hash['PhoneNumber'] : SKIP # Create object from extracted values. UpdateCardRenewalAddress.new(contact_name, company_name, address_line, zip_code, country_id, contact_title, city, region_id, email_address, phone_number) end |
.names ⇒ Object
A mapping from model property names to API property names.
81 82 83 84 85 86 87 88 89 90 91 92 93 94 |
# File 'lib/shell_card_management_ap_is/models/update_card_renewal_address.rb', line 81 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['email_address'] = 'EmailAddress' @_hash['phone_number'] = 'PhoneNumber' @_hash end |
.nullables ⇒ Object
An array for nullable fields
108 109 110 |
# File 'lib/shell_card_management_ap_is/models/update_card_renewal_address.rb', line 108 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
97 98 99 100 101 102 103 104 105 |
# File 'lib/shell_card_management_ap_is/models/update_card_renewal_address.rb', line 97 def self.optionals %w[ contact_title city region_id email_address phone_number ] end |