Class: ShellCardManagementApIs::SearchCardRestrictionReq

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

Overview

SearchCardRestrictionReq Model.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from BaseModel

#to_hash, #to_json

Constructor Details

#initialize(col_co_id = SKIP, col_co_code = SKIP, payer_id = SKIP, payer_number = SKIP, accounts = SKIP, bundle_id = SKIP, cards = SKIP, include_location_restrictions = SKIP, include_bundle_details = SKIP, include_inherited_limits = SKIP) ⇒ SearchCardRestrictionReq

Returns a new instance of SearchCardRestrictionReq.



126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
# File 'lib/shell_card_management_ap_is/models/search_card_restriction_req.rb', line 126

def initialize(col_co_id = SKIP, col_co_code = SKIP, payer_id = SKIP,
               payer_number = SKIP, accounts = SKIP, bundle_id = SKIP,
               cards = SKIP, include_location_restrictions = SKIP,
               include_bundle_details = SKIP,
               include_inherited_limits = SKIP)
  @col_co_id = col_co_id unless col_co_id == SKIP
  @col_co_code = col_co_code unless col_co_code == SKIP
  @payer_id = payer_id unless payer_id == SKIP
  @payer_number = payer_number unless payer_number == SKIP
  @accounts = accounts unless accounts == SKIP
  @bundle_id = bundle_id unless bundle_id == SKIP
  @cards = cards unless cards == SKIP
  unless include_location_restrictions == SKIP
    @include_location_restrictions =
      include_location_restrictions
  end
  @include_bundle_details = include_bundle_details unless include_bundle_details == SKIP
  @include_inherited_limits = include_inherited_limits unless include_inherited_limits == SKIP
end

Instance Attribute Details

#accountsAccounts

Payer Number of the selected payer. Optional if PayerId is passed else Mandatory Example: GB000000123

Returns:



45
46
47
# File 'lib/shell_card_management_ap_is/models/search_card_restriction_req.rb', line 45

def accounts
  @accounts
end

#bundle_idString

Identifier of the Card bundle Optional if cards list is given, else mandatory. This input is a search criterion, if given.

Returns:

  • (String)


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

def bundle_id
  @bundle_id
end

#cardsSearchCardRestriction

Identifier of the Card bundle Optional if cards list is given, else mandatory. This input is a search criterion, if given.



57
58
59
# File 'lib/shell_card_management_ap_is/models/search_card_restriction_req.rb', line 57

def cards
  @cards
end

#col_co_codeInteger

Collecting Company Code (Shell Code) of the selected payer. Mandatory for serviced OUs such as Romania, Latvia, Lithuania, Estonia, Ukraine etc. It is optional for other countries if ColCoID is provided. Example: 86 for Philippines 5 for UK

Returns:

  • (Integer)


27
28
29
# File 'lib/shell_card_management_ap_is/models/search_card_restriction_req.rb', line 27

def col_co_code
  @col_co_code
end

#col_co_idInteger

Collecting Company Id of the selected payer. Optional if ColCoCode is passed else Mandatory. Example: 1 for Philippines 5 for UK

Returns:

  • (Integer)


18
19
20
# File 'lib/shell_card_management_ap_is/models/search_card_restriction_req.rb', line 18

def col_co_id
  @col_co_id
end

#include_bundle_detailsTrueClass | FalseClass

Default value is False, When the value is True, API will return bundle Id associated with cards in the response, if available. Note: Use ‘Null’ or ‘False’ for optimum performance. A delay in response is expected when set to ‘True’.

Returns:

  • (TrueClass | FalseClass)


72
73
74
# File 'lib/shell_card_management_ap_is/models/search_card_restriction_req.rb', line 72

def include_bundle_details
  @include_bundle_details
end

#include_inherited_limitsTrueClass | FalseClass

Default value is True, When True: service will return the inherited values for the usage limits (from card-program or account as available) when it is not overridden on the card.

Returns:

  • (TrueClass | FalseClass)


79
80
81
# File 'lib/shell_card_management_ap_is/models/search_card_restriction_req.rb', line 79

def include_inherited_limits
  @include_inherited_limits
end

