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.
-
#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) ⇒ SearchAccountLimitResponse
constructor
A new instance of SearchAccountLimitResponse.
-
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
-
#to_s ⇒ Object
Provides a human-readable string representation of the object.
Methods inherited from BaseModel
#check_for_conflict, #process_additional_properties, #process_array, #process_basic_value, #process_hash, #to_hash, #to_json
Constructor Details
#initialize(request_id = SKIP, account_id = SKIP, account_number = SKIP, reference_product = SKIP, restriction_condition = SKIP, velocity_limits = SKIP) ⇒ SearchAccountLimitResponse
Returns a new instance of SearchAccountLimitResponse.
71 72 73 74 75 76 77 78 79 80 |
# File 'lib/shell_card_management_ap_is/models/search_account_limit_response.rb', line 71 def initialize(request_id = SKIP, account_id = SKIP, account_number = SKIP, reference_product = SKIP, restriction_condition = SKIP, velocity_limits = 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 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 |
#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.
83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 |
# File 'lib/shell_card_management_ap_is/models/search_account_limit_response.rb', line 83 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') # Create object from extracted values. SearchAccountLimitResponse.new(request_id, account_id, account_number, reference_product, restriction_condition, velocity_limits) end |
.names ⇒ Object
A mapping from model property names to API property names.
41 42 43 44 45 46 47 48 49 50 |
# File 'lib/shell_card_management_ap_is/models/search_account_limit_response.rb', line 41 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 end |
.nullables ⇒ Object
An array for nullable fields
65 66 67 68 69 |
# File 'lib/shell_card_management_ap_is/models/search_account_limit_response.rb', line 65 def self.nullables %w[ request_id ] end |
.optionals ⇒ Object
An array for optional fields
53 54 55 56 57 58 59 60 61 62 |
# File 'lib/shell_card_management_ap_is/models/search_account_limit_response.rb', line 53 def self.optionals %w[ request_id account_id account_number reference_product restriction_condition velocity_limits ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
123 124 125 126 127 128 129 |
# File 'lib/shell_card_management_ap_is/models/search_account_limit_response.rb', line 123 def inspect class_name = self.class.name.split('::').last "<#{class_name} request_id: #{@request_id.inspect}, account_id: #{@account_id.inspect},"\ " account_number: #{@account_number.inspect}, reference_product:"\ " #{@reference_product.inspect}, restriction_condition: #{@restriction_condition.inspect},"\ " velocity_limits: #{@velocity_limits.inspect}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
115 116 117 118 119 120 |
# File 'lib/shell_card_management_ap_is/models/search_account_limit_response.rb', line 115 def to_s class_name = self.class.name.split('::').last "<#{class_name} request_id: #{@request_id}, account_id: #{@account_id}, account_number:"\ " #{@account_number}, reference_product: #{@reference_product}, restriction_condition:"\ " #{@restriction_condition}, velocity_limits: #{@velocity_limits}>" end |