strongmind-platform-sdk 3.26.4 → 3.26.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8e87b6ac67659e67c301f8d0213c3c3db8266a806281a6dfe8cce35d694279b8
4
- data.tar.gz: f8e3b33d2edb94d32132dbb57dae3e7400ed9d9cab3f9f8b9cd94de837d29239
3
+ metadata.gz: f48486c5b5425d16fcfdfa05e23f6ad72733f27bce78203e70784cc991043d07
4
+ data.tar.gz: 76cbe1c8e4e278c45b6464eea4a94f9b4a3446dacdd82988424cf77b6e08adf4
5
5
  SHA512:
6
- metadata.gz: fef1903f5596d85508a9be1ce1fd46a1bda8a1770d564f960271e1f4541adcb45e1d28ffbf25c8c91ff6ed3e14d7f547c195dd1808bb3dede21ec076276e848b
7
- data.tar.gz: f086a619c94446c3bc58832b4d2cbfb95c594682aadffde02cece4a41edb06b53f976a88cff53f57604d4084a76818567a20fe835721a22c2956d3302dd967c1
6
+ metadata.gz: bbb8ec06e31a1b552824a5e036050d03e324d17e072f2749d268db985abce36d3f06c698e924c899906edeb3d2ec8afb7df85848ea15b855271bfb8ec069abbc
7
+ data.tar.gz: 3d610c4b5501e1b4f0d09af91debe314e2e9a9bf5353d3cabc32219f88a5cd9e216943bbaf96d61e435d75791e754a669ab066dc800dd8dec24030a286b2d613
@@ -23,9 +23,52 @@ module PlatformSdk
23
23
  post_payload('/api/accounts/WithProfile', user_params)
24
24
  end
25
25
 
26
- def post_payload(path, body)
26
+ def terms_and_conditions
27
+ get_payload('/api/TermsAndConditions')
28
+ end
29
+
30
+ def accept_terms_and_conditions(terms_and_conditions_id, account_id)
31
+ put_payload("/api/TermsAndConditions/#{terms_and_conditions_id}/Accounts/#{account_id}", {})
32
+ end
33
+
34
+ def password_status(account_id)
35
+ get_payload("/api/Accounts/#{account_id}/PasswordStatus")
36
+ end
37
+
38
+ def password_reset(account_id, return_url = nil, send_email: true, include_username: true)
39
+ query_params = {
40
+ sendEmail: send_email,
41
+ includeUsername: include_username
42
+ }
43
+ query_params[:returnUrl] = return_url if return_url
44
+
45
+ post_payload("/api/Accounts/#{account_id}/PasswordReset", {}, query_params)
46
+ end
47
+
48
+ def send_reminder_email(account_id)
49
+ post_payload('/api/Accounts/SendReminderEmail', JSON.dump(account_id))
50
+ end
51
+
52
+ def get_payload(path)
27
53
  with_rescue do
28
- response = @conn.post(path, body)
54
+ response = @conn.get(path)
55
+ response.body
56
+ end
57
+ end
58
+
59
+ def post_payload(path, body, query_params = {})
60
+ with_rescue do
61
+ response = @conn.post(path) do |req|
62
+ req.params = query_params unless query_params.empty?
63
+ req.body = body
64
+ end
65
+ response.body
66
+ end
67
+ end
68
+
69
+ def put_payload(path, body)
70
+ with_rescue do
71
+ response = @conn.put(path, body)
29
72
  response.body
30
73
  end
31
74
  end
@@ -3,7 +3,7 @@
3
3
  module PlatformSdk
4
4
  MAJOR = 3
5
5
  MINOR = 26
6
- PATCH = 4
6
+ PATCH = 6
7
7
 
8
8
  VERSION = "#{PlatformSdk::MAJOR}.#{PlatformSdk::MINOR}.#{PlatformSdk::PATCH}"
9
9
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: strongmind-platform-sdk
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.26.4
4
+ version: 3.26.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Platform Team
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2025-04-15 00:00:00.000000000 Z
11
+ date: 2025-04-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday