Class: StarkInfra::CreditNote::Signer
- Inherits:
-
Utils::SubResource
- Object
- Utils::SubResource
- StarkInfra::CreditNote::Signer
- Defined in:
- lib/creditnote/creditnote.rb
Overview
# CreditNote::Signer object
The Signer object stores the CreditNote signer’s information.
## Parameters (required):
-
name [string]: signer’s name. ex: ‘Tony Stark’
-
contact [string]: signer’s contact information. ex: ‘[email protected]’
-
method [string]: delivery method for the contract. ex: ‘link’
Instance Attribute Summary collapse
-
#contact ⇒ Object
readonly
Returns the value of attribute contact.
-
#method ⇒ Object
readonly
Returns the value of attribute method.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(name:, contact:, method:) ⇒ Signer
constructor
A new instance of Signer.
Methods inherited from Utils::SubResource
Constructor Details
#initialize(name:, contact:, method:) ⇒ Signer
Returns a new instance of Signer.
358 359 360 361 362 |
# File 'lib/creditnote/creditnote.rb', line 358 def initialize(name:, contact:, method:) @name = name @contact = contact @method = method end |
Instance Attribute Details
#contact ⇒ Object (readonly)
Returns the value of attribute contact.
357 358 359 |
# File 'lib/creditnote/creditnote.rb', line 357 def contact @contact end |
#method ⇒ Object (readonly)
Returns the value of attribute method.
357 358 359 |
# File 'lib/creditnote/creditnote.rb', line 357 def method @method end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
357 358 359 |
# File 'lib/creditnote/creditnote.rb', line 357 def name @name end |
Class Method Details
.parse_signers(signers) ⇒ Object
364 365 366 367 368 369 370 371 372 373 374 375 |
# File 'lib/creditnote/creditnote.rb', line 364 def self.parse_signers(signers) return signers if signers.nil? parsed_signers = [] signers.each do |signer| unless signer.is_a? Signer signer = StarkInfra::Utils::API.from_api_json(resource[:resource_maker], signer) end parsed_signers << signer end parsed_signers end |