Class: Unit::Card::CreateBusinessVirtualDebitCardRequest
- Inherits:
-
Object
- Object
- Unit::Card::CreateBusinessVirtualDebitCardRequest
- Defined in:
- lib/unit/models/card/create_business_virtual_debit_card_request.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#account_id ⇒ Object
readonly
Returns the value of attribute account_id.
-
#address ⇒ Object
readonly
Returns the value of attribute address.
-
#date_of_birth ⇒ Object
readonly
Returns the value of attribute date_of_birth.
-
#email ⇒ Object
readonly
Returns the value of attribute email.
-
#expiry_date ⇒ Object
readonly
Returns the value of attribute expiry_date.
-
#full_name ⇒ Object
readonly
Returns the value of attribute full_name.
-
#idempotency_key ⇒ Object
readonly
Returns the value of attribute idempotency_key.
-
#limits ⇒ Object
readonly
Returns the value of attribute limits.
-
#phone ⇒ Object
readonly
Returns the value of attribute phone.
-
#tags ⇒ Object
readonly
Returns the value of attribute tags.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(account_id, full_name, date_of_birth, address, phone, email, idempotency_key = nil, tags = nil, limits = nil, expiry_date = nil) ⇒ CreateBusinessVirtualDebitCardRequest
constructor
A new instance of CreateBusinessVirtualDebitCardRequest.
- #to_json_api ⇒ Object
Constructor Details
#initialize(account_id, full_name, date_of_birth, address, phone, email, idempotency_key = nil, tags = nil, limits = nil, expiry_date = nil) ⇒ CreateBusinessVirtualDebitCardRequest
Returns a new instance of CreateBusinessVirtualDebitCardRequest.
21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
# File 'lib/unit/models/card/create_business_virtual_debit_card_request.rb', line 21 def initialize(account_id, full_name, date_of_birth, address, phone, email, idempotency_key = nil, = nil, limits = nil, expiry_date = nil) @account_id = account_id @full_name = full_name @date_of_birth = date_of_birth @address = address @phone = phone @email = email @idempotency_key = idempotency_key @tags = @limits = limits @expiry_date = expiry_date @type = "businessVirtualDebitCard" end |
Instance Attribute Details
#account_id ⇒ Object (readonly)
Returns the value of attribute account_id.
8 9 10 |
# File 'lib/unit/models/card/create_business_virtual_debit_card_request.rb', line 8 def account_id @account_id end |
#address ⇒ Object (readonly)
Returns the value of attribute address.
8 9 10 |
# File 'lib/unit/models/card/create_business_virtual_debit_card_request.rb', line 8 def address @address end |
#date_of_birth ⇒ Object (readonly)
Returns the value of attribute date_of_birth.
8 9 10 |
# File 'lib/unit/models/card/create_business_virtual_debit_card_request.rb', line 8 def date_of_birth @date_of_birth end |
#email ⇒ Object (readonly)
Returns the value of attribute email.
8 9 10 |
# File 'lib/unit/models/card/create_business_virtual_debit_card_request.rb', line 8 def email @email end |
#expiry_date ⇒ Object (readonly)
Returns the value of attribute expiry_date.
8 9 10 |
# File 'lib/unit/models/card/create_business_virtual_debit_card_request.rb', line 8 def expiry_date @expiry_date end |
#full_name ⇒ Object (readonly)
Returns the value of attribute full_name.
8 9 10 |
# File 'lib/unit/models/card/create_business_virtual_debit_card_request.rb', line 8 def full_name @full_name end |
#idempotency_key ⇒ Object (readonly)
Returns the value of attribute idempotency_key.
8 9 10 |
# File 'lib/unit/models/card/create_business_virtual_debit_card_request.rb', line 8 def idempotency_key @idempotency_key end |
#limits ⇒ Object (readonly)
Returns the value of attribute limits.
8 9 10 |
# File 'lib/unit/models/card/create_business_virtual_debit_card_request.rb', line 8 def limits @limits end |
#phone ⇒ Object (readonly)
Returns the value of attribute phone.
8 9 10 |
# File 'lib/unit/models/card/create_business_virtual_debit_card_request.rb', line 8 def phone @phone end |
#tags ⇒ Object (readonly)
Returns the value of attribute tags.
8 9 10 |
# File 'lib/unit/models/card/create_business_virtual_debit_card_request.rb', line 8 def @tags end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
8 9 10 |
# File 'lib/unit/models/card/create_business_virtual_debit_card_request.rb', line 8 def type @type end |
Instance Method Details
#to_json_api ⇒ Object
36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 |
# File 'lib/unit/models/card/create_business_virtual_debit_card_request.rb', line 36 def to_json_api payload = { "data": { "type": type, "attributes": { "fullName": full_name&.represent, "dateOfBirth": date_of_birth, "address": address&.represent, "phone": phone&.represent, "email": email, "idempotencyKey": idempotency_key, "tags": , "limits": limits, "expiryDate": expiry_date }.compact!, "relationships": { "account": Unit::Types::Relationship.new("depositAccount", account_id).to_hash } } } payload.to_json end |