Class: ShellCardManagementApIs::Filters2

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

Overview

Filters2 Model.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from BaseModel

#to_hash, #to_json

Constructor Details

#initialize(account_id = SKIP, account_number = SKIP, col_co_code = SKIP, col_co_id = SKIP, col_co_country_code = SKIP, payer_id = SKIP, payer_number = SKIP, reference_number = SKIP, reference_type = SKIP, from_date = SKIP, to_date = SKIP, order_request_id = SKIP) ⇒ Filters2

Returns a new instance of Filters2.



145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
# File 'lib/shell_card_management_ap_is/models/filters2.rb', line 145

def initialize( = SKIP,  = SKIP, col_co_code = SKIP,
               col_co_id = SKIP, col_co_country_code = SKIP,
               payer_id = SKIP, payer_number = SKIP,
               reference_number = SKIP, reference_type = SKIP,
               from_date = SKIP, to_date = SKIP, order_request_id = SKIP)
  @account_id =  unless  == SKIP
  @account_number =  unless  == SKIP
  @col_co_code = col_co_code unless col_co_code == SKIP
  @col_co_id = col_co_id unless col_co_id == SKIP
  @col_co_country_code = col_co_country_code unless col_co_country_code == SKIP
  @payer_id = payer_id unless payer_id == SKIP
  @payer_number = payer_number unless payer_number == SKIP
  @reference_number = reference_number unless reference_number == SKIP
  @reference_type = reference_type unless reference_type == SKIP
  @from_date = from_date unless from_date == SKIP
  @to_date = to_date unless to_date == SKIP
  @order_request_id = order_request_id unless order_request_id == SKIP
end

Instance Attribute Details

#account_idInteger

Account ID of the customer.<br/> Optional if AccountNumber is passed, else mandatory. <br/> This input is a search criterion, if given.

Returns:

  • (Integer)


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

def 
  @account_id
end

#account_numberString

Account Number of the customer.<br/> Optional if AccountId is passed, else mandatory.<br/> This input is a search criterion, if given.

Returns:

  • (String)


20
21
22
# File 'lib/shell_card_management_ap_is/models/filters2.rb', line 20

def 
  @account_number
end

#col_co_codeInteger

Collecting Company Code (Shell Code) of the selected payer. <br /> Optional – when ‘ReferenceNumber’ is provided.<br />

Returns:

  • (Integer)


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

def col_co_code
  @col_co_code
end

#col_co_country_codeString

ISO 3166 Alpha-2 Country Code for the customer and card owning country.

Returns:

  • (String)


35
36
37
# File 'lib/shell_card_management_ap_is/models/filters2.rb', line 35

def col_co_country_code
  @col_co_country_code
end

#col_co_idInteger

Collecting Company Id (in ) of the selected payer. <br /> Optional – when ‘ReferenceNumber’ is provided. Else, either ‘ColCoId’ or ‘ColCoCode’ is mandatory.<br />

Returns:

  • (Integer)


31
32
33
# File 'lib/shell_card_management_ap_is/models/filters2.rb', line 31

def col_co_id
  @col_co_id
end

#from_dateString

Card Orders from Date/Time.<br /> Optional.<br /> Value should be with in last 7 days<br /> This field is ignored if ReferenceNumber is provided <br /> This field is optional when not provided and ReferenceNumber is null or empty then the value should be set to D-7(Where D is current date)<br /> Format: yyyyMMdd

Returns:

  • (String)


76
77
78
# File 'lib/shell_card_management_ap_is/models/filters2.rb', line 76

def from_date
  @from_date
end

#order_request_idString

Client provided Unique Id of the original Order Card request, the status of which is enquired by this API

Returns:

  • (String)


91
92
93
# File 'lib/shell_card_management_ap_is/models/filters2.rb', line 91

def order_request_id
  @order_request_id
end

#payer_idInteger

Payer Id (i.e. Customer Id of the Payment Customer) of the selected payer.<br /> Optional – when ‘ReferenceNumber’ is provided. Else, either ‘PayerId’ or ‘PayerNumber’ is mandatory.

Returns:

  • (Integer)


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

def payer_id
  @payer_id
end

#payer_numberString

Payer Number of the selected payer.<br /> Optional – when ‘ReferenceNumber’ is provided. Else, either ‘PayerId’ or ‘PayerNumber’ is mandatory.

Returns:

  • (String)


48
49
50
# File 'lib/shell_card_management_ap_is/models/filters2.rb', line 48

