Class: ShellCardManagementApIs::AccountVelocityLimit
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- ShellCardManagementApIs::AccountVelocityLimit
- Defined in:
- lib/shell_card_management_ap_is/models/account_velocity_limit.rb
Overview
AccountVelocityLimit Model.
Instance Attribute Summary collapse
-
#accumulation ⇒ Float
The transaction accumulation during the current period with the correct number of digits after the decimal point according to the minor denomination of the currency of the card issuer (except for COUNT type velocity).
-
#balance ⇒ Float
The remaining/available balance at this point in time with the correct number of digits after the decimal point according to the minor denomination of the currency of the card issuer (except for COUNT type velocity).
-
#limit ⇒ Float
The limit associated with this velocity with the correct number of digits after the decimal point according to the minor denomination of the currency of the card issuer.
-
#override ⇒ TrueClass | FalseClass
Indicate if the limit is overridden or default.
-
#period ⇒ String
Duration of the velocity or threshold alert.
-
#product_group ⇒ String
The reference group name for product differentiated velocities.
-
#threshold ⇒ Float
The limit to trigger an alert if the balance after a transaction reaches it or below.
-
#type ⇒ String
Type of velocity (COUNT type is not present for limits of PERTRX period Possible Values: VALUE, VOLUME, COUNT.
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(type = SKIP, period = SKIP, limit = SKIP, accumulation = SKIP, balance = SKIP, override = SKIP, product_group = SKIP, threshold = SKIP) ⇒ AccountVelocityLimit
constructor
A new instance of AccountVelocityLimit.
Methods inherited from BaseModel
Constructor Details
#initialize(type = SKIP, period = SKIP, limit = SKIP, accumulation = SKIP, balance = SKIP, override = SKIP, product_group = SKIP, threshold = SKIP) ⇒ AccountVelocityLimit
Returns a new instance of AccountVelocityLimit.
99 100 101 102 103 104 105 106 107 108 109 110 |
# File 'lib/shell_card_management_ap_is/models/account_velocity_limit.rb', line 99 def initialize(type = SKIP, period = SKIP, limit = SKIP, accumulation = SKIP, balance = SKIP, override = SKIP, product_group = SKIP, threshold = SKIP) @type = type unless type == SKIP @period = period unless period == SKIP @limit = limit unless limit == SKIP @accumulation = accumulation unless accumulation == SKIP @balance = balance unless balance == SKIP @override = override unless override == SKIP @product_group = product_group unless product_group == SKIP @threshold = threshold unless threshold == SKIP end |
Instance Attribute Details
#accumulation ⇒ Float
The transaction accumulation during the current period with the correct number of digits after the decimal point according to the minor denomination of the currency of the card issuer (except for COUNT type velocity). Not present for PERTRX period. Example: 1100.55
35 36 37 |
# File 'lib/shell_card_management_ap_is/models/account_velocity_limit.rb', line 35 def accumulation @accumulation end |
#balance ⇒ Float
The remaining/available balance at this point in time with the correct number of digits after the decimal point according to the minor denomination of the currency of the card issuer (except for COUNT type velocity). Not present for PERTRX period. Example: 400.55
43 44 45 |
# File 'lib/shell_card_management_ap_is/models/account_velocity_limit.rb', line 43 def balance @balance end |
#limit ⇒ Float
The limit associated with this velocity with the correct number of digits after the decimal point according to the minor denomination of the currency of the card issuer. Example: 1500.55
27 28 29 |
# File 'lib/shell_card_management_ap_is/models/account_velocity_limit.rb', line 27 def limit @limit end |
#override ⇒ TrueClass | FalseClass
Indicate if the limit is overridden or default. (false for default). Example: false
48 49 50 |
# File 'lib/shell_card_management_ap_is/models/account_velocity_limit.rb', line 48 def override @override end |
#period ⇒ String
Duration of the velocity or threshold alert. Possible Values: DAILY, WEEKLY, MONTHLY, ANNUAL, LIFETIME, PERTRX
20 21 22 |
# File 'lib/shell_card_management_ap_is/models/account_velocity_limit.rb', line 20 def period @period end |
#product_group ⇒ String
The reference group name for product differentiated velocities. This field cannot be used with Volume type velocity. Example: RoadSvc This is an optional output field.
55 56 57 |
# File 'lib/shell_card_management_ap_is/models/account_velocity_limit.rb', line 55 def product_group @product_group end |
#threshold ⇒ Float
The limit to trigger an alert if the balance after a transaction reaches it or below. 0 indicates no alerts will be sent. Not present if not set (issuer value threshold limit applies if available). Not present for COUNT type velocity. Example: 50.55 This is an optional output field.
64 65 66 |
# File 'lib/shell_card_management_ap_is/models/account_velocity_limit.rb', line 64 def threshold @threshold end |
#type ⇒ String
Type of velocity (COUNT type is not present for limits of PERTRX period Possible Values: VALUE, VOLUME, COUNT
15 16 17 |
# File 'lib/shell_card_management_ap_is/models/account_velocity_limit.rb', line 15 def type @type end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 |
# File 'lib/shell_card_management_ap_is/models/account_velocity_limit.rb', line 113 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. type = hash.key?('Type') ? hash['Type'] : SKIP period = hash.key?('Period') ? hash['Period'] : SKIP limit = hash.key?('Limit') ? hash['Limit'] : SKIP accumulation = hash.key?('Accumulation') ? hash['Accumulation'] : SKIP balance = hash.key?('Balance') ? hash['Balance'] : SKIP override = hash.key?('Override') ? hash['Override'] : SKIP product_group = hash.key?('ProductGroup') ? hash['ProductGroup'] : SKIP threshold = hash.key?('Threshold') ? hash['Threshold'] : SKIP # Create object from extracted values. AccountVelocityLimit.new(type, period, limit, accumulation, balance, override, product_group, threshold) end |
.names ⇒ Object
A mapping from model property names to API property names.
67 68 69 70 71 72 73 74 75 76 77 78 |
# File 'lib/shell_card_management_ap_is/models/account_velocity_limit.rb', line 67 def self.names @_hash = {} if @_hash.nil? @_hash['type'] = 'Type' @_hash['period'] = 'Period' @_hash['limit'] = 'Limit' @_hash['accumulation'] = 'Accumulation' @_hash['balance'] = 'Balance' @_hash['override'] = 'Override' @_hash['product_group'] = 'ProductGroup' @_hash['threshold'] = 'Threshold' @_hash end |
.nullables ⇒ Object
An array for nullable fields
95 96 97 |
# File 'lib/shell_card_management_ap_is/models/account_velocity_limit.rb', line 95 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
81 82 83 84 85 86 87 88 89 90 91 92 |
# File 'lib/shell_card_management_ap_is/models/account_velocity_limit.rb', line 81 def self.optionals %w[ type period limit accumulation balance override product_group threshold ] end |