Class: ShellCardManagementApIs::SummaryofbundleResponse

Inherits:
BaseModel
  • Object
show all
Defined in:
lib/shell_card_management_ap_is/models/summaryofbundle_response.rb

Overview

SummaryofbundleResponse Model.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

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,  = SKIP,
                = 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 =  unless  == SKIP
  @account_number =  unless  == 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_idInteger

Payer Number of the bundles and cards. Example: GB000000123

Returns:

  • (Integer)


25
26
27
# File 'lib/shell_card_management_ap_is/models/summaryofbundle_response.rb', line 25

def 
  @account_id
end

#account_numberString

Account Number of the bundle. Example: GB000000123

Returns:

  • (String)


30
31
32
# File 'lib/shell_card_management_ap_is/models/summaryofbundle_response.rb', line 30

def 
  @account_number
end

#card_bundlesCardBundle

Count of cards that are not part of the bundle in a given account.

Returns:



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_bundleInteger

Count of cards that are not part of the bundle in a given account.

Returns:

  • (Integer)


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_idInteger

Payer Id of the bundles and cards. Example: 123456

Returns:

  • (Integer)


15
16
17
# File 'lib/shell_card_management_ap_is/models/summaryofbundle_response.rb', line 15

def payer_id
  @payer_id
end

#payer_numberString

Payer Number of the bundles and cards. Example: GB000000123

Returns:

  • (String)


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
   = hash.key?('AccountId') ? hash['AccountId'] : SKIP
   = 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,
                              ,
                              ,
                              count_of_cards_not_in_bundle,
                              card_bundles)
end

.namesObject

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

.nullablesObject

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

.optionalsObject

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

#inspectObject

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_sObject

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