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(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,
                = SKIP,  = 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 =  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
  @error = error unless error == SKIP
end

Instance Attribute Details

#account_idInteger

Payer Number of the bundles and cards. Example: GB000000123

Returns:

  • (Integer)


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

def 
  @account_id
end

#account_numberString

Account Number of the bundle. Example: GB000000123

Returns:

  • (String)


34
35
36
# File 'lib/shell_card_management_ap_is/models/summaryofbundle_response.rb', line 34

def 
  @account_number
end

#card_bundlesCardBundle

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

Returns:



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_bundleInteger

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

Returns:

  • (Integer)


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

#errorErrorStatus

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

Returns:



46
47
48
# File 'lib/shell_card_management_ap_is/models/summaryofbundle_response.rb', line 46

def error
  @error
end

#payer_idInteger

Payer Id of the bundles and cards. Example: 123456

Returns:

  • (Integer)


19
20
21
# File 'lib/shell_card_management_ap_is/models/summaryofbundle_response.rb', line 19

def payer_id
  @payer_id
end

#payer_numberString

Payer Number of the bundles and cards. Example: GB000000123

Returns:

  • (String)


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

def payer_number
  @payer_number
end

#request_idString

Request Id of the API call

Returns:

  • (String)


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
   = 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']
  error = ErrorStatus.from_hash(hash['Error']) if hash['Error']

  # Create object from extracted values.

  SummaryofbundleResponse.new(request_id,
                              payer_id,
                              payer_number,
                              ,
                              ,
                              count_of_cards_not_in_bundle,
                              card_bundles,
                              error)
end

.namesObject

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

.nullablesObject

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

.optionalsObject

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