Class: FdxV660Api::RequestForPaymentSummaryEntity
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- FdxV660Api::RequestForPaymentSummaryEntity
- Defined in:
- lib/fdx_v660_api/models/request_for_payment_summary_entity.rb
Overview
Summary information for a prior request for payment
Instance Attribute Summary collapse
-
#account_id ⇒ String
ID of the account used to source funds for payment.
-
#amount ⇒ Float
Amount for the payment.
-
#currency_code ⇒ Iso4217CurrencyCode6
Currency code if it is different from the account's currency.
-
#description ⇒ String
The purpose of the request for payment as provided by consumer or payment-requesting app.
-
#due_date ⇒ Date
Date that the funds are being requested to be delivered.
-
#link ⇒ HateoasLink7
Resource URL for retrieving full request for payment details.
-
#payee ⇒ PayeeEntity1
The payee merchant to receive funds from the payment, can be extended to support additional types of payees.
-
#rfp_id ⇒ String
Uniquely identifies a request for payment.
-
#status ⇒ RequestForPaymentStatus2
The current status of the request for payment.
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(rfp_id: SKIP, account_id: SKIP, amount: SKIP, currency_code: SKIP, payee: SKIP, due_date: SKIP, status: SKIP, description: SKIP, link: SKIP, additional_properties: nil) ⇒ RequestForPaymentSummaryEntity
constructor
A new instance of RequestForPaymentSummaryEntity.
-
#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(rfp_id: SKIP, account_id: SKIP, amount: SKIP, currency_code: SKIP, payee: SKIP, due_date: SKIP, status: SKIP, description: SKIP, link: SKIP, additional_properties: nil) ⇒ RequestForPaymentSummaryEntity
Returns a new instance of RequestForPaymentSummaryEntity.
85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 |
# File 'lib/fdx_v660_api/models/request_for_payment_summary_entity.rb', line 85 def initialize(rfp_id: SKIP, account_id: SKIP, amount: SKIP, currency_code: SKIP, payee: SKIP, due_date: SKIP, status: SKIP, description: SKIP, link: SKIP, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @rfp_id = rfp_id unless rfp_id == SKIP @account_id = account_id unless account_id == SKIP @amount = amount unless amount == SKIP @currency_code = currency_code unless currency_code == SKIP @payee = payee unless payee == SKIP @due_date = due_date unless due_date == SKIP @status = status unless status == SKIP @description = description unless description == SKIP @link = link unless link == SKIP @additional_properties = additional_properties end |
Instance Attribute Details
#account_id ⇒ String
ID of the account used to source funds for payment
18 19 20 |
# File 'lib/fdx_v660_api/models/request_for_payment_summary_entity.rb', line 18 def account_id @account_id end |
#amount ⇒ Float
Amount for the payment. Must be positive
22 23 24 |
# File 'lib/fdx_v660_api/models/request_for_payment_summary_entity.rb', line 22 def amount @amount end |
#currency_code ⇒ Iso4217CurrencyCode6
Currency code if it is different from the account's currency
26 27 28 |
# File 'lib/fdx_v660_api/models/request_for_payment_summary_entity.rb', line 26 def currency_code @currency_code end |
#description ⇒ String
The purpose of the request for payment as provided by consumer or payment-requesting app
44 45 46 |
# File 'lib/fdx_v660_api/models/request_for_payment_summary_entity.rb', line 44 def description @description end |
#due_date ⇒ Date
Date that the funds are being requested to be delivered
35 36 37 |
# File 'lib/fdx_v660_api/models/request_for_payment_summary_entity.rb', line 35 def due_date @due_date end |
#link ⇒ HateoasLink7
Resource URL for retrieving full request for payment details
48 49 50 |
# File 'lib/fdx_v660_api/models/request_for_payment_summary_entity.rb', line 48 def link @link end |
#payee ⇒ PayeeEntity1
The payee merchant to receive funds from the payment, can be extended to support additional types of payees
31 32 33 |
# File 'lib/fdx_v660_api/models/request_for_payment_summary_entity.rb', line 31 def payee @payee end |
#rfp_id ⇒ String
Uniquely identifies a request for payment
14 15 16 |
# File 'lib/fdx_v660_api/models/request_for_payment_summary_entity.rb', line 14 def rfp_id @rfp_id end |
#status ⇒ RequestForPaymentStatus2
The current status of the request for payment
39 40 41 |
# File 'lib/fdx_v660_api/models/request_for_payment_summary_entity.rb', line 39 def status @status end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 |
# File 'lib/fdx_v660_api/models/request_for_payment_summary_entity.rb', line 105 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. rfp_id = hash.key?('rfpId') ? hash['rfpId'] : SKIP account_id = hash.key?('accountId') ? hash['accountId'] : SKIP amount = hash.key?('amount') ? hash['amount'] : SKIP currency_code = hash.key?('currencyCode') ? hash['currencyCode'] : SKIP payee = PayeeEntity1.from_hash(hash['payee']) if hash['payee'] due_date = hash.key?('dueDate') ? hash['dueDate'] : SKIP status = hash.key?('status') ? hash['status'] : SKIP description = hash.key?('description') ? hash['description'] : SKIP link = HateoasLink7.from_hash(hash['link']) if hash['link'] # 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. RequestForPaymentSummaryEntity.new(rfp_id: rfp_id, account_id: account_id, amount: amount, currency_code: currency_code, payee: payee, due_date: due_date, status: status, description: description, link: link, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
51 52 53 54 55 56 57 58 59 60 61 62 63 |
# File 'lib/fdx_v660_api/models/request_for_payment_summary_entity.rb', line 51 def self.names @_hash = {} if @_hash.nil? @_hash['rfp_id'] = 'rfpId' @_hash['account_id'] = 'accountId' @_hash['amount'] = 'amount' @_hash['currency_code'] = 'currencyCode' @_hash['payee'] = 'payee' @_hash['due_date'] = 'dueDate' @_hash['status'] = 'status' @_hash['description'] = 'description' @_hash['link'] = 'link' @_hash end |
.nullables ⇒ Object
An array for nullable fields
81 82 83 |
# File 'lib/fdx_v660_api/models/request_for_payment_summary_entity.rb', line 81 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
66 67 68 69 70 71 72 73 74 75 76 77 78 |
# File 'lib/fdx_v660_api/models/request_for_payment_summary_entity.rb', line 66 def self.optionals %w[ rfp_id account_id amount currency_code payee due_date status description link ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
149 150 151 152 153 154 155 156 |
# File 'lib/fdx_v660_api/models/request_for_payment_summary_entity.rb', line 149 def inspect class_name = self.class.name.split('::').last "<#{class_name} rfp_id: #{@rfp_id.inspect}, account_id: #{@account_id.inspect}, amount:"\ " #{@amount.inspect}, currency_code: #{@currency_code.inspect}, payee: #{@payee.inspect},"\ " due_date: #{@due_date.inspect}, status: #{@status.inspect}, description:"\ " #{@description.inspect}, link: #{@link.inspect}, additional_properties:"\ " #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
140 141 142 143 144 145 146 |
# File 'lib/fdx_v660_api/models/request_for_payment_summary_entity.rb', line 140 def to_s class_name = self.class.name.split('::').last "<#{class_name} rfp_id: #{@rfp_id}, account_id: #{@account_id}, amount: #{@amount},"\ " currency_code: #{@currency_code}, payee: #{@payee}, due_date: #{@due_date}, status:"\ " #{@status}, description: #{@description}, link: #{@link}, additional_properties:"\ " #{@additional_properties}>" end |