Class: ShellCardManagementApIs::SearchCardRequest

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

Overview

SearchCardRequest Model.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from BaseModel

#to_hash, #to_json

Constructor Details

#initialize(filters = SKIP, page_size = SKIP, page = SKIP) ⇒ SearchCardRequest

Returns a new instance of SearchCardRequest.



49
50
51
52
53
# File 'lib/shell_card_management_ap_is/models/search_card_request.rb', line 49

def initialize(filters = SKIP, page_size = SKIP, page = SKIP)
  @filters = filters unless filters == SKIP
  @page_size = page_size unless page_size == SKIP
  @page = page unless page == SKIP
end

Instance Attribute Details

#filtersFilters

TODO: Write general description for this method

Returns:



14
15
16
# File 'lib/shell_card_management_ap_is/models/search_card_request.rb', line 14

def filters
  @filters
end

#pageString

Page Number

Returns:

  • (String)


24
25
26
# File 'lib/shell_card_management_ap_is/models/search_card_request.rb', line 24

def page
  @page
end

#page_sizeString

Page Size – Number of records to show on a page Optional Default value 50

Returns:

  • (String)


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

def page_size
  @page_size
end

Class Method Details

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



56
57
58
59
60
61
62
63
64
65
66
67
68
# File 'lib/shell_card_management_ap_is/models/search_card_request.rb', line 56

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
  filters = Filters.from_hash(hash['Filters']) if hash['Filters']
  page_size = hash.key?('PageSize') ? hash['PageSize'] : SKIP
  page = hash.key?('Page') ? hash['Page'] : SKIP

  # Create object from extracted values.
  SearchCardRequest.new(filters,
                        page_size,
                        page)
end

.namesObject

A mapping from model property names to API property names.



27
28
29
30
31
32
33
# File 'lib/shell_card_management_ap_is/models/search_card_request.rb', line 27

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['filters'] = 'Filters'
  @_hash['page_size'] = 'PageSize'
  @_hash['page'] = 'Page'
  @_hash
end

.nullablesObject

An array for nullable fields



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

def self.nullables
  []
end

.optionalsObject

An array for optional fields



36
37
38
39
40
41
42
# File 'lib/shell_card_management_ap_is/models/search_card_request.rb', line 36

def self.optionals
  %w[
    filters
    page_size
    page
  ]
end