Class: ShellCardManagementApIs::BundleRestrictionUpdate
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- ShellCardManagementApIs::BundleRestrictionUpdate
- Defined in:
- lib/shell_card_management_ap_is/models/bundle_restriction_update.rb
Overview
BundleRestrictionUpdate Model.
Instance Attribute Summary collapse
-
#day_time_restriction_profile_id ⇒ String
Identifier of the day/time restriction profile to be updated for the bundle in Gateway.
-
#day_time_restrictions ⇒ CardDayTimeRestrictions
Identifier of the day/time restriction profile to be updated for the bundle in Gateway.
-
#location_restriction_profile_id ⇒ String
Identifier of the location restriction profile to be updated for the bundle in Gateway.
-
#location_restrictions ⇒ LocationRestriction
Identifier of the location restriction profile to be updated for the bundle in Gateway.
-
#product_restrictions ⇒ Object
Identifier of the day/time restriction profile to be updated for the bundle in Gateway.
-
#reset_day_time_restriction ⇒ TrueClass | FalseClass
True/False A value indicates if the day/time restriction is to be reset for card bundle.
-
#reset_location_restriction ⇒ TrueClass | FalseClass
True/False A value indicates if the location restriction is to be reset for card bundle.
-
#reset_product_restriction ⇒ TrueClass | FalseClass
True/False A value indicates if the product restriction is to be reset for card bundle.
-
#usage_restrictions ⇒ Object
True/False A value indicates if the product restriction is to be reset for card bundle.
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(reset_day_time_restriction = SKIP, reset_location_restriction = SKIP, reset_product_restriction = SKIP, usage_restrictions = SKIP, day_time_restriction_profile_id = SKIP, day_time_restrictions = SKIP, product_restrictions = SKIP, location_restriction_profile_id = SKIP, location_restrictions = SKIP) ⇒ BundleRestrictionUpdate
constructor
A new instance of BundleRestrictionUpdate.
Methods inherited from BaseModel
Constructor Details
#initialize(reset_day_time_restriction = SKIP, reset_location_restriction = SKIP, reset_product_restriction = SKIP, usage_restrictions = SKIP, day_time_restriction_profile_id = SKIP, day_time_restrictions = SKIP, product_restrictions = SKIP, location_restriction_profile_id = SKIP, location_restrictions = SKIP) ⇒ BundleRestrictionUpdate
Returns a new instance of BundleRestrictionUpdate.
116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 |
# File 'lib/shell_card_management_ap_is/models/bundle_restriction_update.rb', line 116 def initialize(reset_day_time_restriction = SKIP, reset_location_restriction = SKIP, reset_product_restriction = SKIP, usage_restrictions = SKIP, day_time_restriction_profile_id = SKIP, day_time_restrictions = SKIP, product_restrictions = SKIP, location_restriction_profile_id = SKIP, location_restrictions = SKIP) unless reset_day_time_restriction == SKIP @reset_day_time_restriction = reset_day_time_restriction end unless reset_location_restriction == SKIP @reset_location_restriction = reset_location_restriction end unless reset_product_restriction == SKIP @reset_product_restriction = reset_product_restriction end @usage_restrictions = usage_restrictions unless usage_restrictions == SKIP unless day_time_restriction_profile_id == SKIP @day_time_restriction_profile_id = day_time_restriction_profile_id end @day_time_restrictions = day_time_restrictions unless day_time_restrictions == SKIP @product_restrictions = product_restrictions unless product_restrictions == SKIP unless location_restriction_profile_id == SKIP @location_restriction_profile_id = location_restriction_profile_id end @location_restrictions = location_restrictions unless location_restrictions == SKIP end |
Instance Attribute Details
#day_time_restriction_profile_id ⇒ String
Identifier of the day/time restriction profile to be updated for the bundle in Gateway. Optional
48 49 50 |
# File 'lib/shell_card_management_ap_is/models/bundle_restriction_update.rb', line 48 def day_time_restriction_profile_id @day_time_restriction_profile_id end |
#day_time_restrictions ⇒ CardDayTimeRestrictions
Identifier of the day/time restriction profile to be updated for the bundle in Gateway. Optional
54 55 56 |
# File 'lib/shell_card_management_ap_is/models/bundle_restriction_update.rb', line 54 def day_time_restrictions @day_time_restrictions end |
#location_restriction_profile_id ⇒ String
Identifier of the location restriction profile to be updated for the bundle in Gateway. Optional
66 67 68 |
# File 'lib/shell_card_management_ap_is/models/bundle_restriction_update.rb', line 66 def location_restriction_profile_id @location_restriction_profile_id end |
#location_restrictions ⇒ LocationRestriction
Identifier of the location restriction profile to be updated for the bundle in Gateway. Optional
72 73 74 |
# File 'lib/shell_card_management_ap_is/models/bundle_restriction_update.rb', line 72 def location_restrictions @location_restrictions end |
#product_restrictions ⇒ Object
Identifier of the day/time restriction profile to be updated for the bundle in Gateway. Optional
60 61 62 |
# File 'lib/shell_card_management_ap_is/models/bundle_restriction_update.rb', line 60 def product_restrictions @product_restrictions end |
#reset_day_time_restriction ⇒ TrueClass | FalseClass
True/False A value indicates if the day/time restriction is to be reset for card bundle. Optional Default value is False.
18 19 20 |
# File 'lib/shell_card_management_ap_is/models/bundle_restriction_update.rb', line 18 def reset_day_time_restriction @reset_day_time_restriction end |
#reset_location_restriction ⇒ TrueClass | FalseClass
True/False A value indicates if the location restriction is to be reset for card bundle. Optional Default value is False.
26 27 28 |
# File 'lib/shell_card_management_ap_is/models/bundle_restriction_update.rb', line 26 def reset_location_restriction @reset_location_restriction end |
#reset_product_restriction ⇒ TrueClass | FalseClass
True/False A value indicates if the product restriction is to be reset for card bundle. Optional Default value is False.
34 35 36 |
# File 'lib/shell_card_management_ap_is/models/bundle_restriction_update.rb', line 34 def reset_product_restriction @reset_product_restriction end |
#usage_restrictions ⇒ Object
True/False A value indicates if the product restriction is to be reset for card bundle. Optional Default value is False.
42 43 44 |
# File 'lib/shell_card_management_ap_is/models/bundle_restriction_update.rb', line 42 def usage_restrictions @usage_restrictions end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
150 151 152 153 154 155 156 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 |
# File 'lib/shell_card_management_ap_is/models/bundle_restriction_update.rb', line 150 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. reset_day_time_restriction = hash.key?('ResetDayTimeRestriction') ? hash['ResetDayTimeRestriction'] : SKIP reset_location_restriction = hash.key?('ResetLocationRestriction') ? hash['ResetLocationRestriction'] : SKIP reset_product_restriction = hash.key?('ResetProductRestriction') ? hash['ResetProductRestriction'] : SKIP usage_restrictions = hash.key?('UsageRestrictions') ? hash['UsageRestrictions'] : SKIP day_time_restriction_profile_id = hash.key?('DayTimeRestrictionProfileId') ? hash['DayTimeRestrictionProfileId'] : SKIP day_time_restrictions = CardDayTimeRestrictions.from_hash(hash['DayTimeRestrictions']) if hash['DayTimeRestrictions'] product_restrictions = hash.key?('ProductRestrictions') ? hash['ProductRestrictions'] : SKIP location_restriction_profile_id = hash.key?('LocationRestrictionProfileId') ? hash['LocationRestrictionProfileId'] : SKIP location_restrictions = LocationRestriction.from_hash(hash['LocationRestrictions']) if hash['LocationRestrictions'] # Create object from extracted values. BundleRestrictionUpdate.new(reset_day_time_restriction, reset_location_restriction, reset_product_restriction, usage_restrictions, day_time_restriction_profile_id, day_time_restrictions, product_restrictions, location_restriction_profile_id, location_restrictions) end |
.names ⇒ Object
A mapping from model property names to API property names.
75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 |
# File 'lib/shell_card_management_ap_is/models/bundle_restriction_update.rb', line 75 def self.names @_hash = {} if @_hash.nil? @_hash['reset_day_time_restriction'] = 'ResetDayTimeRestriction' @_hash['reset_location_restriction'] = 'ResetLocationRestriction' @_hash['reset_product_restriction'] = 'ResetProductRestriction' @_hash['usage_restrictions'] = 'UsageRestrictions' @_hash['day_time_restriction_profile_id'] = 'DayTimeRestrictionProfileId' @_hash['day_time_restrictions'] = 'DayTimeRestrictions' @_hash['product_restrictions'] = 'ProductRestrictions' @_hash['location_restriction_profile_id'] = 'LocationRestrictionProfileId' @_hash['location_restrictions'] = 'LocationRestrictions' @_hash end |
.nullables ⇒ Object
An array for nullable fields
107 108 109 110 111 112 113 114 |
# File 'lib/shell_card_management_ap_is/models/bundle_restriction_update.rb', line 107 def self.nullables %w[ reset_day_time_restriction reset_location_restriction reset_product_restriction day_time_restriction_profile_id ] end |
.optionals ⇒ Object
An array for optional fields
92 93 94 95 96 97 98 99 100 101 102 103 104 |
# File 'lib/shell_card_management_ap_is/models/bundle_restriction_update.rb', line 92 def self.optionals %w[ reset_day_time_restriction reset_location_restriction reset_product_restriction usage_restrictions day_time_restriction_profile_id day_time_restrictions product_restrictions location_restriction_profile_id location_restrictions ] end |