Class: ShellCardManagementApIs::OrderCardEnquiryReq

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

Overview

This class holds Order Card Enquiry list based on which the Order Card Enquiry need to be filtered.

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) ⇒ OrderCardEnquiryReq

Returns a new instance of OrderCardEnquiryReq.



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

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)


16
17
18
# File 'lib/shell_card_management_ap_is/models/order_card_enquiry_req.rb', line 16

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)


21
22
23
# File 'lib/shell_card_management_ap_is/models/order_card_enquiry_req.rb', line 21

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)


26
27
28
# File 'lib/shell_card_management_ap_is/models/order_card_enquiry_req.rb', line 26

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)


36
37
38
# File 'lib/shell_card_management_ap_is/models/order_card_enquiry_req.rb', line 36

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)


32
33
34
# File 'lib/shell_card_management_ap_is/models/order_card_enquiry_req.rb', line 32

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)


77
78
79
# File 'lib/shell_card_management_ap_is/models/order_card_enquiry_req.rb', line 77

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)


92
93
94
# File 'lib/shell_card_management_ap_is/models/order_card_enquiry_req.rb', line 92

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)


43
44
45
# File 'lib/shell_card_management_ap_is/models/order_card_enquiry_req.rb', line 43

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)


49
50
51
# File 'lib/shell_card_management_ap_is/models/order_card_enquiry_req.rb', line 49

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)


55
56
57
# File 'lib/shell_card_management_ap_is/models/order_card_enquiry_req.rb', line 55

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. )



67
68
69
# File 'lib/shell_card_management_ap_is/models/order_card_enquiry_req.rb', line 67

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)


87
88
89
# File 'lib/shell_card_management_ap_is/models/order_card_enquiry_req.rb', line 87

def to_date
  @to_date
end

Class Method Details

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



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
199
# File 'lib/shell_card_management_ap_is/models/order_card_enquiry_req.rb', line 166

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.
  OrderCardEnquiryReq.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.



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

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



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

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



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

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