Class: CyberSourceMergedSpec::PushFunds

Inherits:
BaseModel
  • Object
show all
Defined in:
lib/cyber_source_merged_spec/models/push_funds.rb

Overview

PushFunds 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(money_transfer_fast_funds_cross_border: SKIP, money_transfer_fast_funds_domestic: SKIP, money_transfer_cross_border: SKIP, money_transfer_domestic: SKIP, non_money_transfer_fast_funds_cross_border: SKIP, non_money_transfer_fast_funds_domestic: SKIP, non_money_transfer_cross_border: SKIP, non_money_transfer_domestic: SKIP, online_gambling_fast_funds_cross_border: SKIP, online_gambling_fast_funds_domestic: SKIP, online_gambling_cross_border: SKIP, online_gambling_domestic: SKIP, domestic_participant: SKIP, cross_border_participant: SKIP, additional_properties: nil) ⇒ PushFunds

Returns a new instance of PushFunds.



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
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
# File 'lib/cyber_source_merged_spec/models/push_funds.rb', line 173

def initialize(money_transfer_fast_funds_cross_border: SKIP,
               money_transfer_fast_funds_domestic: SKIP,
               money_transfer_cross_border: SKIP,
               money_transfer_domestic: SKIP,
               non_money_transfer_fast_funds_cross_border: SKIP,
               non_money_transfer_fast_funds_domestic: SKIP,
               non_money_transfer_cross_border: SKIP,
               non_money_transfer_domestic: SKIP,
               online_gambling_fast_funds_cross_border: SKIP,
               online_gambling_fast_funds_domestic: SKIP,
               online_gambling_cross_border: SKIP,
               online_gambling_domestic: SKIP, domestic_participant: SKIP,
               cross_border_participant: SKIP, additional_properties: nil)
  # Add additional model properties to the instance
  additional_properties = {} if additional_properties.nil?

  unless money_transfer_fast_funds_cross_border == SKIP
    @money_transfer_fast_funds_cross_border =
      money_transfer_fast_funds_cross_border
  end
  unless money_transfer_fast_funds_domestic == SKIP
    @money_transfer_fast_funds_domestic =
      money_transfer_fast_funds_domestic
  end
  unless money_transfer_cross_border == SKIP
    @money_transfer_cross_border =
      money_transfer_cross_border
  end
  @money_transfer_domestic = money_transfer_domestic unless money_transfer_domestic == SKIP
  unless non_money_transfer_fast_funds_cross_border == SKIP
    @non_money_transfer_fast_funds_cross_border =
      non_money_transfer_fast_funds_cross_border
  end
  unless non_money_transfer_fast_funds_domestic == SKIP
    @non_money_transfer_fast_funds_domestic =
      non_money_transfer_fast_funds_domestic
  end
  unless non_money_transfer_cross_border == SKIP
    @non_money_transfer_cross_border =
      non_money_transfer_cross_border
  end
  unless non_money_transfer_domestic == SKIP
    @non_money_transfer_domestic =
      non_money_transfer_domestic
  end
  unless online_gambling_fast_funds_cross_border == SKIP
    @online_gambling_fast_funds_cross_border =
      online_gambling_fast_funds_cross_border
  end
  unless online_gambling_fast_funds_domestic == SKIP
    @online_gambling_fast_funds_domestic =
      online_gambling_fast_funds_domestic
  end
  unless online_gambling_cross_border == SKIP
    @online_gambling_cross_border =
      online_gambling_cross_border
  end
  @online_gambling_domestic = online_gambling_domestic unless online_gambling_domestic == SKIP
  @domestic_participant = domestic_participant unless domestic_participant == SKIP
  @cross_border_participant = cross_border_participant unless cross_border_participant == SKIP
  @additional_properties = additional_properties
end

Instance Attribute Details

#cross_border_participantString

This field indicates if cross-border OCTs (push funds) are allowed. Possible values:

- `true`
- `false`