def payer_number
  @payer_number
end

#reference_numberInteger

Reference number of the Card Order/ Bulk Card Order/ Order Card Request.<br /> Mandatory when ColCo and Payer fields are not provided. Else, optional.

Returns:

  • (Integer)


54
55
56
# File 'lib/shell_card_management_ap_is/models/filters2.rb', line 54

def reference_number
  @reference_number
end

#reference_typeOrderCardEnquiryReqReferenceTypeEnum

Type of the reference number provided.<br /> Mandatory if ReferenceNumber is provided. Else optional.<br /> Allowed Values:<br /> 1=Main Reference(Main Order Reference Number returned in the output of Card/OrderCard service. <br /> 2=Order Card Reference (Reference number for each individual card in the order submitted via Card/OrderCard service. <br /> 3=Bulk Order Card Reference (Reference number returned in the response of bulkcardinterface /UploadOrderCardTemplate. )



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

def reference_type
  @reference_type
end

#to_dateString

Card Order to Date/Time<br /> Optional<br /> Value should be with in last 7 days<br /> This field is ignored if ReferenceNumber is provided <br /> This field is optional when not provided and ReferenceNumber is null or empty then the value should be set to current date<br /> Format: yyyyMMdd

Returns:

  • (String)


86
87
88
# File 'lib/shell_card_management_ap_is/models/filters2.rb', line 86

def to_date
  @to_date
end

Class Method Details

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
# File 'lib/shell_card_management_ap_is/models/filters2.rb', line 165

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
   = hash.key?('AccountId') ? hash['AccountId'] : SKIP
   = hash.key?('AccountNumber') ? hash['AccountNumber'] : SKIP
  col_co_code = hash.key?('ColCoCode') ? hash['ColCoCode'] : SKIP
  col_co_id = hash.key?('ColCoId') ? hash['ColCoId'] : SKIP
  col_co_country_code =
    hash.key?('ColCoCountryCode') ? hash['ColCoCountryCode'] : SKIP
  payer_id = hash.key?('PayerId') ? hash['PayerId'] : SKIP
  payer_number = hash.key?('PayerNumber') ? hash['PayerNumber'] : SKIP
  reference_number =
    hash.key?('ReferenceNumber') ? hash['ReferenceNumber'] : SKIP
  reference_type = hash.key?('ReferenceType') ? hash['ReferenceType'] : SKIP
  from_date = hash.key?('FromDate') ? hash['FromDate'] : SKIP
  to_date = hash.key?('ToDate') ? hash['ToDate'] : SKIP
  order_request_id =
    hash.key?('OrderRequestId') ? hash['OrderRequestId'] : SKIP

  # Create object from extracted values.
  Filters2.new(,
               ,
               col_co_code,
               col_co_id,
               col_co_country_code,
               payer_id,
               payer_number,
               reference_number,
               reference_type,
               from_date,
               to_date,
               order_request_id)
end

.namesObject

A mapping from model property names to API property names.



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

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['account_id'] = 'AccountId'
  @_hash['account_number'] = 'AccountNumber'
  @_hash['col_co_code'] = 'ColCoCode'
  @_hash['col_co_id'] = 'ColCoId'
  @_hash['col_co_country_code'] = 'ColCoCountryCode'
  @_hash['payer_id'] = 'PayerId'
  @_hash['payer_number'] = 'PayerNumber'
  @_hash['reference_number'] = 'ReferenceNumber'
  @_hash['reference_type'] = 'ReferenceType'
  @_hash['from_date'] = 'FromDate'
  @_hash['to_date'] = 'ToDate'
  @_hash['order_request_id'] = 'OrderRequestId'
  @_hash
end

.nullablesObject

An array for nullable fields



130
131
132
133
134
135
136
137
138
139
140
141
142
143
# File 'lib/shell_card_management_ap_is/models/filters2.rb', line 130

def self.nullables
  %w[
    account_id
    account_number
    col_co_code
    col_co_id
    col_co_country_code
    payer_id
    payer_number
    from_date
    to_date
    order_request_id
  ]
end

.optionalsObject

An array for optional fields



112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
# File 'lib/shell_card_management_ap_is/models/filters2.rb', line 112

def self.optionals
  %w[
    account_id
    account_number
    col_co_code
    col_co_id
    col_co_country_code
    payer_id
    payer_number
    reference_number
    reference_type
    from_date
    to_date
    order_request_id
  ]
end