Class: ShellDataReportingApIs::CardUsageSummaryRequest
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- ShellDataReportingApIs::CardUsageSummaryRequest
- Defined in:
- lib/shell_data_reporting_ap_is/models/card_usage_summary_request.rb
Overview
CardUsageSummaryRequest Model.
Instance Attribute Summary collapse
-
#account_id ⇒ Integer
Account ID of the customer.
-
#account_number ⇒ String
Account Number of the customer.
-
#card_expiry_date ⇒ String
Expiry date of the card.
-
#card_id ⇒ Integer
Card Id of the card.
-
#col_co_code ⇒ Integer
Collecting Company Code of the selected payer.
-
#col_co_id ⇒ Integer
Collecting Company Id of the selected payer.
-
#pan ⇒ String
PAN of the card.
-
#payer_id ⇒ Integer
Payer Id of the selected payer.
-
#payer_number ⇒ String
Payer Number of the selected payer.
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_id = SKIP, account_number = SKIP, card_id = SKIP, pan = SKIP, card_expiry_date = SKIP) ⇒ CardUsageSummaryRequest
constructor
A new instance of CardUsageSummaryRequest.
Methods inherited from BaseModel
Constructor Details
#initialize(col_co_id = SKIP, col_co_code = SKIP, payer_id = SKIP, payer_number = SKIP, account_id = SKIP, account_number = SKIP, card_id = SKIP, pan = SKIP, card_expiry_date = SKIP) ⇒ CardUsageSummaryRequest
Returns a new instance of CardUsageSummaryRequest.
111 112 113 114 115 116 117 118 119 120 121 122 123 124 |
# File 'lib/shell_data_reporting_ap_is/models/card_usage_summary_request.rb', line 111 def initialize(col_co_id = SKIP, col_co_code = SKIP, payer_id = SKIP, payer_number = SKIP, account_id = SKIP, account_number = SKIP, card_id = SKIP, pan = SKIP, card_expiry_date = 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_id = account_id unless account_id == SKIP @account_number = account_number unless account_number == SKIP @card_id = card_id unless card_id == SKIP @pan = pan unless pan == SKIP @card_expiry_date = card_expiry_date unless card_expiry_date == SKIP end |
Instance Attribute Details
#account_id ⇒ Integer
Account ID of the customer. Optional if account number is passed else mandatory.
42 43 44 |
# File 'lib/shell_data_reporting_ap_is/models/card_usage_summary_request.rb', line 42 def account_id @account_id end |
#account_number ⇒ String
Account Number of the customer. Optional if Account ID is passed else mandatory.
47 48 49 |
# File 'lib/shell_data_reporting_ap_is/models/card_usage_summary_request.rb', line 47 def account_number @account_number end |
#card_expiry_date ⇒ String
Expiry date of the card. Mandatory if Card ID is not provided, else optional. Format: yyyyMMdd Example: 20170930
64 65 66 |
# File 'lib/shell_data_reporting_ap_is/models/card_usage_summary_request.rb', line 64 def card_expiry_date @card_expiry_date end |
#card_id ⇒ Integer
Card Id of the card. Optional if PAN is passed, else Mandatory.
52 53 54 |
# File 'lib/shell_data_reporting_ap_is/models/card_usage_summary_request.rb', line 52 def card_id @card_id end |
#col_co_code ⇒ Integer
Collecting Company 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_usage_summary_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_usage_summary_request.rb', line 18 def col_co_id @col_co_id end |
#pan ⇒ String
PAN of the card. Optional if CardId is passed, else Mandatory.
57 58 59 |
# File 'lib/shell_data_reporting_ap_is/models/card_usage_summary_request.rb', line 57 def pan @pan end |
#payer_id ⇒ Integer
Payer Id of the selected payer. Optional if PayerNumber is passed else Mandatory
32 33 34 |
# File 'lib/shell_data_reporting_ap_is/models/card_usage_summary_request.rb', line 32 def payer_id @payer_id end |
#payer_number ⇒ String
Payer Number of the selected payer. Optional if PayerId is passed else Mandatory
37 38 39 |
# File 'lib/shell_data_reporting_ap_is/models/card_usage_summary_request.rb', line 37 def payer_number @payer_number end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 |
# File 'lib/shell_data_reporting_ap_is/models/card_usage_summary_request.rb', line 127 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 account_id = hash.key?('AccountId') ? hash['AccountId'] : SKIP account_number = hash.key?('AccountNumber') ? hash['AccountNumber'] : SKIP card_id = hash.key?('CardId') ? hash['CardId'] : SKIP pan = hash.key?('PAN') ? hash['PAN'] : SKIP card_expiry_date = hash.key?('CardExpiryDate') ? hash['CardExpiryDate'] : SKIP # Create object from extracted values. CardUsageSummaryRequest.new(col_co_id, col_co_code, payer_id, payer_number, account_id, account_number, card_id, pan, card_expiry_date) end |
.names ⇒ Object
A mapping from model property names to API property names.
67 68 69 70 71 72 73 74 75 76 77 78 79 |
# File 'lib/shell_data_reporting_ap_is/models/card_usage_summary_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_id'] = 'AccountId' @_hash['account_number'] = 'AccountNumber' @_hash['card_id'] = 'CardId' @_hash['pan'] = 'PAN' @_hash['card_expiry_date'] = 'CardExpiryDate' @_hash end |
.nullables ⇒ Object
An array for nullable fields
97 98 99 100 101 102 103 104 105 106 107 108 109 |
# File 'lib/shell_data_reporting_ap_is/models/card_usage_summary_request.rb', line 97 def self.nullables %w[ col_co_id col_co_code payer_id payer_number account_id account_number card_id pan card_expiry_date ] end |
.optionals ⇒ Object
An array for optional fields
82 83 84 85 86 87 88 89 90 91 92 93 94 |
# File 'lib/shell_data_reporting_ap_is/models/card_usage_summary_request.rb', line 82 def self.optionals %w[ col_co_id col_co_code payer_id payer_number account_id account_number card_id pan card_expiry_date ] end |