Returns:

  • (String)


119
120
121
# File 'lib/cyber_source_merged_spec/models/push_funds.rb', line 119

def cross_border_participant
  @cross_border_participant
end

#domestic_participantString

This field indicates if domestic OCTs (push funds) are allowed. Possible values:

- `true`
- `false`

Returns:

  • (String)


112
113
114
# File 'lib/cyber_source_merged_spec/models/push_funds.rb', line 112

def domestic_participant
  @domestic_participant
end

#money_transfer_cross_borderString

This field indicates if cross-border money transfer OCTs (push funds) are allowed. Possible values:

- `Y`
- `N`

Returns:

  • (String)


34
35
36
# File 'lib/cyber_source_merged_spec/models/push_funds.rb', line 34

def money_transfer_cross_border
  @money_transfer_cross_border
end

#money_transfer_domesticString

This field indicates if domestic money transfer OCTs (push funds) are allowed. Possible values:

- `Y`
- `N`

Returns:

  • (String)


42
43
44
# File 'lib/cyber_source_merged_spec/models/push_funds.rb', line 42

def money_transfer_domestic
  @money_transfer_domestic
end

#money_transfer_fast_funds_cross_borderString

This field indicates if cross-border money transfer OCTs (fast push funds) are allowed. Possible values:

- `Y`
- `N`

Returns:

  • (String)


18
19
20
# File 'lib/cyber_source_merged_spec/models/push_funds.rb', line 18

def money_transfer_fast_funds_cross_border
  @money_transfer_fast_funds_cross_border
end

#money_transfer_fast_funds_domesticString

This field indicates if domestic money transfer OCTs (fast push funds) are allowed. Possible values:

- `Y`
- `N`

Returns:

  • (String)


26
27
28
# File 'lib/cyber_source_merged_spec/models/push_funds.rb', line 26

def money_transfer_fast_funds_domestic
  @money_transfer_fast_funds_domestic
end

#non_money_transfer_cross_borderString

This field indicates if cross-border non-money transfer OCTs (push funds) are allowed. Possible values:

- `Y`
- `N`

Returns:

  • (String)


66
67
68
# File 'lib/cyber_source_merged_spec/models/push_funds.rb', line 66

def non_money_transfer_cross_border
  @non_money_transfer_cross_border
end

#non_money_transfer_domesticString

This field indicates if domestic non-money transfer OCTs (push funds) are allowed. Possible values:

- `Y`
- `N`

Returns:

  • (String)


74
75
76
# File 'lib/cyber_source_merged_spec/models/push_funds.rb', line 74

def non_money_transfer_domestic
  @non_money_transfer_domestic
end

#non_money_transfer_fast_funds_cross_borderString

This field indicates if cross-border non-money transfer OCTs (fast push funds) are allowed. Possible values:

- `Y`
- `N`

Returns:

  • (String)


50
51
52
# File 'lib/cyber_source_merged_spec/models/push_funds.rb', line 50

def non_money_transfer_fast_funds_cross_border
  @non_money_transfer_fast_funds_cross_border
end

#non_money_transfer_fast_funds_domesticString

This field indicates if domestic non-money transfer OCTs (fast push funds) are allowed. Possible values:

- `Y`
- `N`

Returns:

  • (String)


58
59
60
# File 'lib/cyber_source_merged_spec/models/push_funds.rb', line 58

def non_money_transfer_fast_funds_domestic
  @non_money_transfer_fast_funds_domestic
end

#online_gambling_cross_borderString

This field indicates if cross-border gambling OCTs (push funds) are allowed. Possible values:

- `Y`
- `N`

Returns:

  • (String)


98
99
100
# File 'lib/cyber_source_merged_spec/models/push_funds.rb', line 98

def online_gambling_cross_border
  @online_gambling_cross_border
end

#online_gambling_domesticString

This field indicates if domestic gambling OCTs (push funds) are allowed. Possible values:

- `Y`
- `N`

Returns:

  • (String)


105
106
107
# File 'lib/cyber_source_merged_spec/models/push_funds.rb', line 105

def online_gambling_domestic
  @online_gambling_domestic
end

#online_gambling_fast_funds_cross_borderString

This field indicates if cross-border gambling OCTs (fast push funds) are allowed. Possible values:

- `Y`
- `N`

Returns:

  • (String)


82
83
84
# File 'lib/cyber_source_merged_spec/models/push_funds.rb', line 82

def online_gambling_fast_funds_cross_border
  @online_gambling_fast_funds_cross_border
end

#online_gambling_fast_funds_domesticString

This field indicates if domestic gambling OCTs (fast push funds) are allowed. Possible values:

- `Y`
- `N`

Returns:

  • (String)


90
91
92
# File 'lib/cyber_source_merged_spec/models/push_funds.rb', line 90

def online_gambling_fast_funds_domestic
  @online_gambling_fast_funds_domestic
end

Class Method Details

.from_element(root) ⇒ Object



295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
# File 'lib/cyber_source_merged_spec/models/push_funds.rb', line 295

def self.from_element(root)
  money_transfer_fast_funds_cross_border = XmlUtilities.from_element(
    root, 'moneyTransferFastFundsCrossBorder', String
  )
  money_transfer_fast_funds_domestic = XmlUtilities.from_element(
    root, 'moneyTransferFastFundsDomestic', String
  )
  money_transfer_cross_border = XmlUtilities.from_element(
    root, 'moneyTransferCrossBorder', String
  )
  money_transfer_domestic = XmlUtilities.from_element(
    root, 'moneyTransferDomestic', String
  )
  non_money_transfer_fast_funds_cross_border = XmlUtilities.from_element(
    root, 'nonMoneyTransferFastFundsCrossBorder', String
  )
  non_money_transfer_fast_funds_domestic = XmlUtilities.from_element(
    root, 'nonMoneyTransferFastFundsDomestic', String
  )
  non_money_transfer_cross_border = XmlUtilities.from_element(
    root, 'nonMoneyTransferCrossBorder', String
  )
  non_money_transfer_domestic = XmlUtilities.from_element(
    root, 'nonMoneyTransferDomestic', String
  )
  online_gambling_fast_funds_cross_border = XmlUtilities.from_element(
    root, 'onlineGamblingFastFundsCrossBorder', String
  )
  online_gambling_fast_funds_domestic = XmlUtilities.from_element(
    root, 'onlineGamblingFastFundsDomestic', String
  )
  online_gambling_cross_border = XmlUtilities.from_element(
    root, 'onlineGamblingCrossBorder', String
  )
  online_gambling_domestic = XmlUtilities.from_element(
    root, 'onlineGamblingDomestic', String
  )
  domestic_participant = XmlUtilities.from_element(root,
                                                   'domesticParticipant',
                                                   String)
  cross_border_participant = XmlUtilities.from_element(
    root, 'crossBorderParticipant', String
  )

  new(money_transfer_fast_funds_cross_border: money_transfer_fast_funds_cross_border,
      money_transfer_fast_funds_domestic: money_transfer_fast_funds_domestic,
      money_transfer_cross_border: money_transfer_cross_border,
      money_transfer_domestic: money_transfer_domestic,
      non_money_transfer_fast_funds_cross_border: non_money_transfer_fast_funds_cross_border,
      non_money_transfer_fast_funds_domestic: non_money_transfer_fast_funds_domestic,
      non_money_transfer_cross_border: non_money_transfer_cross_border,
      non_money_transfer_domestic: non_money_transfer_domestic,
      online_gambling_fast_funds_cross_border: online_gambling_fast_funds_cross_border,
      online_gambling_fast_funds_domestic: online_gambling_fast_funds_domestic,
      online_gambling_cross_border: online_gambling_cross_border,
      online_gambling_domestic: online_gambling_domestic,
      domestic_participant: domestic_participant,
      cross_border_participant: cross_border_participant,
      additional_properties: additional_properties)
end

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
# File 'lib/cyber_source_merged_spec/models/push_funds.rb', line 237

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
  money_transfer_fast_funds_cross_border =
    hash.key?('moneyTransferFastFundsCrossBorder') ? hash['moneyTransferFastFundsCrossBorder'] : SKIP
  money_transfer_fast_funds_domestic =
    hash.key?('moneyTransferFastFundsDomestic') ? hash['moneyTransferFastFundsDomestic'] : SKIP
  money_transfer_cross_border =
    hash.key?('moneyTransferCrossBorder') ? hash['moneyTransferCrossBorder'] : SKIP
  money_transfer_domestic =
    hash.key?('moneyTransferDomestic') ? hash['moneyTransferDomestic'] : SKIP
  non_money_transfer_fast_funds_cross_border =
    hash.key?('nonMoneyTransferFastFundsCrossBorder') ? hash['nonMoneyTransferFastFundsCrossBorder'] : SKIP
  non_money_transfer_fast_funds_domestic =
    hash.key?('nonMoneyTransferFastFundsDomestic') ? hash['nonMoneyTransferFastFundsDomestic'] : SKIP
  non_money_transfer_cross_border =
    hash.key?('nonMoneyTransferCrossBorder') ? hash['nonMoneyTransferCrossBorder'] : SKIP
  non_money_transfer_domestic =
    hash.key?('nonMoneyTransferDomestic') ? hash['nonMoneyTransferDomestic'] : SKIP
  online_gambling_fast_funds_cross_border =
    hash.key?('onlineGamblingFastFundsCrossBorder') ? hash['onlineGamblingFastFundsCrossBorder'] : SKIP
  online_gambling_fast_funds_domestic =
    hash.key?('onlineGamblingFastFundsDomestic') ? hash['onlineGamblingFastFundsDomestic'] : SKIP
  online_gambling_cross_border =
    hash.key?('onlineGamblingCrossBorder') ? hash['onlineGamblingCrossBorder'] : SKIP
  online_gambling_domestic =
    hash.key?('onlineGamblingDomestic') ? hash['onlineGamblingDomestic'] : SKIP
  domestic_participant =
    hash.key?('domesticParticipant') ? hash['domesticParticipant'] : SKIP
  cross_border_participant =
    hash.key?('crossBorderParticipant') ? hash['crossBorderParticipant'] : SKIP

  # Create a new hash for additional properties, removing known properties.
  new_hash = hash.reject { |k, _| names.value?(k) }

  additional_properties = APIHelper.get_additional_properties(
    new_hash, proc { |value| value }
  )

  # Create object from extracted values.
  PushFunds.new(money_transfer_fast_funds_cross_border: money_transfer_fast_funds_cross_border,
                money_transfer_fast_funds_domestic: money_transfer_fast_funds_domestic,
                money_transfer_cross_border: money_transfer_cross_border,
                money_transfer_domestic: money_transfer_domestic,
                non_money_transfer_fast_funds_cross_border: non_money_transfer_fast_funds_cross_border,
                non_money_transfer_fast_funds_domestic: non_money_transfer_fast_funds_domestic,
                non_money_transfer_cross_border: non_money_transfer_cross_border,
                non_money_transfer_domestic: non_money_transfer_domestic,
                online_gambling_fast_funds_cross_border: online_gambling_fast_funds_cross_border,
                online_gambling_fast_funds_domestic: online_gambling_fast_funds_domestic,
                online_gambling_cross_border: online_gambling_cross_border,
                online_gambling_domestic: online_gambling_domestic,
                domestic_participant: domestic_participant,
                cross_border_participant: cross_border_participant,
                additional_properties: additional_properties)
end

.namesObject

A mapping from model property names to API property names.



