Class: ShellCardManagementApIs::AutoRenewCardRequest
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- ShellCardManagementApIs::AutoRenewCardRequest
- Defined in:
- lib/shell_card_management_ap_is/models/auto_renew_card_request.rb
Overview
AutoRenewCardRequest Model.
Instance Attribute Summary collapse
-
#auto_renew_cards ⇒ Array[AutoRenewCardRequestAutoRenewCardsItems]
Payer Id of the selected payer.
-
#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 selected payer.
-
#payer_number ⇒ String
Payer Number (Ex: GB000000123) 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_number = SKIP, payer_id = SKIP, auto_renew_cards = SKIP) ⇒ AutoRenewCardRequest
constructor
A new instance of AutoRenewCardRequest.
Methods inherited from BaseModel
Constructor Details
#initialize(col_co_id = SKIP, col_co_code = SKIP, payer_number = SKIP, payer_id = SKIP, auto_renew_cards = SKIP) ⇒ AutoRenewCardRequest
Returns a new instance of AutoRenewCardRequest.
71 72 73 74 75 76 77 78 |
# File 'lib/shell_card_management_ap_is/models/auto_renew_card_request.rb', line 71 def initialize(col_co_id = SKIP, col_co_code = SKIP, payer_number = SKIP, payer_id = SKIP, auto_renew_cards = SKIP) @col_co_id = col_co_id unless col_co_id == SKIP @col_co_code = col_co_code unless col_co_code == SKIP @payer_number = payer_number unless payer_number == SKIP @payer_id = payer_id unless payer_id == SKIP @auto_renew_cards = auto_renew_cards unless auto_renew_cards == SKIP end |
Instance Attribute Details
#auto_renew_cards ⇒ Array[AutoRenewCardRequestAutoRenewCardsItems]
Payer Id of the selected payer. Optional if PayerNumber is passed else Mandatory
42 43 44 |
# File 'lib/shell_card_management_ap_is/models/auto_renew_card_request.rb', line 42 def auto_renew_cards @auto_renew_cards 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-Philippines 5-UK
27 28 29 |
# File 'lib/shell_card_management_ap_is/models/auto_renew_card_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-Philippines 5-UK
18 19 20 |
# File 'lib/shell_card_management_ap_is/models/auto_renew_card_request.rb', line 18 def col_co_id @col_co_id end |
#payer_id ⇒ Integer
Payer Id of the selected payer. Optional if PayerNumber is passed else Mandatory
37 38 39 |
# File 'lib/shell_card_management_ap_is/models/auto_renew_card_request.rb', line 37 def payer_id @payer_id end |
#payer_number ⇒ String
Payer Number (Ex: GB000000123) of the selected payer. Optional if PayerId is passed else Mandatory
32 33 34 |
# File 'lib/shell_card_management_ap_is/models/auto_renew_card_request.rb', line 32 def payer_number @payer_number end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 |
# File 'lib/shell_card_management_ap_is/models/auto_renew_card_request.rb', line 81 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_number = hash.key?('PayerNumber') ? hash['PayerNumber'] : SKIP payer_id = hash.key?('PayerId') ? hash['PayerId'] : SKIP # Parameter is an array, so we need to iterate through it auto_renew_cards = nil unless hash['AutoRenewCards'].nil? auto_renew_cards = [] hash['AutoRenewCards'].each do |structure| auto_renew_cards << (AutoRenewCardRequestAutoRenewCardsItems.from_hash(structure) if structure) end end auto_renew_cards = SKIP unless hash.key?('AutoRenewCards') # Create object from extracted values. AutoRenewCardRequest.new(col_co_id, col_co_code, payer_number, payer_id, auto_renew_cards) end |
.names ⇒ Object
A mapping from model property names to API property names.
45 46 47 48 49 50 51 52 53 |
# File 'lib/shell_card_management_ap_is/models/auto_renew_card_request.rb', line 45 def self.names @_hash = {} if @_hash.nil? @_hash['col_co_id'] = 'ColCoId' @_hash['col_co_code'] = 'ColCoCode' @_hash['payer_number'] = 'PayerNumber' @_hash['payer_id'] = 'PayerId' @_hash['auto_renew_cards'] = 'AutoRenewCards' @_hash end |
.nullables ⇒ Object
An array for nullable fields
67 68 69 |
# File 'lib/shell_card_management_ap_is/models/auto_renew_card_request.rb', line 67 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
56 57 58 59 60 61 62 63 64 |
# File 'lib/shell_card_management_ap_is/models/auto_renew_card_request.rb', line 56 def self.optionals %w[ col_co_id col_co_code payer_number payer_id auto_renew_cards ] end |