Class: Unit::Application::CreateTrustApplicationRequest
- Inherits:
-
Object
- Object
- Unit::Application::CreateTrustApplicationRequest
- Defined in:
- lib/unit/models/application/create_trust_application_request.rb
Instance Attribute Summary collapse
-
#beneficiaries ⇒ Object
readonly
Returns the value of attribute beneficiaries.
-
#contact ⇒ Object
readonly
Returns the value of attribute contact.
-
#device_fingerprints ⇒ Object
readonly
Returns the value of attribute device_fingerprints.
-
#grantor ⇒ Object
readonly
Returns the value of attribute grantor.
-
#idempotency_key ⇒ Object
readonly
Returns the value of attribute idempotency_key.
-
#ip ⇒ Object
readonly
Returns the value of attribute ip.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#revocability ⇒ Object
readonly
Returns the value of attribute revocability.
-
#source_of_funds ⇒ Object
readonly
Returns the value of attribute source_of_funds.
-
#state_of_incorporation ⇒ Object
readonly
Returns the value of attribute state_of_incorporation.
-
#tags ⇒ Object
readonly
Returns the value of attribute tags.
-
#tax_id ⇒ Object
readonly
Returns the value of attribute tax_id.
-
#trustees ⇒ Object
readonly
Returns the value of attribute trustees.
Instance Method Summary collapse
-
#initialize(name, state_of_incorporation, revocability, source_of_funds, tax_id, grantor, trustees, beneficiaries, contact, ip = nil, tags = nil, idempotency_key = nil, device_fingerprints = nil) ⇒ CreateTrustApplicationRequest
constructor
A new instance of CreateTrustApplicationRequest.
- #to_json_api ⇒ Object
Constructor Details
#initialize(name, state_of_incorporation, revocability, source_of_funds, tax_id, grantor, trustees, beneficiaries, contact, ip = nil, tags = nil, idempotency_key = nil, device_fingerprints = nil) ⇒ CreateTrustApplicationRequest
Returns a new instance of CreateTrustApplicationRequest.
24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 |
# File 'lib/unit/models/application/create_trust_application_request.rb', line 24 def initialize(name, state_of_incorporation, revocability, source_of_funds, tax_id, grantor, trustees, beneficiaries, contact, ip = nil, = nil, idempotency_key = nil, device_fingerprints = nil) @name = name @state_of_incorporation = state_of_incorporation @revocability = revocability @source_of_funds = source_of_funds @tax_id = tax_id @grantor = grantor @trustees = trustees @beneficiaries = beneficiaries @contact = contact @ip = ip @tags = @idempotency_key = idempotency_key @device_fingerprints = device_fingerprints end |
Instance Attribute Details
#beneficiaries ⇒ Object (readonly)
Returns the value of attribute beneficiaries.
8 9 10 |
# File 'lib/unit/models/application/create_trust_application_request.rb', line 8 def beneficiaries @beneficiaries end |
#contact ⇒ Object (readonly)
Returns the value of attribute contact.
8 9 10 |
# File 'lib/unit/models/application/create_trust_application_request.rb', line 8 def contact @contact end |
#device_fingerprints ⇒ Object (readonly)
Returns the value of attribute device_fingerprints.
8 9 10 |
# File 'lib/unit/models/application/create_trust_application_request.rb', line 8 def device_fingerprints @device_fingerprints end |
#grantor ⇒ Object (readonly)
Returns the value of attribute grantor.
8 9 10 |
# File 'lib/unit/models/application/create_trust_application_request.rb', line 8 def grantor @grantor end |
#idempotency_key ⇒ Object (readonly)
Returns the value of attribute idempotency_key.
8 9 10 |
# File 'lib/unit/models/application/create_trust_application_request.rb', line 8 def idempotency_key @idempotency_key end |
#ip ⇒ Object (readonly)
Returns the value of attribute ip.
8 9 10 |
# File 'lib/unit/models/application/create_trust_application_request.rb', line 8 def ip @ip end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
8 9 10 |
# File 'lib/unit/models/application/create_trust_application_request.rb', line 8 def name @name end |
#revocability ⇒ Object (readonly)
Returns the value of attribute revocability.
8 9 10 |
# File 'lib/unit/models/application/create_trust_application_request.rb', line 8 def revocability @revocability end |
#source_of_funds ⇒ Object (readonly)
Returns the value of attribute source_of_funds.
8 9 10 |
# File 'lib/unit/models/application/create_trust_application_request.rb', line 8 def source_of_funds @source_of_funds end |
#state_of_incorporation ⇒ Object (readonly)
Returns the value of attribute state_of_incorporation.
8 9 10 |
# File 'lib/unit/models/application/create_trust_application_request.rb', line 8 def state_of_incorporation @state_of_incorporation end |
#tags ⇒ Object (readonly)
Returns the value of attribute tags.
8 9 10 |
# File 'lib/unit/models/application/create_trust_application_request.rb', line 8 def @tags end |
#tax_id ⇒ Object (readonly)
Returns the value of attribute tax_id.
8 9 10 |
# File 'lib/unit/models/application/create_trust_application_request.rb', line 8 def tax_id @tax_id end |
#trustees ⇒ Object (readonly)
Returns the value of attribute trustees.
8 9 10 |
# File 'lib/unit/models/application/create_trust_application_request.rb', line 8 def trustees @trustees end |
Instance Method Details
#to_json_api ⇒ Object
41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 |
# File 'lib/unit/models/application/create_trust_application_request.rb', line 41 def to_json_api payload = { data: { type: "trustApplication", attributes: { name: name, stateOfIncorporation: state_of_incorporation, revocability: revocability, sourceOfFunds: source_of_funds, taxId: tax_id, grantor: grantor&.represent, trustees: trustees, beneficiaries: beneficiaries, contact: contact&.represent, ip: ip, tags: , idempotencyKey: idempotency_key, deviceFingerprints: device_fingerprints } } } payload[:data][:attributes].compact! payload.to_json end |