Class: ShellCardManagementApIs::UpdateMPayRegStatusRequestMPayRequestsItems

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

Overview

UpdateMPayRegStatusRequestMPayRequestsItems Model.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from BaseModel

#to_hash, #to_json

Constructor Details

#initialize(global_request_id = SKIP, status = SKIP, approver_user_id = SKIP, approver_user_display_name = SKIP, reason = SKIP) ⇒ UpdateMPayRegStatusRequestMPayRequestsItems

Returns a new instance of UpdateMPayRegStatusRequestMPayRequestsItems.



68
69
70
71
72
73
74
75
76
77
78
79
# File 'lib/shell_card_management_ap_is/models/update_m_pay_reg_status_request_m_pay_requests_items.rb', line 68

def initialize(global_request_id = SKIP, status = SKIP,
               approver_user_id = SKIP, approver_user_display_name = SKIP,
               reason = SKIP)
  @global_request_id = global_request_id unless global_request_id == SKIP
  @status = status unless status == SKIP
  @approver_user_id = approver_user_id unless approver_user_id == SKIP
  unless approver_user_display_name == SKIP
    @approver_user_display_name =
      approver_user_display_name
  end
  @reason = reason unless reason == SKIP
end

Instance Attribute Details

#approver_user_display_nameString

Approver’s display name Mandatory when Status is Approved else optional.

Returns:

  • (String)


34
35
36
# File 'lib/shell_card_management_ap_is/models/update_m_pay_reg_status_request_m_pay_requests_items.rb', line 34

def approver_user_display_name
  @approver_user_display_name
end

#approver_user_idString

Approver’s User ID ApproverUserID is mandatory when Status is Approved else optional

Returns:

  • (String)


29
30
31
# File 'lib/shell_card_management_ap_is/models/update_m_pay_reg_status_request_m_pay_requests_items.rb', line 29

def approver_user_id
  @approver_user_id
end

#global_request_idString

List of MPay Request to be updated for Fleet Manager approval status. Mandatory Maximum number of requests that can be submitted are 50

Returns:

  • (String)


16
17
18
# File 'lib/shell_card_management_ap_is/models/update_m_pay_reg_status_request_m_pay_requests_items.rb', line 16

def global_request_id
  @global_request_id
end

#reasonString

Reason for Fleet Manager approval/rejection. Optional

Returns:

  • (String)


39
40
41
# File 'lib/shell_card_management_ap_is/models/update_m_pay_reg_status_request_m_pay_requests_items.rb', line 39

def reason
  @reason
end

#statusString

Status of mobile payment registration request Mandatory. Allowed values – • Approved • Rejected

Returns:

  • (String)


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

def status
  @status
end

Class Method Details

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



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

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
  global_request_id =
    hash.key?('GlobalRequestID') ? hash['GlobalRequestID'] : SKIP
  status = hash.key?('Status') ? hash['Status'] : SKIP
  approver_user_id =
    hash.key?('ApproverUserID') ? hash['ApproverUserID'] : SKIP
  approver_user_display_name =
    hash.key?('ApproverUserDisplayName') ? hash['ApproverUserDisplayName'] : SKIP
  reason = hash.key?('Reason') ? hash['Reason'] : SKIP

  # Create object from extracted values.
  UpdateMPayRegStatusRequestMPayRequestsItems.new(global_request_id,
                                                  status,
                                                  approver_user_id,
                                                  approver_user_display_name,
                                                  reason)
end

.namesObject

A mapping from model property names to API property names.



42
43
44
45
46
47
48
49
50
# File 'lib/shell_card_management_ap_is/models/update_m_pay_reg_status_request_m_pay_requests_items.rb', line 42

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['global_request_id'] = 'GlobalRequestID'
  @_hash['status'] = 'Status'
  @_hash['approver_user_id'] = 'ApproverUserID'
  @_hash['approver_user_display_name'] = 'ApproverUserDisplayName'
  @_hash['reason'] = 'Reason'
  @_hash
end

.nullablesObject

An array for nullable fields



64
65
66
# File 'lib/shell_card_management_ap_is/models/update_m_pay_reg_status_request_m_pay_requests_items.rb', line 64

def self.nullables
  []
end

.optionalsObject

An array for optional fields



53
54
55
56
57
58
59
60
61
# File 'lib/shell_card_management_ap_is/models/update_m_pay_reg_status_request_m_pay_requests_items.rb', line 53

def self.optionals
  %w[
    global_request_id
    status
    approver_user_id
    approver_user_display_name
    reason
  ]
end