122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
# File 'lib/cyber_source_merged_spec/models/push_funds.rb', line 122

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['money_transfer_fast_funds_cross_border'] =
    'moneyTransferFastFundsCrossBorder'
  @_hash['money_transfer_fast_funds_domestic'] =
    'moneyTransferFastFundsDomestic'
  @_hash['money_transfer_cross_border'] = 'moneyTransferCrossBorder'
  @_hash['money_transfer_domestic'] = 'moneyTransferDomestic'
  @_hash['non_money_transfer_fast_funds_cross_border'] =
    'nonMoneyTransferFastFundsCrossBorder'
  @_hash['non_money_transfer_fast_funds_domestic'] =
    'nonMoneyTransferFastFundsDomestic'
  @_hash['non_money_transfer_cross_border'] =
    'nonMoneyTransferCrossBorder'
  @_hash['non_money_transfer_domestic'] = 'nonMoneyTransferDomestic'
  @_hash['online_gambling_fast_funds_cross_border'] =
    'onlineGamblingFastFundsCrossBorder'
  @_hash['online_gambling_fast_funds_domestic'] =
    'onlineGamblingFastFundsDomestic'
  @_hash['online_gambling_cross_border'] = 'onlineGamblingCrossBorder'
  @_hash['online_gambling_domestic'] = 'onlineGamblingDomestic'
  @_hash['domestic_participant'] = 'domesticParticipant'
  @_hash['cross_border_participant'] = 'crossBorderParticipant'
  @_hash
end

.nullablesObject

An array for nullable fields



169
170
171
# File 'lib/cyber_source_merged_spec/models/push_funds.rb', line 169

def self.nullables
  []
end

.optionalsObject

An array for optional fields



149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
# File 'lib/cyber_source_merged_spec/models/push_funds.rb', line 149

def self.optionals
  %w[
    money_transfer_fast_funds_cross_border
    money_transfer_fast_funds_domestic
    money_transfer_cross_border
    money_transfer_domestic
    non_money_transfer_fast_funds_cross_border
    non_money_transfer_fast_funds_domestic
    non_money_transfer_cross_border
    non_money_transfer_domestic
    online_gambling_fast_funds_cross_border
    online_gambling_fast_funds_domestic
    online_gambling_cross_border
    online_gambling_domestic
    domestic_participant
    cross_border_participant
  ]
end

Instance Method Details

#inspectObject

Provides a debugging-friendly string with detailed object information.



419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
# File 'lib/cyber_source_merged_spec/models/push_funds.rb', line 419

def inspect
  class_name = self.class.name.split('::').last
  "<#{class_name} money_transfer_fast_funds_cross_border:"\
  " #{@money_transfer_fast_funds_cross_border.inspect}, money_transfer_fast_funds_domestic:"\
  " #{@money_transfer_fast_funds_domestic.inspect}, money_transfer_cross_border:"\
  " #{@money_transfer_cross_border.inspect}, money_transfer_domestic:"\
  " #{@money_transfer_domestic.inspect}, non_money_transfer_fast_funds_cross_border:"\
  " #{@non_money_transfer_fast_funds_cross_border.inspect},"\
  ' non_money_transfer_fast_funds_domestic:'\
  " #{@non_money_transfer_fast_funds_domestic.inspect}, non_money_transfer_cross_border:"\
  " #{@non_money_transfer_cross_border.inspect}, non_money_transfer_domestic:"\
  " #{@non_money_transfer_domestic.inspect}, online_gambling_fast_funds_cross_border:"\
  " #{@online_gambling_fast_funds_cross_border.inspect}, online_gambling_fast_funds_domestic:"\
  " #{@online_gambling_fast_funds_domestic.inspect}, online_gambling_cross_border:"\
  " #{@online_gambling_cross_border.inspect}, online_gambling_domestic:"\
  " #{@online_gambling_domestic.inspect}, domestic_participant:"\
  " #{@domestic_participant.inspect}, cross_border_participant:"\
  " #{@cross_border_participant.inspect}, additional_properties: #{@additional_properties}>"
