Class: ShellCardManagementApIs::BundleDetailsResponse

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

Overview

BundleDetailsResponse Model.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from BaseModel

#to_hash, #to_json

Constructor Details

#initialize(payer_id = SKIP, payer_number = SKIP, account_id = SKIP, account_number = SKIP, bundle_id = SKIP, external_bundle_id = SKIP, description = SKIP, pans = SKIP, restriction_currency_code = SKIP, restriction_currency_symbol = SKIP, restrictions = SKIP, error = SKIP, request_id = SKIP) ⇒ BundleDetailsResponse

Returns a new instance of BundleDetailsResponse.



115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
# File 'lib/shell_card_management_ap_is/models/bundle_details_response.rb', line 115

def initialize(payer_id = SKIP, payer_number = SKIP,  = SKIP,
                = SKIP, bundle_id = SKIP,
               external_bundle_id = SKIP, description = SKIP, pans = SKIP,
               restriction_currency_code = SKIP,
               restriction_currency_symbol = SKIP, restrictions = SKIP,
               error = SKIP, 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
  @bundle_id = bundle_id unless bundle_id == SKIP
  @external_bundle_id = external_bundle_id unless external_bundle_id == SKIP
  @description = description unless description == SKIP
  @pans = pans unless pans == SKIP
  unless restriction_currency_code == SKIP
    @restriction_currency_code =
      restriction_currency_code
  end
  unless restriction_currency_symbol == SKIP
    @restriction_currency_symbol =
      restriction_currency_symbol
  end
  @restrictions = restrictions unless restrictions == SKIP
  @error = error unless error == SKIP
  @request_id = request_id unless request_id == SKIP
end

Instance Attribute Details

#account_idInteger

Account ID of the bundle. Example: 123456

Returns:

  • (Integer)


25
26
27
# File 'lib/shell_card_management_ap_is/models/bundle_details_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/bundle_details_response.rb', line 30

def 
  @account_number
end

#bundle_idString

unique identifier for the Card Bundle

Returns:

  • (String)


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

def bundle_id
  @bundle_id
end

#descriptionString

Card Bundle Description.

Returns:

  • (String)


42
43
44
# File 'lib/shell_card_management_ap_is/models/bundle_details_response.rb', line 42

def description
  @description
end

#errorErrorStatus

Currency symbol of the country. Example: £, $

Returns:



66
67
68
# File 'lib/shell_card_management_ap_is/models/bundle_details_response.rb', line 66

def error
  @error
end

#external_bundle_idString

External system allocated Card Bundle identifier for Card Bundle.

Returns:

  • (String)


38
39
40
# File 'lib/shell_card_management_ap_is/models/bundle_details_response.rb', line 38

def external_bundle_id
  @external_bundle_id
end

#pansArray[String]

List of Card Pans added to the card bundle.

Returns:

  • (Array[String])


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

def pans
  @pans
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/bundle_details_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/bundle_details_response.rb', line 20

def payer_number
  @payer_number
end

#request_idString

API Request Id

Returns:

  • (String)


70
71
72
# File 'lib/shell_card_management_ap_is/models/bundle_details_response.rb', line 70

def request_id
  @request_id
end

#restriction_currency_codeString

ISO currency code of the country. Example: GBP

Returns:

  • (String)


51
52
53
# File 'lib/shell_card_management_ap_is/models/bundle_details_response.rb', line 51

def restriction_currency_code
  @restriction_currency_code
end

#restriction_currency_symbolString

Currency symbol of the country. Example: £, $

Returns:

  • (String)


56
57
58
# File 'lib/shell_card_management_ap_is/models/bundle_details_response.rb', line 56

def restriction_currency_symbol
  @restriction_currency_symbol
end

#restrictionsBundledRestrictionsList

Currency symbol of the country. Example: £, $



61
62
63
# File 'lib/shell_card_management_ap_is/models/bundle_details_response.rb', line 61

def restrictions
  @restrictions
end

Class Method Details

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



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
172
173
174
175
176
177
178
179
# File 'lib/shell_card_management_ap_is/models/bundle_details_response.rb', line 143

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
  bundle_id = hash.key?('BundleId') ? hash['BundleId'] : SKIP
  external_bundle_id =
    hash.key?('ExternalBundleId') ? hash['ExternalBundleId'] : SKIP
  description = hash.key?('Description') ? hash['Description'] : SKIP
  pans = hash.key?('Pans') ? hash['Pans'] : SKIP
  restriction_currency_code =
    hash.key?('RestrictionCurrencyCode') ? hash['RestrictionCurrencyCode'] : SKIP
  restriction_currency_symbol =
    hash.key?('RestrictionCurrencySymbol') ? hash['RestrictionCurrencySymbol'] : SKIP
  restrictions = BundledRestrictionsList.from_hash(hash['Restrictions']) if
    hash['Restrictions']
  error = ErrorStatus.from_hash(hash['Error']) if hash['Error']
  request_id = hash.key?('RequestId') ? hash['RequestId'] : SKIP

  # Create object from extracted values.
  BundleDetailsResponse.new(payer_id,
                            payer_number,
                            ,
                            ,
                            bundle_id,
                            external_bundle_id,
                            description,
                            pans,
                            restriction_currency_code,
                            restriction_currency_symbol,
                            restrictions,
                            error,
                            request_id)
end

.namesObject

A mapping from model property names to API property names.



73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
# File 'lib/shell_card_management_ap_is/models/bundle_details_response.rb', line 73

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['payer_id'] = 'PayerId'
  @_hash['payer_number'] = 'PayerNumber'
  @_hash['account_id'] = 'AccountId'
  @_hash['account_number'] = 'AccountNumber'
  @_hash['bundle_id'] = 'BundleId'
  @_hash['external_bundle_id'] = 'ExternalBundleId'
  @_hash['description'] = 'Description'
  @_hash['pans'] = 'Pans'
  @_hash['restriction_currency_code'] = 'RestrictionCurrencyCode'
  @_hash['restriction_currency_symbol'] = 'RestrictionCurrencySymbol'
  @_hash['restrictions'] = 'Restrictions'
  @_hash['error'] = 'Error'
  @_hash['request_id'] = 'RequestId'
  @_hash
end

.nullablesObject

An array for nullable fields



111
112
113
# File 'lib/shell_card_management_ap_is/models/bundle_details_response.rb', line 111

def self.nullables
  []
end

.optionalsObject

An array for optional fields



92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
# File 'lib/shell_card_management_ap_is/models/bundle_details_response.rb', line 92

def self.optionals
  %w[
    payer_id
    payer_number
    account_id
    account_number
    bundle_id
    external_bundle_id
    description
    pans
    restriction_currency_code
    restriction_currency_symbol
    restrictions
    error
    request_id
  ]
end