Class: ShellCardManagementApIs::SearchAccountLimitResponse
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- ShellCardManagementApIs::SearchAccountLimitResponse
- Defined in:
- lib/shell_card_management_ap_is/models/search_account_limit_response.rb
Overview
SearchAccountLimitResponse Model.
Instance Attribute Summary collapse
-
#account_id ⇒ Integer
Account ID of the customer.
-
#account_number ⇒ String
Account Number Example: GB99215176.
-
#error ⇒ ErrorStatus
The restriction condition code.
-
#reference_product ⇒ String
3 digit Shell global fuel product code, if already set up.
-
#request_id ⇒ String
Request Id of the API call.
-
#restriction_condition ⇒ String
The restriction condition code.
-
#velocity_limits ⇒ Array[AccountVelocityLimit]
The restriction condition code.
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, account_id = SKIP, account_number = SKIP, reference_product = SKIP, restriction_condition = SKIP, velocity_limits = SKIP, error = SKIP) ⇒ SearchAccountLimitResponse
constructor
A new instance of SearchAccountLimitResponse.
Methods inherited from BaseModel
Constructor Details
#initialize(request_id = SKIP, account_id = SKIP, account_number = SKIP, reference_product = SKIP, restriction_condition = SKIP, velocity_limits = SKIP, error = SKIP) ⇒ SearchAccountLimitResponse
Returns a new instance of SearchAccountLimitResponse.
78 79 80 81 82 83 84 85 86 87 88 |
# File 'lib/shell_card_management_ap_is/models/search_account_limit_response.rb', line 78 def initialize(request_id = SKIP, account_id = SKIP, account_number = SKIP, reference_product = SKIP, restriction_condition = SKIP, velocity_limits = SKIP, error = SKIP) @request_id = request_id unless request_id == SKIP @account_id = account_id unless account_id == SKIP @account_number = account_number unless account_number == SKIP @reference_product = reference_product unless reference_product == SKIP @restriction_condition = restriction_condition unless restriction_condition == SKIP @velocity_limits = velocity_limits unless velocity_limits == SKIP @error = error unless error == SKIP end |
Instance Attribute Details
#account_id ⇒ Integer
Account ID of the customer.
18 19 20 |
# File 'lib/shell_card_management_ap_is/models/search_account_limit_response.rb', line 18 def account_id @account_id end |
#account_number ⇒ String
Account Number Example: GB99215176
23 24 25 |
# File 'lib/shell_card_management_ap_is/models/search_account_limit_response.rb', line 23 def account_number @account_number end |
#error ⇒ ErrorStatus
The restriction condition code. Example: DECLINE_ALERT
43 44 45 |
# File 'lib/shell_card_management_ap_is/models/search_account_limit_response.rb', line 43 def error @error end |
#reference_product ⇒ String
3 digit Shell global fuel product code, if already set up. Example: 021
28 29 30 |
# File 'lib/shell_card_management_ap_is/models/search_account_limit_response.rb', line 28 def reference_product @reference_product end |
#request_id ⇒ String
Request Id of the API call
14 15 16 |
# File 'lib/shell_card_management_ap_is/models/search_account_limit_response.rb', line 14 def request_id @request_id end |
#restriction_condition ⇒ String
The restriction condition code. Example: DECLINE_ALERT
33 34 35 |
# File 'lib/shell_card_management_ap_is/models/search_account_limit_response.rb', line 33 def restriction_condition @restriction_condition end |
#velocity_limits ⇒ Array[AccountVelocityLimit]
The restriction condition code. Example: DECLINE_ALERT
38 39 40 |
# File 'lib/shell_card_management_ap_is/models/search_account_limit_response.rb', line 38 def velocity_limits @velocity_limits end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
91 92 93 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 |
# File 'lib/shell_card_management_ap_is/models/search_account_limit_response.rb', line 91 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. request_id = hash.key?('RequestId') ? hash['RequestId'] : SKIP account_id = hash.key?('AccountId') ? hash['AccountId'] : SKIP account_number = hash.key?('AccountNumber') ? hash['AccountNumber'] : SKIP reference_product = hash.key?('ReferenceProduct') ? hash['ReferenceProduct'] : SKIP restriction_condition = hash.key?('RestrictionCondition') ? hash['RestrictionCondition'] : SKIP # Parameter is an array, so we need to iterate through it velocity_limits = nil unless hash['VelocityLimits'].nil? velocity_limits = [] hash['VelocityLimits'].each do |structure| velocity_limits << (AccountVelocityLimit.from_hash(structure) if structure) end end velocity_limits = SKIP unless hash.key?('VelocityLimits') error = ErrorStatus.from_hash(hash['Error']) if hash['Error'] # Create object from extracted values. SearchAccountLimitResponse.new(request_id, account_id, account_number, reference_product, restriction_condition, velocity_limits, error) end |
.names ⇒ Object
A mapping from model property names to API property names.
46 47 48 49 50 51 52 53 54 55 56 |
# File 'lib/shell_card_management_ap_is/models/search_account_limit_response.rb', line 46 def self.names @_hash = {} if @_hash.nil? @_hash['request_id'] = 'RequestId' @_hash['account_id'] = 'AccountId' @_hash['account_number'] = 'AccountNumber' @_hash['reference_product'] = 'ReferenceProduct' @_hash['restriction_condition'] = 'RestrictionCondition' @_hash['velocity_limits'] = 'VelocityLimits' @_hash['error'] = 'Error' @_hash end |
.nullables ⇒ Object
An array for nullable fields
72 73 74 75 76 |
# File 'lib/shell_card_management_ap_is/models/search_account_limit_response.rb', line 72 def self.nullables %w[ request_id ] end |
.optionals ⇒ Object
An array for optional fields
59 60 61 62 63 64 65 66 67 68 69 |
# File 'lib/shell_card_management_ap_is/models/search_account_limit_response.rb', line 59 def self.optionals %w[ request_id account_id account_number reference_product restriction_condition velocity_limits error ] end |