Class: ShellCardManagementApIs::CreateBundleResponse
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- ShellCardManagementApIs::CreateBundleResponse
- Defined in:
- lib/shell_card_management_ap_is/models/create_bundle_response.rb
Overview
CreateBundleResponse Model.
Instance Attribute Summary collapse
-
#bundle_creation_status ⇒ ErrorStatus
Request Id of the API call.
-
#bundle_id ⇒ String
Identifier of the newly created bundle.
-
#cards ⇒ BundleCardRestrictionStatus
Identifier of the location restriction profile created.
-
#day_time_restriction_profile_id ⇒ String
Identifier of the day/time restriction profile created.
-
#day_time_restriction_status ⇒ ErrorStatus
Identifier of the newly created bundle.
-
#error ⇒ ErrorStatus
Identifier of the location restriction profile created.
-
#location_restriction_profile_id ⇒ String
Identifier of the location restriction profile created.
-
#location_restriction_status ⇒ ErrorStatus
Identifier of the day/time restriction profile created.
-
#product_restriction_status ⇒ ErrorStatus
Identifier of the location restriction profile created.
-
#request_id ⇒ String
Request Id of the API call.
-
#usage_restriction_status ⇒ ErrorStatus
Identifier of the location restriction profile created.
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, bundle_creation_status = SKIP, bundle_id = SKIP, day_time_restriction_status = SKIP, day_time_restriction_profile_id = SKIP, location_restriction_status = SKIP, location_restriction_profile_id = SKIP, usage_restriction_status = SKIP, product_restriction_status = SKIP, cards = SKIP, error = SKIP) ⇒ CreateBundleResponse
constructor
A new instance of CreateBundleResponse.
Methods inherited from BaseModel
Constructor Details
#initialize(request_id = SKIP, bundle_creation_status = SKIP, bundle_id = SKIP, day_time_restriction_status = SKIP, day_time_restriction_profile_id = SKIP, location_restriction_status = SKIP, location_restriction_profile_id = SKIP, usage_restriction_status = SKIP, product_restriction_status = SKIP, cards = SKIP, error = SKIP) ⇒ CreateBundleResponse
Returns a new instance of CreateBundleResponse.
99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 |
# File 'lib/shell_card_management_ap_is/models/create_bundle_response.rb', line 99 def initialize(request_id = SKIP, bundle_creation_status = SKIP, bundle_id = SKIP, day_time_restriction_status = SKIP, day_time_restriction_profile_id = SKIP, location_restriction_status = SKIP, location_restriction_profile_id = SKIP, usage_restriction_status = SKIP, product_restriction_status = SKIP, cards = SKIP, error = SKIP) @request_id = request_id unless request_id == SKIP @bundle_creation_status = bundle_creation_status unless bundle_creation_status == SKIP @bundle_id = bundle_id unless bundle_id == SKIP unless day_time_restriction_status == SKIP @day_time_restriction_status = day_time_restriction_status end unless day_time_restriction_profile_id == SKIP @day_time_restriction_profile_id = day_time_restriction_profile_id end unless location_restriction_status == SKIP @location_restriction_status = location_restriction_status end unless location_restriction_profile_id == SKIP @location_restriction_profile_id = location_restriction_profile_id end @usage_restriction_status = usage_restriction_status unless usage_restriction_status == SKIP unless product_restriction_status == SKIP @product_restriction_status = product_restriction_status end @cards = cards unless cards == SKIP @error = error unless error == SKIP end |
Instance Attribute Details
#bundle_creation_status ⇒ ErrorStatus
Request Id of the API call
18 19 20 |
# File 'lib/shell_card_management_ap_is/models/create_bundle_response.rb', line 18 def bundle_creation_status @bundle_creation_status end |
#bundle_id ⇒ String
Identifier of the newly created bundle
22 23 24 |
# File 'lib/shell_card_management_ap_is/models/create_bundle_response.rb', line 22 def bundle_id @bundle_id end |
#cards ⇒ BundleCardRestrictionStatus
Identifier of the location restriction profile created
50 51 52 |
# File 'lib/shell_card_management_ap_is/models/create_bundle_response.rb', line 50 def cards @cards end |
#day_time_restriction_profile_id ⇒ String
Identifier of the day/time restriction profile created
30 31 32 |
# File 'lib/shell_card_management_ap_is/models/create_bundle_response.rb', line 30 def day_time_restriction_profile_id @day_time_restriction_profile_id end |
#day_time_restriction_status ⇒ ErrorStatus
Identifier of the newly created bundle
26 27 28 |
# File 'lib/shell_card_management_ap_is/models/create_bundle_response.rb', line 26 def day_time_restriction_status @day_time_restriction_status end |
#error ⇒ ErrorStatus
Identifier of the location restriction profile created
54 55 56 |
# File 'lib/shell_card_management_ap_is/models/create_bundle_response.rb', line 54 def error @error end |
#location_restriction_profile_id ⇒ String
Identifier of the location restriction profile created
38 39 40 |
# File 'lib/shell_card_management_ap_is/models/create_bundle_response.rb', line 38 def location_restriction_profile_id @location_restriction_profile_id end |
#location_restriction_status ⇒ ErrorStatus
Identifier of the day/time restriction profile created
34 35 36 |
# File 'lib/shell_card_management_ap_is/models/create_bundle_response.rb', line 34 def location_restriction_status @location_restriction_status end |
#product_restriction_status ⇒ ErrorStatus
Identifier of the location restriction profile created
46 47 48 |
# File 'lib/shell_card_management_ap_is/models/create_bundle_response.rb', line 46 def product_restriction_status @product_restriction_status end |
#request_id ⇒ String
Request Id of the API call
14 15 16 |
# File 'lib/shell_card_management_ap_is/models/create_bundle_response.rb', line 14 def request_id @request_id end |
#usage_restriction_status ⇒ ErrorStatus
Identifier of the location restriction profile created
42 43 44 |
# File 'lib/shell_card_management_ap_is/models/create_bundle_response.rb', line 42 def usage_restriction_status @usage_restriction_status end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 |
# File 'lib/shell_card_management_ap_is/models/create_bundle_response.rb', line 136 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. request_id = hash.key?('RequestId') ? hash['RequestId'] : SKIP bundle_creation_status = ErrorStatus.from_hash(hash['BundleCreationStatus']) if hash['BundleCreationStatus'] bundle_id = hash.key?('BundleId') ? hash['BundleId'] : SKIP day_time_restriction_status = ErrorStatus.from_hash(hash['DayTimeRestrictionStatus']) if hash['DayTimeRestrictionStatus'] day_time_restriction_profile_id = hash.key?('DayTimeRestrictionProfileId') ? hash['DayTimeRestrictionProfileId'] : SKIP location_restriction_status = ErrorStatus.from_hash(hash['LocationRestrictionStatus']) if hash['LocationRestrictionStatus'] location_restriction_profile_id = hash.key?('LocationRestrictionProfileId') ? hash['LocationRestrictionProfileId'] : SKIP usage_restriction_status = ErrorStatus.from_hash(hash['UsageRestrictionStatus']) if hash['UsageRestrictionStatus'] product_restriction_status = ErrorStatus.from_hash(hash['ProductRestrictionStatus']) if hash['ProductRestrictionStatus'] cards = BundleCardRestrictionStatus.from_hash(hash['Cards']) if hash['Cards'] error = ErrorStatus.from_hash(hash['Error']) if hash['Error'] # Create object from extracted values. CreateBundleResponse.new(request_id, bundle_creation_status, bundle_id, day_time_restriction_status, day_time_restriction_profile_id, location_restriction_status, location_restriction_profile_id, usage_restriction_status, product_restriction_status, cards, error) end |
.names ⇒ Object
A mapping from model property names to API property names.
57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 |
# File 'lib/shell_card_management_ap_is/models/create_bundle_response.rb', line 57 def self.names @_hash = {} if @_hash.nil? @_hash['request_id'] = 'RequestId' @_hash['bundle_creation_status'] = 'BundleCreationStatus' @_hash['bundle_id'] = 'BundleId' @_hash['day_time_restriction_status'] = 'DayTimeRestrictionStatus' @_hash['day_time_restriction_profile_id'] = 'DayTimeRestrictionProfileId' @_hash['location_restriction_status'] = 'LocationRestrictionStatus' @_hash['location_restriction_profile_id'] = 'LocationRestrictionProfileId' @_hash['usage_restriction_status'] = 'UsageRestrictionStatus' @_hash['product_restriction_status'] = 'ProductRestrictionStatus' @_hash['cards'] = 'Cards' @_hash['error'] = 'Error' @_hash end |
.nullables ⇒ Object
An array for nullable fields
93 94 95 96 97 |
# File 'lib/shell_card_management_ap_is/models/create_bundle_response.rb', line 93 def self.nullables %w[ request_id ] end |
.optionals ⇒ Object
An array for optional fields
76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 |
# File 'lib/shell_card_management_ap_is/models/create_bundle_response.rb', line 76 def self.optionals %w[ request_id bundle_creation_status bundle_id day_time_restriction_status day_time_restriction_profile_id location_restriction_status location_restriction_profile_id usage_restriction_status product_restriction_status cards error ] end |