30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
|
# File 'lib/unit/models/counterparty/create_with_plaid_token_request.rb', line 30
def to_json_api
payload = {
"data": {
"type": "achCounterparty",
"attributes": {
type: type,
name: name,
plaidProcessorToken: plaid_processor_token,
verifyName: verify_name,
permissions: permissions,
tags: tags,
idempotencyKey: idempotency_key
},
"relationships": {
customer: Unit::Types::Relationship.new("customer", customer_id).to_hash
}
}
}
payload[:data][:attributes].compact!
payload.to_json
end
|