Method: Unit::Customer::PatchIndividualCustomerRequest#to_json_api
- Defined in:
- lib/unit/models/customer/patch_individual_customer_request.rb
#to_json_api ⇒ Object
29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 |
# File 'lib/unit/models/customer/patch_individual_customer_request.rb', line 29 def to_json_api payload = { data: { type: "individualCustomer", attributes: { address: address&.represent, phone: phone&.represent, email: email, dba: dba, authorizedUsers: &.map(&:represent), tags: } } } payload[:data][:attributes].compact! payload.to_json end |