Class: ShellCardManagementApIs::UpdateBundleRequest
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- ShellCardManagementApIs::UpdateBundleRequest
- Defined in:
- lib/shell_card_management_ap_is/models/update_bundle_request.rb
Overview
UpdateBundleRequest Model.
Instance Attribute Summary collapse
-
#account_id ⇒ Integer
Account ID of the customer.
-
#account_number ⇒ String
Account Number of the customer.
-
#bundle_id ⇒ String
Identifier of the bundle in Gateway.
-
#cards ⇒ Array[String]
List of Card PANs to be added in the bundle.
-
#col_co_code ⇒ Integer
Collecting Company Code of the selected payer.
-
#col_co_id ⇒ Integer
Collecting Company Id of the selected payer.
-
#payer_id ⇒ String
Payer Id of the selected payer.
-
#payer_number ⇒ String
Payer Number of the selected payer.
-
#request_action ⇒ String
The value indicates the action to be performed with the request.
-
#restrictions ⇒ BundleRestrictionUpdate
The value indicates what actions to be performed with respect to usage restrictions on the list of cards being added or removed.
-
#usage_restriction_action ⇒ String
The value indicates what actions to be performed with respect to usage restrictions on the list of cards being added or removed.
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(bundle_id = nil, request_action = nil, cards = nil, usage_restriction_action = nil, col_co_id = SKIP, col_co_code = SKIP, payer_id = SKIP, payer_number = SKIP, account_id = SKIP, account_number = SKIP, restrictions = SKIP) ⇒ UpdateBundleRequest
constructor
A new instance of UpdateBundleRequest.
Methods inherited from BaseModel
Constructor Details
#initialize(bundle_id = nil, request_action = nil, cards = nil, usage_restriction_action = nil, col_co_id = SKIP, col_co_code = SKIP, payer_id = SKIP, payer_number = SKIP, account_id = SKIP, account_number = SKIP, restrictions = SKIP) ⇒ UpdateBundleRequest
Returns a new instance of UpdateBundleRequest.
138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 |
# File 'lib/shell_card_management_ap_is/models/update_bundle_request.rb', line 138 def initialize(bundle_id = nil, request_action = nil, cards = nil, usage_restriction_action = nil, col_co_id = SKIP, col_co_code = SKIP, payer_id = SKIP, payer_number = SKIP, account_id = SKIP, account_number = SKIP, restrictions = 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 @bundle_id = bundle_id @request_action = request_action @cards = cards @usage_restriction_action = usage_restriction_action @restrictions = restrictions unless restrictions == SKIP end |
Instance Attribute Details
#account_id ⇒ Integer
Account ID of the customer. Either AccountId or AccountNumber or both must be passed. Example: 123456
45 46 47 |
# File 'lib/shell_card_management_ap_is/models/update_bundle_request.rb', line 45 def account_id @account_id end |
#account_number ⇒ String
Account Number of the customer. Either AccountId or AccountNumber or both must be passed. Example: GB000000123
51 52 53 |
# File 'lib/shell_card_management_ap_is/models/update_bundle_request.rb', line 51 def account_number @account_number end |
#bundle_id ⇒ String
Identifier of the bundle in Gateway. Mandatory
56 57 58 |
# File 'lib/shell_card_management_ap_is/models/update_bundle_request.rb', line 56 def bundle_id @bundle_id end |
#cards ⇒ Array[String]
List of Card PANs to be added in the bundle. Mandatory for Add / Remove request action. Ignored for Update action. Example: 7002051006629890645 When PAN matches with multiple cards, the restriction will be applied on the latest issued card.
73 74 75 |
# File 'lib/shell_card_management_ap_is/models/update_bundle_request.rb', line 73 def cards @cards end |
#col_co_code ⇒ Integer
Collecting Company 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. Example: 86 for Philippines 5 for UK
27 28 29 |
# File 'lib/shell_card_management_ap_is/models/update_bundle_request.rb', line 27 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. Example: 1 for Philippines 5 for UK
18 19 20 |
# File 'lib/shell_card_management_ap_is/models/update_bundle_request.rb', line 18 def col_co_id @col_co_id end |
#payer_id ⇒ String
Payer Id of the selected payer. Either PayerId or PayerNumber or both must be passed. Example: 123456
33 34 35 |
# File 'lib/shell_card_management_ap_is/models/update_bundle_request.rb', line 33 def payer_id @payer_id end |
#payer_number ⇒ String
Payer Number of the selected payer. Either PayerId or PayerNumber or both must be passed. Example: GB000000123
39 40 41 |
# File 'lib/shell_card_management_ap_is/models/update_bundle_request.rb', line 39 def payer_number @payer_number end |
#request_action ⇒ String
The value indicates the action to be performed with the request. Mandatory Allowed values: • Add • Update • Remove
65 66 67 |
# File 'lib/shell_card_management_ap_is/models/update_bundle_request.rb', line 65 def request_action @request_action end |
#restrictions ⇒ BundleRestrictionUpdate
The value indicates what actions to be performed with respect to usage restrictions on the list of cards being added or removed. Mandatory for Add / Remove request action. Ignored for Update action. Allowed values: • Update • None
91 92 93 |
# File 'lib/shell_card_management_ap_is/models/update_bundle_request.rb', line 91 def restrictions @restrictions end |
#usage_restriction_action ⇒ String
The value indicates what actions to be performed with respect to usage restrictions on the list of cards being added or removed. Mandatory for Add / Remove request action. Ignored for Update action. Allowed values: • Update • None
82 83 84 |
# File 'lib/shell_card_management_ap_is/models/update_bundle_request.rb', line 82 def usage_restriction_action @usage_restriction_action end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 |
# File 'lib/shell_card_management_ap_is/models/update_bundle_request.rb', line 157 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. bundle_id = hash.key?('BundleId') ? hash['BundleId'] : nil request_action = hash.key?('RequestAction') ? hash['RequestAction'] : nil cards = hash.key?('Cards') ? hash['Cards'] : nil usage_restriction_action = hash.key?('UsageRestrictionAction') ? hash['UsageRestrictionAction'] : nil 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 restrictions = BundleRestrictionUpdate.from_hash(hash['Restrictions']) if hash['Restrictions'] # Create object from extracted values. UpdateBundleRequest.new(bundle_id, request_action, cards, usage_restriction_action, col_co_id, col_co_code, payer_id, payer_number, account_id, account_number, restrictions) end |
.names ⇒ Object
A mapping from model property names to API property names.
94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 |
# File 'lib/shell_card_management_ap_is/models/update_bundle_request.rb', line 94 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['bundle_id'] = 'BundleId' @_hash['request_action'] = 'RequestAction' @_hash['cards'] = 'Cards' @_hash['usage_restriction_action'] = 'UsageRestrictionAction' @_hash['restrictions'] = 'Restrictions' @_hash end |
.nullables ⇒ Object
An array for nullable fields
124 125 126 127 128 129 130 131 132 133 134 135 136 |
# File 'lib/shell_card_management_ap_is/models/update_bundle_request.rb', line 124 def self.nullables %w[ col_co_id col_co_code payer_id payer_number account_id account_number bundle_id request_action usage_restriction_action ] end |
.optionals ⇒ Object
An array for optional fields
111 112 113 114 115 116 117 118 119 120 121 |
# File 'lib/shell_card_management_ap_is/models/update_bundle_request.rb', line 111 def self.optionals %w[ col_co_id col_co_code payer_id payer_number account_id account_number restrictions ] end |