end

#to_sObject

Provides a human-readable string representation of the object.



400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
# File 'lib/cyber_source_merged_spec/models/push_funds.rb', line 400

def to_s
  class_name = self.class.name.split('::').last
  "<#{class_name} money_transfer_fast_funds_cross_border:"\
  " #{@money_transfer_fast_funds_cross_border}, money_transfer_fast_funds_domestic:"\
  " #{@money_transfer_fast_funds_domestic}, money_transfer_cross_border:"\
  " #{@money_transfer_cross_border}, money_transfer_domestic: #{@money_transfer_domestic},"\
  ' non_money_transfer_fast_funds_cross_border:'\
  " #{@non_money_transfer_fast_funds_cross_border}, non_money_transfer_fast_funds_domestic:"\
  " #{@non_money_transfer_fast_funds_domestic}, non_money_transfer_cross_border:"\
  " #{@non_money_transfer_cross_border}, non_money_transfer_domestic:"\
  " #{@non_money_transfer_domestic}, online_gambling_fast_funds_cross_border:"\
  " #{@online_gambling_fast_funds_cross_border}, online_gambling_fast_funds_domestic:"\
  " #{@online_gambling_fast_funds_domestic}, online_gambling_cross_border:"\
  " #{@online_gambling_cross_border}, online_gambling_domestic: #{@online_gambling_domestic},"\
  " domestic_participant: #{@domestic_participant}, cross_border_participant:"\
  " #{@cross_border_participant}, additional_properties: #{@additional_properties}>"
end

#to_xml_element(doc, root_name) ⇒ Object



356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
# File 'lib/cyber_source_merged_spec/models/push_funds.rb', line 356

def to_xml_element(doc, root_name)
  root = doc.create_element(root_name)

  XmlUtilities.add_as_subelement(doc, root,
                                 'moneyTransferFastFundsCrossBorder',
                                 money_transfer_fast_funds_cross_border)
  XmlUtilities.add_as_subelement(doc, root,
                                 'moneyTransferFastFundsDomestic',
                                 money_transfer_fast_funds_domestic)
  XmlUtilities.add_as_subelement(doc, root, 'moneyTransferCrossBorder',
                                 money_transfer_cross_border)
  XmlUtilities.add_as_subelement(doc, root, 'moneyTransferDomestic',
                                 money_transfer_domestic)
  XmlUtilities.add_as_subelement(doc, root,
                                 'nonMoneyTransferFastFundsCrossBorder',
                                 non_money_transfer_fast_funds_cross_border)
  XmlUtilities.add_as_subelement(doc, root,
                                 'nonMoneyTransferFastFundsDomestic',
                                 non_money_transfer_fast_funds_domestic)
  XmlUtilities.add_as_subelement(doc, root, 'nonMoneyTransferCrossBorder',
                                 non_money_transfer_cross_border)
  XmlUtilities.add_as_subelement(doc, root, 'nonMoneyTransferDomestic',
                                 non_money_transfer_domestic)
  XmlUtilities.add_as_subelement(doc, root,
                                 'onlineGamblingFastFundsCrossBorder',
                                 online_gambling_fast_funds_cross_border)
  XmlUtilities.add_as_subelement(doc, root,
                                 'onlineGamblingFastFundsDomestic',
                                 online_gambling_fast_funds_domestic)
  XmlUtilities.add_as_subelement(doc, root, 'onlineGamblingCrossBorder',
                                 online_gambling_cross_border)
  XmlUtilities.add_as_subelement(doc, root, 'onlineGamblingDomestic',
                                 online_gambling_domestic)
  XmlUtilities.add_as_subelement(doc, root, 'domesticParticipant',
                                 domestic_participant)
  XmlUtilities.add_as_subelement(doc, root, 'crossBorderParticipant',
                                 cross_border_participant)
  XmlUtilities.add_as_subelement(doc, root, 'additional_properties',
                                 additional_properties)

  root
end