From c7199e5de0faea8d4e134af5fc8485260d79d03d Mon Sep 17 00:00:00 2001 From: Saalik Lokhandwala Date: Wed, 8 May 2024 14:08:45 +0800 Subject: [PATCH 1/3] add primary_currency to user object --- lib/lunchmoney/objects/user.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/lunchmoney/objects/user.rb b/lib/lunchmoney/objects/user.rb index 5b8ff6b..cdad25a 100644 --- a/lib/lunchmoney/objects/user.rb +++ b/lib/lunchmoney/objects/user.rb @@ -21,16 +21,18 @@ class User < LunchMoney::Objects::Object user_email: String, account_id: Integer, budget_name: String, + primary_currency: String, api_key_label: T.nilable(String), ).void end - def initialize(user_id:, user_name:, user_email:, account_id:, budget_name:, api_key_label: nil) + def initialize(user_id:, user_name:, user_email:, account_id:, budget_name:, primary_currency:, api_key_label: nil) super() @user_id = user_id @user_name = user_name @user_email = user_email @account_id = account_id @budget_name = budget_name + @primary_currency = primary_currency @api_key_label = api_key_label end end From c6ea600104b0725825172a54e636a3916a3e6718 Mon Sep 17 00:00:00 2001 From: mmenanno Date: Mon, 13 May 2024 10:37:59 -0400 Subject: [PATCH 2/3] rubocop layout fixes --- lib/lunchmoney/objects/user.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/lunchmoney/objects/user.rb b/lib/lunchmoney/objects/user.rb index cdad25a..37fb835 100644 --- a/lib/lunchmoney/objects/user.rb +++ b/lib/lunchmoney/objects/user.rb @@ -25,7 +25,8 @@ class User < LunchMoney::Objects::Object api_key_label: T.nilable(String), ).void end - def initialize(user_id:, user_name:, user_email:, account_id:, budget_name:, primary_currency:, api_key_label: nil) + def initialize(user_id:, user_name:, user_email:, account_id:, budget_name:, primary_currency:, + api_key_label: nil) super() @user_id = user_id @user_name = user_name From 21cefb83bc6f158865a5f1b83ca919d526d3901e Mon Sep 17 00:00:00 2001 From: mmenanno Date: Mon, 13 May 2024 10:39:09 -0400 Subject: [PATCH 3/3] regenerate user cassette --- test/cassettes/user/me_success.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/test/cassettes/user/me_success.yml b/test/cassettes/user/me_success.yml index b27e527..8733ddc 100644 --- a/test/cassettes/user/me_success.yml +++ b/test/cassettes/user/me_success.yml @@ -23,9 +23,9 @@ http_interactions: Server: - Cowboy Report-To: - - '{"group":"heroku-nel","max_age":3600,"endpoints":[{"url":"https://nel.heroku.com/reports?ts=1706319203&sid=1b10b0ff-8a76-4548-befa-353fc6c6c045&s=CcXdh2z%2B0aj1MkJ5td91J1myrkExlK5MgDgacD9zDOY%3D"}]}' + - '{"group":"heroku-nel","max_age":3600,"endpoints":[{"url":"https://nel.heroku.com/reports?ts=1715611134&sid=1b10b0ff-8a76-4548-befa-353fc6c6c045&s=oHPa4pwcdGzJCztpXW0tCftIoWXKpwG%2F%2B9YTtnNUm%2FY%3D"}]}' Reporting-Endpoints: - - heroku-nel=https://nel.heroku.com/reports?ts=1706319203&sid=1b10b0ff-8a76-4548-befa-353fc6c6c045&s=CcXdh2z%2B0aj1MkJ5td91J1myrkExlK5MgDgacD9zDOY%3D + - heroku-nel=https://nel.heroku.com/reports?ts=1715611134&sid=1b10b0ff-8a76-4548-befa-353fc6c6c045&s=oHPa4pwcdGzJCztpXW0tCftIoWXKpwG%2F%2B9YTtnNUm%2FY%3D Nel: - '{"report_to":"heroku-nel","max_age":3600,"success_fraction":0.005,"failure_fraction":0.05,"response_headers":["Via"]}' Connection: @@ -39,16 +39,16 @@ http_interactions: Content-Type: - application/json; charset=utf-8 Content-Length: - - '180' + - '205' Etag: - - W/"b4-2R3HWqV6FCeIHsTcPc2dVwLkfQM" + - W/"cd-TCciWbZEyNCHjkejH/ueoBJV2sw" Date: - - Sat, 27 Jan 2024 01:33:23 GMT + - Mon, 13 May 2024 14:38:54 GMT Via: - 1.1 vegur body: encoding: UTF-8 string: '{"user_name":"","user_email":"","user_id":7344,"account_id":37512,"budget_name":"Development - Budget","api_key_label":"Gem Development"}' - recorded_at: Sat, 27 Jan 2024 01:33:23 GMT + Budget","primary_currency":"cad","api_key_label":"Gem Development"}' + recorded_at: Mon, 13 May 2024 14:38:54 GMT recorded_with: VCR 6.2.0