Class: ShellCardManagementApIs::DeliveryAddressUpdateRequest
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- ShellCardManagementApIs::DeliveryAddressUpdateRequest
- Defined in:
- lib/shell_card_management_ap_is/models/delivery_address_update_request.rb
Overview
DeliveryAddressUpdateRequest Model.
Instance Attribute Summary collapse
-
#account_id ⇒ Integer
Account ID of the customer.
-
#account_number ⇒ String
Account Number of the customer.
-
#col_co_code ⇒ Integer
Collecting Company Code (Shell Code) of the selected payer.
-
#col_co_id ⇒ Integer
Collecting Company Id of the selected payer.
-
#delivery_address_updates ⇒ Array[DeliveryAddressUpdate]
Account Number of the customer.
-
#payer_id ⇒ Integer
Payer Id (i.e. Customer Id of the Payment Customer) of the selected payer.
-
#payer_number ⇒ String
Payer Number (Ex: GB000000123) of the selected payer.
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(col_co_id = SKIP, col_co_code = SKIP, payer_id = SKIP, payer_number = SKIP, account_id = SKIP, account_number = SKIP, delivery_address_updates = SKIP) ⇒ DeliveryAddressUpdateRequest
constructor
A new instance of DeliveryAddressUpdateRequest.
Methods inherited from BaseModel
Constructor Details
#initialize(col_co_id = SKIP, col_co_code = SKIP, payer_id = SKIP, payer_number = SKIP, account_id = SKIP, account_number = SKIP, delivery_address_updates = SKIP) ⇒ DeliveryAddressUpdateRequest
Returns a new instance of DeliveryAddressUpdateRequest.
81 82 83 84 85 86 87 88 89 90 91 |
# File 'lib/shell_card_management_ap_is/models/delivery_address_update_request.rb', line 81 def initialize(col_co_id = SKIP, col_co_code = SKIP, payer_id = SKIP, payer_number = SKIP, account_id = SKIP, account_number = SKIP, delivery_address_updates = SKIP) @col_co_id = col_co_id unless col_co_id == SKIP @col_co_code = col_co_code unless col_co_code == SKIP @payer_id = payer_id unless payer_id == SKIP @payer_number = payer_number unless payer_number == SKIP @account_id = account_id unless account_id == SKIP @account_number = account_number unless account_number == SKIP @delivery_address_updates = delivery_address_updates unless delivery_address_updates == SKIP end |
Instance Attribute Details
#account_id ⇒ Integer
Account ID of the customer. Optional if AccountNumber is passed, else mandatory.
36 37 38 |
# File 'lib/shell_card_management_ap_is/models/delivery_address_update_request.rb', line 36 def account_id @account_id end |
#account_number ⇒ String
Account Number of the customer. Optional if AccountId is passed, else mandatory. This input is a search criterion, if given.
42 43 44 |
# File 'lib/shell_card_management_ap_is/models/delivery_address_update_request.rb', line 42 def account_number @account_number end |
#col_co_code ⇒ Integer
Collecting Company Code (Shell Code) of the selected payer. Mandatory for serviced OUs such as Romania, Latvia, Lithuania, Estonia, Ukraine etc. It is optional for other countries if ColCoID is provided.
21 22 23 |
# File 'lib/shell_card_management_ap_is/models/delivery_address_update_request.rb', line 21 def col_co_code @col_co_code end |
#col_co_id ⇒ Integer
Collecting Company Id of the selected payer. Optional if ColCoCode is passed else Mandatory.
15 16 17 |
# File 'lib/shell_card_management_ap_is/models/delivery_address_update_request.rb', line 15 def col_co_id @col_co_id end |
#delivery_address_updates ⇒ Array[DeliveryAddressUpdate]
Account Number of the customer. Optional if AccountId is passed, else mandatory. This input is a search criterion, if given.
48 49 50 |
# File 'lib/shell_card_management_ap_is/models/delivery_address_update_request.rb', line 48 def delivery_address_updates @delivery_address_updates end |
#payer_id ⇒ Integer
Payer Id (i.e. Customer Id of the Payment Customer) of the selected payer. Optional if PayerNumber is passed else Mandatory
26 27 28 |
# File 'lib/shell_card_management_ap_is/models/delivery_address_update_request.rb', line 26 def payer_id @payer_id end |
#payer_number ⇒ String
Payer Number (Ex: GB000000123) of the selected payer. Optional if PayerId is passed else Mandatory
31 32 33 |
# File 'lib/shell_card_management_ap_is/models/delivery_address_update_request.rb', line 31 def payer_number @payer_number end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 |
# File 'lib/shell_card_management_ap_is/models/delivery_address_update_request.rb', line 94 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. col_co_id = hash.key?('ColCoId') ? hash['ColCoId'] : SKIP col_co_code = hash.key?('ColCoCode') ? hash['ColCoCode'] : SKIP payer_id = hash.key?('PayerId') ? hash['PayerId'] : SKIP payer_number = hash.key?('PayerNumber') ? hash['PayerNumber'] : SKIP account_id = hash.key?('AccountId') ? hash['AccountId'] : SKIP account_number = hash.key?('AccountNumber') ? hash['AccountNumber'] : SKIP # Parameter is an array, so we need to iterate through it delivery_address_updates = nil unless hash['DeliveryAddressUpdates'].nil? delivery_address_updates = [] hash['DeliveryAddressUpdates'].each do |structure| delivery_address_updates << (DeliveryAddressUpdate.from_hash(structure) if structure) end end delivery_address_updates = SKIP unless hash.key?('DeliveryAddressUpdates') # Create object from extracted values. DeliveryAddressUpdateRequest.new(col_co_id, col_co_code, payer_id, payer_number, account_id, account_number, delivery_address_updates) end |
.names ⇒ Object
A mapping from model property names to API property names.
51 52 53 54 55 56 57 58 59 60 61 |
# File 'lib/shell_card_management_ap_is/models/delivery_address_update_request.rb', line 51 def self.names @_hash = {} if @_hash.nil? @_hash['col_co_id'] = 'ColCoId' @_hash['col_co_code'] = 'ColCoCode' @_hash['payer_id'] = 'PayerId' @_hash['payer_number'] = 'PayerNumber' @_hash['account_id'] = 'AccountId' @_hash['account_number'] = 'AccountNumber' @_hash['delivery_address_updates'] = 'DeliveryAddressUpdates' @_hash end |
.nullables ⇒ Object
An array for nullable fields
77 78 79 |
# File 'lib/shell_card_management_ap_is/models/delivery_address_update_request.rb', line 77 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
64 65 66 67 68 69 70 71 72 73 74 |
# File 'lib/shell_card_management_ap_is/models/delivery_address_update_request.rb', line 64 def self.optionals %w[ col_co_id col_co_code payer_id payer_number account_id account_number delivery_address_updates ] end |