#include_location_restrictionsTrueClass | FalseClass

True/False Whether to include location restriction of the cards in the response. Optional Default ‘false’

Returns:

  • (TrueClass | FalseClass)


64
65
66
# File 'lib/shell_card_management_ap_is/models/search_card_restriction_req.rb', line 64

def include_location_restrictions
  @include_location_restrictions
end

#payer_idInteger

Payer Id (i.e. Customer Id of the Payment Customer) of the selected payer. Optional if PayerNumber is passed else Mandatory Example: 123456

Returns:

  • (Integer)


33
34
35
# File 'lib/shell_card_management_ap_is/models/search_card_restriction_req.rb', line 33

def payer_id
  @payer_id
end

#payer_numberString

Payer Number of the selected payer. Optional if PayerId is passed else Mandatory Example: GB000000123

Returns:

  • (String)


39
40
41
# File 'lib/shell_card_management_ap_is/models/search_card_restriction_req.rb', line 39

def payer_number
  @payer_number
end

Class Method Details

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



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
# File 'lib/shell_card_management_ap_is/models/search_card_restriction_req.rb', line 147

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
  col_co_id = hash.key?('ColCoId') ? hash['ColCoId'] : SKIP
  col_co_code = hash.key?('ColCoCode') ? hash['ColCoCode'] : SKIP
  payer_id = hash.key?('PayerId') ? hash['PayerId'] : SKIP
  payer_number = hash.key?('PayerNumber') ? hash['PayerNumber'] : SKIP
  accounts = Accounts.from_hash(hash['Accounts']) if hash['Accounts']
  bundle_id = hash.key?('BundleId') ? hash['BundleId'] : SKIP
  cards = SearchCardRestriction.from_hash(hash['Cards']) if hash['Cards']
  include_location_restrictions =
    hash.key?('IncludeLocationRestrictions') ? hash['IncludeLocationRestrictions'] : SKIP
  include_bundle_details =
    hash.key?('IncludeBundleDetails') ? hash['IncludeBundleDetails'] : SKIP
  include_inherited_limits =
    hash.key?('IncludeInheritedLimits') ? hash['IncludeInheritedLimits'] : SKIP

  # Create object from extracted values.
  SearchCardRestrictionReq.new(col_co_id,
                               col_co_code,
                               payer_id,
                               payer_number,
                               accounts,
                               bundle_id,
                               cards,
                               include_location_restrictions,
                               include_bundle_details,
                               include_inherited_limits)
end

.namesObject

A mapping from model property names to API property names.



82
83
84
85
86
87
88
89
90
91
92
93
94
95
# File 'lib/shell_card_management_ap_is/models/search_card_restriction_req.rb', line 82

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['col_co_id'] = 'ColCoId'
  @_hash['col_co_code'] = 'ColCoCode'
  @_hash['payer_id'] = 'PayerId'
  @_hash['payer_number'] = 'PayerNumber'
  @_hash['accounts'] = 'Accounts'
  @_hash['bundle_id'] = 'BundleId'
  @_hash['cards'] = 'Cards'
  @_hash['include_location_restrictions'] = 'IncludeLocationRestrictions'
  @_hash['include_bundle_details'] = 'IncludeBundleDetails'
  @_hash['include_inherited_limits'] = 'IncludeInheritedLimits'
  @_hash
end

.nullablesObject

An array for nullable fields



114
115
116
117
118
119
120
121
122
123
124
# File 'lib/shell_card_management_ap_is/models/search_card_restriction_req.rb', line 114

def self.nullables
  %w[
    col_co_id
    col_co_code
    payer_id
    bundle_id
    include_location_restrictions
    include_bundle_details
    include_inherited_limits
  ]
end

.optionalsObject

An array for optional fields



98
99
100
101
102
103
104
105
106
107
108
109
110
111
# File 'lib/shell_card_management_ap_is/models/search_card_restriction_req.rb', line 98

def self.optionals
  %w[
    col_co_id
    col_co_code
    payer_id
    payer_number
    accounts
    bundle_id
    cards
    include_location_restrictions
    include_bundle_details
    include_inherited_limits
  ]
end