Class: ShellDataReportingApIs::CardGroupRequest
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- ShellDataReportingApIs::CardGroupRequest
- Defined in:
- lib/shell_data_reporting_ap_is/models/card_group_request.rb
Overview
CardGroupRequest Model.
Instance Attribute Summary collapse
-
#account ⇒ Array[Accounts]
PayerNumber of the customer.
-
#card_group_name ⇒ String
Card Group Name Optional.
-
#col_co_code ⇒ Integer
Collecting Company Code (Shell Code) of the selected payer.
-
#col_co_id ⇒ Integer
Collecting Company Id of the selected payer.
-
#payer_id ⇒ Integer
Payer id of the customer.
-
#payer_number ⇒ String
PayerNumber of the customer.
-
#status ⇒ String
Card Group Status Mandatory Allowed values: • ALL • TERMINATED • ACTIVE.
Class Method Summary collapse
-
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
-
.names ⇒ Object
A mapping from model property names to API property names.
-
.nullables ⇒ Object
An array for nullable fields.
-
.optionals ⇒ Object
An array for optional fields.
Instance Method Summary collapse
-
#initialize(col_co_id = SKIP, col_co_code = SKIP, payer_id = SKIP, payer_number = SKIP, account = SKIP, card_group_name = SKIP, status = SKIP) ⇒ CardGroupRequest
constructor
A new instance of CardGroupRequest.
-
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
-
#to_s ⇒ Object
Provides a human-readable string representation of the object.
Methods inherited from BaseModel
#check_for_conflict, #process_additional_properties, #process_array, #process_basic_value, #process_hash, #to_hash, #to_json
Constructor Details
#initialize(col_co_id = SKIP, col_co_code = SKIP, payer_id = SKIP, payer_number = SKIP, account = SKIP, card_group_name = SKIP, status = SKIP) ⇒ CardGroupRequest
Returns a new instance of CardGroupRequest.
104 105 106 107 108 109 110 111 112 113 114 |
# File 'lib/shell_data_reporting_ap_is/models/card_group_request.rb', line 104 def initialize(col_co_id = SKIP, col_co_code = SKIP, payer_id = SKIP, payer_number = SKIP, account = SKIP, card_group_name = SKIP, status = 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 @account = account unless account == SKIP @card_group_name = card_group_name unless card_group_name == SKIP @status = status unless status == SKIP end |
Instance Attribute Details
#account ⇒ Array[Accounts]
PayerNumber of the customer. Optional if PayerId is passed, else Mandatory. This input is a search criterion. Example: GB00123456
48 49 50 |
# File 'lib/shell_data_reporting_ap_is/models/card_group_request.rb', line 48 def account @account end |
#card_group_name ⇒ String
Card Group Name Optional. Minimum of 2 characters should be provided else not considered. CardGroups those have the entered value at any part
55 56 57 |
# File 'lib/shell_data_reporting_ap_is/models/card_group_request.rb', line 55 def card_group_name @card_group_name end |
#col_co_code ⇒ Integer
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
27 28 29 |
# File 'lib/shell_data_reporting_ap_is/models/card_group_request.rb', line 27 def col_co_code @col_co_code end |
#col_co_id ⇒ Integer
Collecting Company Id of the selected payer. Optional if ColCoCode is passed else Mandatory. Example: 1 for Philippines 5 for UK
18 19 20 |
# File 'lib/shell_data_reporting_ap_is/models/card_group_request.rb', line 18 def col_co_id @col_co_id end |
#payer_id ⇒ Integer
Payer id of the customer. Optional if PayerNumber is passed, else Mandatory. This input is a search criterion. Example: 123456
34 35 36 |
# File 'lib/shell_data_reporting_ap_is/models/card_group_request.rb', line 34 def payer_id @payer_id end |
#payer_number ⇒ String
PayerNumber of the customer. Optional if PayerId is passed, else Mandatory. This input is a search criterion. Example: GB00123456
41 42 43 |
# File 'lib/shell_data_reporting_ap_is/models/card_group_request.rb', line 41 def payer_number @payer_number end |
#status ⇒ String
Card Group Status Mandatory Allowed values: • ALL • TERMINATED • ACTIVE
64 65 66 |
# File 'lib/shell_data_reporting_ap_is/models/card_group_request.rb', line 64 def status @status end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
117 118 119 120 121 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 147 |
# File 'lib/shell_data_reporting_ap_is/models/card_group_request.rb', line 117 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 # Parameter is an array, so we need to iterate through it account = nil unless hash['Account'].nil? account = [] hash['Account'].each do |structure| account << (Accounts.from_hash(structure) if structure) end end account = SKIP unless hash.key?('Account') card_group_name = hash.key?('CardGroupName') ? hash['CardGroupName'] : SKIP status = hash.key?('Status') ? hash['Status'] : SKIP # Create object from extracted values. CardGroupRequest.new(col_co_id, col_co_code, payer_id, payer_number, account, card_group_name, status) end |
.names ⇒ Object
A mapping from model property names to API property names.
67 68 69 70 71 72 73 74 75 76 77 |
# File 'lib/shell_data_reporting_ap_is/models/card_group_request.rb', line 67 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['account'] = 'Account' @_hash['card_group_name'] = 'CardGroupName' @_hash['status'] = 'Status' @_hash end |
.nullables ⇒ Object
An array for nullable fields
93 94 95 96 97 98 99 100 101 102 |
# File 'lib/shell_data_reporting_ap_is/models/card_group_request.rb', line 93 def self.nullables %w[ col_co_id col_co_code payer_id payer_number card_group_name status ] end |
.optionals ⇒ Object
An array for optional fields
80 81 82 83 84 85 86 87 88 89 90 |
# File 'lib/shell_data_reporting_ap_is/models/card_group_request.rb', line 80 def self.optionals %w[ col_co_id col_co_code payer_id payer_number account card_group_name status ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
158 159 160 161 162 163 164 |
# File 'lib/shell_data_reporting_ap_is/models/card_group_request.rb', line 158 def inspect class_name = self.class.name.split('::').last "<#{class_name} col_co_id: #{@col_co_id.inspect}, col_co_code: #{@col_co_code.inspect},"\ " payer_id: #{@payer_id.inspect}, payer_number: #{@payer_number.inspect}, account:"\ " #{@account.inspect}, card_group_name: #{@card_group_name.inspect}, status:"\ " #{@status.inspect}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
150 151 152 153 154 155 |
# File 'lib/shell_data_reporting_ap_is/models/card_group_request.rb', line 150 def to_s class_name = self.class.name.split('::').last "<#{class_name} col_co_id: #{@col_co_id}, col_co_code: #{@col_co_code}, payer_id:"\ " #{@payer_id}, payer_number: #{@payer_number}, account: #{@account}, card_group_name:"\ " #{@card_group_name}, status: #{@status}>" end |