Class: ShellCardManagementApIs::UpdateCardRenewalAddress2
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- ShellCardManagementApIs::UpdateCardRenewalAddress2
- Defined in:
- lib/shell_card_management_ap_is/models/update_card_renewal_address2.rb
Overview
UpdateCardRenewalAddress2 Model.
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) ⇒ UpdateCardRenewalAddress2
constructor
A new instance of UpdateCardRenewalAddress2.
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) ⇒ UpdateCardRenewalAddress2
Returns a new instance of UpdateCardRenewalAddress2.
110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 |
# File 'lib/shell_card_management_ap_is/models/update_card_renewal_address2.rb', line 110 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”.
37 38 39 |
# File 'lib/shell_card_management_ap_is/models/update_card_renewal_address2.rb', line 37 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
51 52 53 |
# File 'lib/shell_card_management_ap_is/models/update_card_renewal_address2.rb', line 51 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
29 30 31 |
# File 'lib/shell_card_management_ap_is/models/update_card_renewal_address2.rb', line 29 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
17 18 19 |
# File 'lib/shell_card_management_ap_is/models/update_card_renewal_address2.rb', line 17 def contact_name @contact_name end |
#contact_title ⇒ String
Title Max Length: 50
22 23 24 |
# File 'lib/shell_card_management_ap_is/models/update_card_renewal_address2.rb', line 22 def contact_title @contact_title end |
#country_id ⇒ Integer
Country ID Note: Mandatory when ‘UseCustomerDefaultAddress’ is set to ‘false’. The field is ignored otherwise.
61 62 63 |
# File 'lib/shell_card_management_ap_is/models/update_card_renewal_address2.rb', line 61 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)
70 71 72 |
# File 'lib/shell_card_management_ap_is/models/update_card_renewal_address2.rb', line 70 def email_address @email_address end |
#phone_number ⇒ String
Phone number Optional Max Length: 16
76 77 78 |
# File 'lib/shell_card_management_ap_is/models/update_card_renewal_address2.rb', line 76 def phone_number @phone_number end |
#region_id ⇒ Integer
Region id of card.
55 56 57 |
# File 'lib/shell_card_management_ap_is/models/update_card_renewal_address2.rb', line 55 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
44 45 46 |
# File 'lib/shell_card_management_ap_is/models/update_card_renewal_address2.rb', line 44 def zip_code @zip_code end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
127 128 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 |
# File 'lib/shell_card_management_ap_is/models/update_card_renewal_address2.rb', line 127 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. UpdateCardRenewalAddress2.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.
79 80 81 82 83 84 85 86 87 88 89 90 91 92 |
# File 'lib/shell_card_management_ap_is/models/update_card_renewal_address2.rb', line 79 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
106 107 108 |
# File 'lib/shell_card_management_ap_is/models/update_card_renewal_address2.rb', line 106 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
95 96 97 98 99 100 101 102 103 |
# File 'lib/shell_card_management_ap_is/models/update_card_renewal_address2.rb', line 95 def self.optionals %w[ contact_title city region_id email_address phone_number ] end |