Class: FdxV660Api::PaystubEntity2
- Defined in:
- lib/fdx_v660_api/models/paystub_entity2.rb
Overview
JSON response containing Base64-encoded PaystubPdf content if not encrypted, or as the JSON payload which is encrypted for an application/jwt response
Instance Attribute Summary collapse
-
#embedded_data ⇒ TrueClass | FalseClass
Whether the paystub PDF also contains an embedded JSON payload of the Paystub data.
-
#paystub_id ⇒ String
The paystub identification number requested.
-
#paystub_pdf ⇒ Binary
The Base64-encoded content of the paystub PDF file.
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(paystub_id: SKIP, paystub_pdf: SKIP, embedded_data: SKIP, additional_properties: nil) ⇒ PaystubEntity2
constructor
A new instance of PaystubEntity2.
-
#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(paystub_id: SKIP, paystub_pdf: SKIP, embedded_data: SKIP, additional_properties: nil) ⇒ PaystubEntity2
Returns a new instance of PaystubEntity2.
56 57 58 59 60 61 62 63 64 65 |
# File 'lib/fdx_v660_api/models/paystub_entity2.rb', line 56 def initialize(paystub_id: SKIP, paystub_pdf: SKIP, embedded_data: SKIP, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @paystub_id = paystub_id unless paystub_id == SKIP @paystub_pdf = paystub_pdf unless paystub_pdf == SKIP @embedded_data = unless == SKIP @additional_properties = additional_properties end |
Instance Attribute Details
#embedded_data ⇒ TrueClass | FalseClass
Whether the paystub PDF also contains an embedded JSON payload of the
Paystub data. That should include three custom properties: fdxVersion
containing the version number of the FDX release, fdxSoftwareId if
software creating the embedded data is registered with FDX, and fdxJson
containing the JSON payload matching the Paystub entity defined here
31 32 33 |
# File 'lib/fdx_v660_api/models/paystub_entity2.rb', line 31 def @embedded_data end |
#paystub_id ⇒ String
The paystub identification number requested. This can be any ID which the data provider creates specific to the consenting person's paystub, perhaps simply the pay date as a string optionally followed by a sequence number: "2024-09-30-01". Need only be unique within the current employee's consent / token, according to data provider's preference
19 20 21 |
# File 'lib/fdx_v660_api/models/paystub_entity2.rb', line 19 def paystub_id @paystub_id end |
#paystub_pdf ⇒ Binary
The Base64-encoded content of the paystub PDF file
23 24 25 |
# File 'lib/fdx_v660_api/models/paystub_entity2.rb', line 23 def paystub_pdf @paystub_pdf end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 |
# File 'lib/fdx_v660_api/models/paystub_entity2.rb', line 68 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. paystub_id = hash.key?('paystubId') ? hash['paystubId'] : SKIP paystub_pdf = hash.key?('paystubPdf') ? hash['paystubPdf'] : SKIP = hash.key?('embeddedData') ? hash['embeddedData'] : SKIP # 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. PaystubEntity2.new(paystub_id: paystub_id, paystub_pdf: paystub_pdf, embedded_data: , additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
34 35 36 37 38 39 40 |
# File 'lib/fdx_v660_api/models/paystub_entity2.rb', line 34 def self.names @_hash = {} if @_hash.nil? @_hash['paystub_id'] = 'paystubId' @_hash['paystub_pdf'] = 'paystubPdf' @_hash['embedded_data'] = 'embeddedData' @_hash end |
.nullables ⇒ Object
An array for nullable fields
52 53 54 |
# File 'lib/fdx_v660_api/models/paystub_entity2.rb', line 52 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
43 44 45 46 47 48 49 |
# File 'lib/fdx_v660_api/models/paystub_entity2.rb', line 43 def self.optionals %w[ paystub_id paystub_pdf embedded_data ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
98 99 100 101 102 103 |
# File 'lib/fdx_v660_api/models/paystub_entity2.rb', line 98 def inspect class_name = self.class.name.split('::').last "<#{class_name} paystub_id: #{@paystub_id.inspect}, paystub_pdf: #{@paystub_pdf.inspect},"\ " embedded_data: #{@embedded_data.inspect}, additional_properties:"\ " #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
91 92 93 94 95 |
# File 'lib/fdx_v660_api/models/paystub_entity2.rb', line 91 def to_s class_name = self.class.name.split('::').last "<#{class_name} paystub_id: #{@paystub_id}, paystub_pdf: #{@paystub_pdf}, embedded_data:"\ " #{@embedded_data}, additional_properties: #{@additional_properties}>" end |