Class: Unit::Card::PatchBusinessVirtualCardRequest
- Inherits:
-
Object
- Object
- Unit::Card::PatchBusinessVirtualCardRequest
- Defined in:
- lib/unit/models/card/patch_business_virtual_card_request.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#address ⇒ Object
readonly
Returns the value of attribute address.
-
#card_id ⇒ Object
readonly
Returns the value of attribute card_id.
-
#email ⇒ Object
readonly
Returns the value of attribute email.
-
#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(card_id, address = nil, phone = nil, email = nil, tags = nil, limits = nil) ⇒ PatchBusinessVirtualCardRequest
constructor
A new instance of PatchBusinessVirtualCardRequest.
- #to_json_api ⇒ Object
Constructor Details
#initialize(card_id, address = nil, phone = nil, email = nil, tags = nil, limits = nil) ⇒ PatchBusinessVirtualCardRequest
Returns a new instance of PatchBusinessVirtualCardRequest.
16 17 18 19 20 21 22 23 24 |
# File 'lib/unit/models/card/patch_business_virtual_card_request.rb', line 16 def initialize(card_id, address = nil, phone = nil, email = nil, = nil, limits = nil) @card_id = card_id @address = address @phone = phone @email = email @tags = @limits = limits @type = "businessVirtualDebitCard" end |
Instance Attribute Details
#address ⇒ Object (readonly)
Returns the value of attribute address.
8 9 10 |
# File 'lib/unit/models/card/patch_business_virtual_card_request.rb', line 8 def address @address end |
#card_id ⇒ Object (readonly)
Returns the value of attribute card_id.
8 9 10 |
# File 'lib/unit/models/card/patch_business_virtual_card_request.rb', line 8 def card_id @card_id end |
#email ⇒ Object (readonly)
Returns the value of attribute email.
8 9 10 |
# File 'lib/unit/models/card/patch_business_virtual_card_request.rb', line 8 def email @email end |
#limits ⇒ Object (readonly)
Returns the value of attribute limits.
8 9 10 |
# File 'lib/unit/models/card/patch_business_virtual_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/patch_business_virtual_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/patch_business_virtual_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/patch_business_virtual_card_request.rb', line 8 def type @type end |
Instance Method Details
#to_json_api ⇒ Object
26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 |
# File 'lib/unit/models/card/patch_business_virtual_card_request.rb', line 26 def to_json_api payload = { "data": { "type": type, "attributes": { "address": address, "phone": phone, "email": email, "tags": , "limits": limits }.compact } } payload.to_json end |