Class: ShellCardManagementApIs::DeliveryAddressUpdateResponse
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- ShellCardManagementApIs::DeliveryAddressUpdateResponse
- Defined in:
- lib/shell_card_management_ap_is/models/delivery_address_update_response.rb
Overview
DeliveryAddressUpdateResponse Model.
Instance Attribute Summary collapse
-
#delivery_address_update_references ⇒ DeliveryAddressUpdateReferences2
Service reference number for tracking.
-
#error ⇒ ErrorStatus
Service reference number for tracking.
-
#request_id ⇒ String
Request ID to which was passed on the API request.
-
#service_reference ⇒ Integer
Service reference number for tracking.
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(request_id = SKIP, service_reference = SKIP, delivery_address_update_references = SKIP, error = SKIP) ⇒ DeliveryAddressUpdateResponse
constructor
A new instance of DeliveryAddressUpdateResponse.
Methods inherited from BaseModel
Constructor Details
#initialize(request_id = SKIP, service_reference = SKIP, delivery_address_update_references = SKIP, error = SKIP) ⇒ DeliveryAddressUpdateResponse
Returns a new instance of DeliveryAddressUpdateResponse.
54 55 56 57 58 59 60 61 62 63 |
# File 'lib/shell_card_management_ap_is/models/delivery_address_update_response.rb', line 54 def initialize(request_id = SKIP, service_reference = SKIP, delivery_address_update_references = SKIP, error = SKIP) @request_id = request_id unless request_id == SKIP @service_reference = service_reference unless service_reference == SKIP unless delivery_address_update_references == SKIP @delivery_address_update_references = delivery_address_update_references end @error = error unless error == SKIP end |
Instance Attribute Details
#delivery_address_update_references ⇒ DeliveryAddressUpdateReferences2
Service reference number for tracking.
22 23 24 |
# File 'lib/shell_card_management_ap_is/models/delivery_address_update_response.rb', line 22 def delivery_address_update_references @delivery_address_update_references end |
#error ⇒ ErrorStatus
Service reference number for tracking.
26 27 28 |
# File 'lib/shell_card_management_ap_is/models/delivery_address_update_response.rb', line 26 def error @error end |
#request_id ⇒ String
Request ID to which was passed on the API request.
14 15 16 |
# File 'lib/shell_card_management_ap_is/models/delivery_address_update_response.rb', line 14 def request_id @request_id end |
#service_reference ⇒ Integer
Service reference number for tracking.
18 19 20 |
# File 'lib/shell_card_management_ap_is/models/delivery_address_update_response.rb', line 18 def service_reference @service_reference end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 |
# File 'lib/shell_card_management_ap_is/models/delivery_address_update_response.rb', line 66 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. request_id = hash.key?('RequestId') ? hash['RequestId'] : SKIP service_reference = hash.key?('ServiceReference') ? hash['ServiceReference'] : SKIP if hash['DeliveryAddressUpdateReferences'] delivery_address_update_references = DeliveryAddressUpdateReferences2.from_hash(hash['DeliveryAddressUpdateReferences']) end error = ErrorStatus.from_hash(hash['Error']) if hash['Error'] # Create object from extracted values. DeliveryAddressUpdateResponse.new(request_id, service_reference, delivery_address_update_references, error) end |
.names ⇒ Object
A mapping from model property names to API property names.
29 30 31 32 33 34 35 36 37 |
# File 'lib/shell_card_management_ap_is/models/delivery_address_update_response.rb', line 29 def self.names @_hash = {} if @_hash.nil? @_hash['request_id'] = 'RequestId' @_hash['service_reference'] = 'ServiceReference' @_hash['delivery_address_update_references'] = 'DeliveryAddressUpdateReferences' @_hash['error'] = 'Error' @_hash end |
.nullables ⇒ Object
An array for nullable fields
50 51 52 |
# File 'lib/shell_card_management_ap_is/models/delivery_address_update_response.rb', line 50 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
40 41 42 43 44 45 46 47 |
# File 'lib/shell_card_management_ap_is/models/delivery_address_update_response.rb', line 40 def self.optionals %w[ request_id service_reference delivery_address_update_references error ] end |