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.
-
#payer_id ⇒ Integer
Payer Id of the bundles and cards.
-
#payer_number ⇒ String
Payer Number of the bundles and cards.
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(payer_id = SKIP, payer_number = SKIP, account_id = SKIP, account_number = SKIP, count_of_cards_not_in_bundle = SKIP, card_bundles = SKIP) ⇒ SummaryofbundleResponse
constructor
A new instance of SummaryofbundleResponse.
-
#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(payer_id = SKIP, payer_number = SKIP, account_id = SKIP, account_number = SKIP, count_of_cards_not_in_bundle = SKIP, card_bundles = SKIP) ⇒ SummaryofbundleResponse
Returns a new instance of SummaryofbundleResponse.
69 70 71 72 73 74 75 76 77 78 79 80 81 |
# File 'lib/shell_card_management_ap_is/models/summaryofbundle_response.rb', line 69 def initialize(payer_id = SKIP, payer_number = SKIP, account_id = SKIP, account_number = SKIP, count_of_cards_not_in_bundle = SKIP, card_bundles = 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 end |
Instance Attribute Details
#account_id ⇒ Integer
Payer Number of the bundles and cards. Example: GB000000123
25 26 27 |
# File 'lib/shell_card_management_ap_is/models/summaryofbundle_response.rb', line 25 def account_id @account_id end |
#account_number ⇒ String
Account Number of the bundle. Example: GB000000123
30 31 32 |
# File 'lib/shell_card_management_ap_is/models/summaryofbundle_response.rb', line 30 def account_number @account_number end |
#card_bundles ⇒ CardBundle
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 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.
34 35 36 |
# File 'lib/shell_card_management_ap_is/models/summaryofbundle_response.rb', line 34 def count_of_cards_not_in_bundle @count_of_cards_not_in_bundle end |
#payer_id ⇒ Integer
Payer Id of the bundles and cards. Example: 123456
15 16 17 |
# File 'lib/shell_card_management_ap_is/models/summaryofbundle_response.rb', line 15 def payer_id @payer_id end |
#payer_number ⇒ String
Payer Number of the bundles and cards. Example: GB000000123
20 21 22 |
# File 'lib/shell_card_management_ap_is/models/summaryofbundle_response.rb', line 20 def payer_number @payer_number end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 |
# File 'lib/shell_card_management_ap_is/models/summaryofbundle_response.rb', line 84 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. 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'] # Create object from extracted values. SummaryofbundleResponse.new(payer_id, payer_number, account_id, account_number, count_of_cards_not_in_bundle, card_bundles) 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/summaryofbundle_response.rb', line 41 def self.names @_hash = {} if @_hash.nil? @_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 end |
.nullables ⇒ Object
An array for nullable fields
65 66 67 |
# File 'lib/shell_card_management_ap_is/models/summaryofbundle_response.rb', line 65 def self.nullables [] 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/summaryofbundle_response.rb', line 53 def self.optionals %w[ payer_id payer_number account_id account_number count_of_cards_not_in_bundle card_bundles ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
114 115 116 117 118 119 120 |
# File 'lib/shell_card_management_ap_is/models/summaryofbundle_response.rb', line 114 def inspect class_name = self.class.name.split('::').last "<#{class_name} payer_id: #{@payer_id.inspect}, payer_number: #{@payer_number.inspect},"\ " account_id: #{@account_id.inspect}, account_number: #{@account_number.inspect},"\ " count_of_cards_not_in_bundle: #{@count_of_cards_not_in_bundle.inspect}, card_bundles:"\ " #{@card_bundles.inspect}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
106 107 108 109 110 111 |
# File 'lib/shell_card_management_ap_is/models/summaryofbundle_response.rb', line 106 def to_s class_name = self.class.name.split('::').last "<#{class_name} payer_id: #{@payer_id}, payer_number: #{@payer_number}, account_id:"\ " #{@account_id}, account_number: #{@account_number}, count_of_cards_not_in_bundle:"\ " #{@count_of_cards_not_in_bundle}, card_bundles: #{@card_bundles}>" end |