Class: FdxV660Api::RequestForPaymentsEntity
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- FdxV660Api::RequestForPaymentsEntity
- Defined in:
- lib/fdx_v660_api/models/request_for_payments_entity.rb
Overview
Search result list of submitted request for payments
Instance Attribute Summary collapse
-
#links ⇒ SynchronizableArrayLinksEntity2
Resource URLs for navigating result sets.
-
#page ⇒ PageMetadata
Page keys for navigating result sets.
-
#rfps ⇒ Array[RequestForPaymentSummaryEntity]
Search result list of request for payments.
-
#updates ⇒ UpdatesMetadataEntity2
Update IDs for retrieving updates since query.
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(rfps:, page: SKIP, updates: SKIP, links: SKIP, additional_properties: nil) ⇒ RequestForPaymentsEntity
constructor
A new instance of RequestForPaymentsEntity.
-
#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(rfps:, page: SKIP, updates: SKIP, links: SKIP, additional_properties: nil) ⇒ RequestForPaymentsEntity
Returns a new instance of RequestForPaymentsEntity.
52 53 54 55 56 57 58 59 60 61 62 |
# File 'lib/fdx_v660_api/models/request_for_payments_entity.rb', line 52 def initialize(rfps:, page: SKIP, updates: SKIP, links: SKIP, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @page = page unless page == SKIP @updates = updates unless updates == SKIP @links = links unless links == SKIP @rfps = rfps @additional_properties = additional_properties end |
Instance Attribute Details
#links ⇒ SynchronizableArrayLinksEntity2
Resource URLs for navigating result sets
22 23 24 |
# File 'lib/fdx_v660_api/models/request_for_payments_entity.rb', line 22 def links @links end |
#page ⇒ PageMetadata
Page keys for navigating result sets
14 15 16 |
# File 'lib/fdx_v660_api/models/request_for_payments_entity.rb', line 14 def page @page end |
#rfps ⇒ Array[RequestForPaymentSummaryEntity]
Search result list of request for payments
26 27 28 |
# File 'lib/fdx_v660_api/models/request_for_payments_entity.rb', line 26 def rfps @rfps end |
#updates ⇒ UpdatesMetadataEntity2
Update IDs for retrieving updates since query
18 19 20 |
# File 'lib/fdx_v660_api/models/request_for_payments_entity.rb', line 18 def updates @updates end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 |
# File 'lib/fdx_v660_api/models/request_for_payments_entity.rb', line 65 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. # Parameter is an array, so we need to iterate through it rfps = nil unless hash['rfps'].nil? rfps = [] hash['rfps'].each do |structure| rfps << (RequestForPaymentSummaryEntity.from_hash(structure) if structure) end end rfps = nil unless hash.key?('rfps') page = PageMetadata.from_hash(hash['page']) if hash['page'] updates = UpdatesMetadataEntity2.from_hash(hash['updates']) if hash['updates'] links = SynchronizableArrayLinksEntity2.from_hash(hash['links']) if hash['links'] # Create a new hash for additional properties, removing known properties. new_hash = hash.reject { |k, _| names.value?(k) } additional_properties = APIHelper.get_additional_properties( new_hash, proc { |value| value } ) # Create object from extracted values. RequestForPaymentsEntity.new(rfps: rfps, page: page, updates: updates, links: links, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
29 30 31 32 33 34 35 36 |
# File 'lib/fdx_v660_api/models/request_for_payments_entity.rb', line 29 def self.names @_hash = {} if @_hash.nil? @_hash['page'] = 'page' @_hash['updates'] = 'updates' @_hash['links'] = 'links' @_hash['rfps'] = 'rfps' @_hash end |
.nullables ⇒ Object
An array for nullable fields
48 49 50 |
# File 'lib/fdx_v660_api/models/request_for_payments_entity.rb', line 48 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
39 40 41 42 43 44 45 |
# File 'lib/fdx_v660_api/models/request_for_payments_entity.rb', line 39 def self.optionals %w[ page updates links ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
106 107 108 109 110 111 |
# File 'lib/fdx_v660_api/models/request_for_payments_entity.rb', line 106 def inspect class_name = self.class.name.split('::').last "<#{class_name} page: #{@page.inspect}, updates: #{@updates.inspect}, links:"\ " #{@links.inspect}, rfps: #{@rfps.inspect}, additional_properties:"\ " #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
99 100 101 102 103 |
# File 'lib/fdx_v660_api/models/request_for_payments_entity.rb', line 99 def to_s class_name = self.class.name.split('::').last "<#{class_name} page: #{@page}, updates: #{@updates}, links: #{@links}, rfps: #{@rfps},"\ " additional_properties: #{@additional_properties}>" end |