Class: Unit::Card::PatchBusinessCardRequest
- Inherits:
-
Object
- Object
- Unit::Card::PatchBusinessCardRequest
- Defined in:
- lib/unit/models/card/patch_business_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.
-
#design ⇒ Object
readonly
Returns the value of attribute design.
-
#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.
-
#shipping_address ⇒ Object
readonly
Returns the value of attribute shipping_address.
-
#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, shipping_address = nil, address = nil, phone = nil, email = nil, design = nil, tags = nil, limits = nil) ⇒ PatchBusinessCardRequest
constructor
A new instance of PatchBusinessCardRequest.
- #to_json_api ⇒ Object
Constructor Details
#initialize(card_id, shipping_address = nil, address = nil, phone = nil, email = nil, design = nil, tags = nil, limits = nil) ⇒ PatchBusinessCardRequest
Returns a new instance of PatchBusinessCardRequest.
18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/unit/models/card/patch_business_card_request.rb', line 18 def initialize(card_id, shipping_address = nil, address = nil, phone = nil, email = nil, design = nil, = nil, limits = nil) @card_id = card_id @shipping_address = shipping_address @address = address @phone = phone @email = email @design = design @tags = @limits = limits @type = "businessDebitCard" end |
Instance Attribute Details
#address ⇒ Object (readonly)
Returns the value of attribute address.
8 9 10 |
# File 'lib/unit/models/card/patch_business_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_card_request.rb', line 8 def card_id @card_id end |
#design ⇒ Object (readonly)
Returns the value of attribute design.
8 9 10 |
# File 'lib/unit/models/card/patch_business_card_request.rb', line 8 def design @design end |
#email ⇒ Object (readonly)
Returns the value of attribute email.
8 9 10 |
# File 'lib/unit/models/card/patch_business_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_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_card_request.rb', line 8 def phone @phone end |
#shipping_address ⇒ Object (readonly)
Returns the value of attribute shipping_address.
8 9 10 |
# File 'lib/unit/models/card/patch_business_card_request.rb', line 8 def shipping_address @shipping_address end |
#tags ⇒ Object (readonly)
Returns the value of attribute tags.
8 9 10 |
# File 'lib/unit/models/card/patch_business_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_card_request.rb', line 8 def type @type end |
Instance Method Details
#to_json_api ⇒ Object
30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 |
# File 'lib/unit/models/card/patch_business_card_request.rb', line 30 def to_json_api payload = { "data": { "type": type, "attributes": { "shippingAddress": shipping_address, "address": address, "phone": phone, "email": email, "design": design, "tags": , "limits": limits } } } payload[:data][:attributes].compact! payload.to_json end |