lib/incognia/api.rb in incognia_api-0.1.0 vs lib/incognia/api.rb in incognia_api-0.2.0
- old
+ new
@@ -13,15 +13,17 @@
@connection = Client.new(client_id: client_id,
client_secret: client_secret,
host: "https://api.incognia.com/api")
end
- def register_signup(installation_id:, address: )
+ def register_signup(installation_id:, address: nil)
+ params = { installation_id: installation_id }
+ params.merge!(address.to_hash) if address
+
response = connection.request(
:post,
'v2/onboarding/signups',
- installation_id: installation_id,
- **address.to_hash
+ params
)
SignupAssessment.from_hash(response.body) if response.success?
end