Class: ShellCardManagementApIs::SummaryofbundleResponse
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- ShellCardManagementApIs::SummaryofbundleResponse
- Defined in:
- lib/shell_card_management_ap_is/models/summaryofbundle_response.rb
Overview
SummaryofbundleResponse Model.
Instance Attribute Summary collapse
-
#account_id ⇒ Integer
Payer Number of the bundles and cards.
-
#account_number ⇒ String
Account Number of the bundle.
-
#card_bundles ⇒ CardBundle
Count of cards that are not part of the bundle in a given account.
-
#count_of_cards_not_in_bundle ⇒ Integer
Count of cards that are not part of the bundle in a given account.
-
#error ⇒ ErrorStatus
Count of cards that are not part of the bundle in a given account.
-
#payer_id ⇒ Integer
Payer Id of the bundles and cards.
-
#payer_number ⇒ String
Payer Number of the bundles and cards.
-
#request_id ⇒ String
Request Id of the API call.
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, payer_id = SKIP, payer_number = SKIP, account_id = SKIP, account_number = SKIP, count_of_cards_not_in_bundle = SKIP, card_bundles = SKIP, error = SKIP) ⇒ SummaryofbundleResponse
constructor
A new instance of SummaryofbundleResponse.
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, payer_id = SKIP, payer_number = SKIP, account_id = SKIP, account_number = SKIP, count_of_cards_not_in_bundle = SKIP, card_bundles = SKIP, error = SKIP) ⇒ SummaryofbundleResponse
Returns a new instance of SummaryofbundleResponse.
83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 |
# File 'lib/shell_card_management_ap_is/models/summaryofbundle_response.rb', line 83 def initialize(request_id = SKIP, payer_id = SKIP, payer_number = SKIP, account_id = SKIP, account_number = SKIP, count_of_cards_not_in_bundle = SKIP, card_bundles = SKIP, error = SKIP) @request_id = request_id unless request_id == SKIP @payer_id = payer_id unless payer_id == SKIP @payer_number = payer_number unless payer_number == SKIP @account_id = account_id unless account_id == SKIP @account_number = account_number unless account_number == SKIP unless count_of_cards_not_in_bundle == SKIP @count_of_cards_not_in_bundle = count_of_cards_not_in_bundle end @card_bundles = card_bundles unless card_bundles == SKIP @error = error unless error == SKIP end |
Instance Attribute Details
#account_id ⇒ Integer
Payer Number of the bundles and cards. Example: GB000000123
29 30 31 |
# File 'lib/shell_card_management_ap_is/models/summaryofbundle_response.rb', line 29 def account_id @account_id end |
#account_number ⇒ String
Account Number of the bundle. Example: GB000000123
34 35 36 |
# File 'lib/shell_card_management_ap_is/models/summaryofbundle_response.rb', line 34 def account_number @account_number end |
#card_bundles ⇒ CardBundle
Count of cards that are not part of the bundle in a given account.
42 43 44 |
# File 'lib/shell_card_management_ap_is/models/summaryofbundle_response.rb', line 42 def card_bundles @card_bundles end |
#count_of_cards_not_in_bundle ⇒ Integer
Count of cards that are not part of the bundle in a given account.
38 39 40 |
# File 'lib/shell_card_management_ap_is/models/summaryofbundle_response.rb', line 38 def count_of_cards_not_in_bundle @count_of_cards_not_in_bundle end |
#error ⇒ ErrorStatus
Count of cards that are not part of the bundle in a given account.
46 47 48 |
# File 'lib/shell_card_management_ap_is/models/summaryofbundle_response.rb', line 46 def error @error end |
#payer_id ⇒ Integer
Payer Id of the bundles and cards. Example: 123456
19 20 21 |
# File 'lib/shell_card_management_ap_is/models/summaryofbundle_response.rb', line 19 def payer_id @payer_id end |
#payer_number ⇒ String
Payer Number of the bundles and cards. Example: GB000000123
24 25 26 |
# File 'lib/shell_card_management_ap_is/models/summaryofbundle_response.rb', line 24 def payer_number @payer_number end |
#request_id ⇒ String
Request Id of the API call
14 15 16 |
# File 'lib/shell_card_management_ap_is/models/summaryofbundle_response.rb', line 14 def request_id @request_id end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 |
# File 'lib/shell_card_management_ap_is/models/summaryofbundle_response.rb', line 101 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. request_id = hash.key?('RequestId') ? hash['RequestId'] : SKIP payer_id = hash.key?('PayerId') ? hash['PayerId'] : SKIP payer_number = hash.key?('PayerNumber') ? hash['PayerNumber'] : SKIP account_id = hash.key?('AccountId') ? hash['AccountId'] : SKIP account_number = hash.key?('AccountNumber') ? hash['AccountNumber'] : SKIP count_of_cards_not_in_bundle = hash.key?('CountOfCardsNotInBundle') ? hash['CountOfCardsNotInBundle'] : SKIP card_bundles = CardBundle.from_hash(hash['CardBundles']) if hash['CardBundles'] error = ErrorStatus.from_hash(hash['Error']) if hash['Error'] # Create object from extracted values. SummaryofbundleResponse.new(request_id, payer_id, payer_number, account_id, account_number, count_of_cards_not_in_bundle, card_bundles, error) end |
.names ⇒ Object
A mapping from model property names to API property names.
49 50 51 52 53 54 55 56 57 58 59 60 |
# File 'lib/shell_card_management_ap_is/models/summaryofbundle_response.rb', line 49 def self.names @_hash = {} if @_hash.nil? @_hash['request_id'] = 'RequestId' @_hash['payer_id'] = 'PayerId' @_hash['payer_number'] = 'PayerNumber' @_hash['account_id'] = 'AccountId' @_hash['account_number'] = 'AccountNumber' @_hash['count_of_cards_not_in_bundle'] = 'CountOfCardsNotInBundle' @_hash['card_bundles'] = 'CardBundles' @_hash['error'] = 'Error' @_hash end |
.nullables ⇒ Object
An array for nullable fields
77 78 79 80 81 |
# File 'lib/shell_card_management_ap_is/models/summaryofbundle_response.rb', line 77 def self.nullables %w[ request_id ] end |
.optionals ⇒ Object
An array for optional fields
63 64 65 66 67 68 69 70 71 72 73 74 |
# File 'lib/shell_card_management_ap_is/models/summaryofbundle_response.rb', line 63 def self.optionals %w[ request_id payer_id payer_number account_id account_number count_of_cards_not_in_bundle card_bundles error ] end |