Class: ShellCardManagementApIs::FleetmanagementV1UserLoggedinuserRequest

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

Overview

FleetmanagementV1UserLoggedinuserRequest Model.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from BaseModel

#to_hash, #to_json

Constructor Details

#initialize(include_payer_group = false, include_eid_details = false, requested_api_name = SKIP, payer_id = SKIP, payer_number = SKIP) ⇒ FleetmanagementV1UserLoggedinuserRequest

Returns a new instance of FleetmanagementV1UserLoggedinuserRequest.



74
75
76
77
78
79
80
81
82
# File 'lib/shell_card_management_ap_is/models/fleetmanagement_v1_user_loggedinuser_request.rb', line 74

def initialize(include_payer_group = false, include_eid_details = false,
               requested_api_name = SKIP, payer_id = SKIP,
               payer_number = SKIP)
  @include_payer_group = include_payer_group unless include_payer_group == SKIP
  @include_eid_details = include_eid_details unless include_eid_details == SKIP
  @requested_api_name = requested_api_name unless requested_api_name == SKIP
  @payer_id = payer_id unless payer_id == SKIP
  @payer_number = payer_number unless payer_number == SKIP
end

Instance Attribute Details

#include_eid_detailsTrueClass | FalseClass

True/False. The output will include the EID (Electronic Invoice data) information only when true is passed..

Returns:

  • (TrueClass | FalseClass)


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

def include_eid_details
  @include_eid_details
end

#include_payer_groupTrueClass | FalseClass

True/False. The output will include the payer group information only when true is passed.

Returns:

  • (TrueClass | FalseClass)


15
16
17
# File 'lib/shell_card_management_ap_is/models/fleetmanagement_v1_user_loggedinuser_request.rb', line 15

def include_payer_group
  @include_payer_group
end

#payer_idInteger

Payer id of the customer.</br> Optional.</br> This input is a search criterion.</br> Note: If PayerId or PayerNumber is provided in the input, the given payer will be available in the output if the user has access to the given payer.

Returns:

  • (Integer)


33
34
35
# File 'lib/shell_card_management_ap_is/models/fleetmanagement_v1_user_loggedinuser_request.rb', line 33

def payer_id
  @payer_id
end

#payer_numberString

PayerNumber of the customer.</br> Optional</br> This input is a search criterion.</br> Note: If Payerid or PayerNumber is provided in the input, the given payer will be available in the output if the user has access to the given payer.

Returns:

  • (String)


41
42
43
# File 'lib/shell_card_management_ap_is/models/fleetmanagement_v1_user_loggedinuser_request.rb', line 41

def payer_number
  @payer_number
end

#requested_api_nameString

Name of the API on which user access needs to be validated Optional.

Returns:

  • (String)


25
26
27
# File 'lib/shell_card_management_ap_is/models/fleetmanagement_v1_user_loggedinuser_request.rb', line 25

def requested_api_name
  @requested_api_name
end

Class Method Details

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
# File 'lib/shell_card_management_ap_is/models/fleetmanagement_v1_user_loggedinuser_request.rb', line 85

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
  include_payer_group = hash['IncludePayerGroup'] ||= false
  include_eid_details = hash['IncludeEIDDetails'] ||= false
  requested_api_name =
    hash.key?('RequestedAPIName') ? hash['RequestedAPIName'] : SKIP
  payer_id = hash.key?('PayerId') ? hash['PayerId'] : SKIP
  payer_number = hash.key?('PayerNumber') ? hash['PayerNumber'] : SKIP

  # Create object from extracted values.
  FleetmanagementV1UserLoggedinuserRequest.new(include_payer_group,
                                               include_eid_details,
                                               requested_api_name,
                                               payer_id,
                                               payer_number)
end

.namesObject

A mapping from model property names to API property names.



44
45
46
47
48
49
50
51
52
# File 'lib/shell_card_management_ap_is/models/fleetmanagement_v1_user_loggedinuser_request.rb', line 44

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['include_payer_group'] = 'IncludePayerGroup'
  @_hash['include_eid_details'] = 'IncludeEIDDetails'
  @_hash['requested_api_name'] = 'RequestedAPIName'
  @_hash['payer_id'] = 'PayerId'
  @_hash['payer_number'] = 'PayerNumber'
  @_hash
end

.nullablesObject

An array for nullable fields



66
67
68
69
70
71
72
# File 'lib/shell_card_management_ap_is/models/fleetmanagement_v1_user_loggedinuser_request.rb', line 66

def self.nullables
  %w[
    requested_api_name
    payer_id
    payer_number
  ]
end

.optionalsObject

An array for optional fields



55
56
57
58
59
60
61
62
63
# File 'lib/shell_card_management_ap_is/models/fleetmanagement_v1_user_loggedinuser_request.rb', line 55

def self.optionals
  %w[
    include_payer_group
    include_eid_details
    requested_api_name
    payer_id
    payer_number
  ]
end