strongmind-platform-sdk 3.26.10 → 3.26.12

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: 02eb1e427b7b709dc30e9c62ad349dcee2b29820cecd3b726ea5728291cbfb34
4
- data.tar.gz: 7029a2b17345e78567bd4c582ac2934f530da0c17747671abf32b536085f82e1
3
+ metadata.gz: 76a88fa5bcf1116f4ceb27dc7ed698d0994c3029d5019423045362bd67ffcfa5
4
+ data.tar.gz: 6d73a946f8937b43a2dd53114eb2ad77f8427253c3d45ae547c5698b3f2f9b80
5
5
  SHA512:
6
- metadata.gz: '07896551e2abdc9fe69991484ce13ef7856316ead62487d619f8699f434e74fe3e44d473c4b485c9160df5f15b6ffa4cecaac4e40b4178a43c9858f8c52b65f8'
7
- data.tar.gz: 226e664b672c51fa5c69439abb05ce22b42f471751112d3bccb48820ef743f3fa8d0b29cd0a0b1766375c40039a256f697f38eda61615b36ab9b778376c2a28d
6
+ metadata.gz: 6aa5579badc87f4598a329505e7a3f66eb11ee5d7bd9dd1cb6d087cdf47820a1672a54f77c1627ffeb73cd0478534b721e33188c5f656f6aeb4c1c54d12edb6b
7
+ data.tar.gz: 23991472c49feda6c433518cb387e4190b5ef76e6bd09f7f33b01ca39d16d6375b4f43c5fbe58009850e8476046f12a11e8c0a4e5ea3acaadb8935010d9d5aac
@@ -70,6 +70,66 @@ module PlatformSdk
70
70
  def one_roster_pipeline_payload(deleted: false)
71
71
  {}
72
72
  end
73
+
74
+ module ClassMethods
75
+ def send_bulk_insert_to_pipeline(attributes_array, action: 'created')
76
+ attributes_array.each do |attributes|
77
+ message = build_bulk_pipeline_payload(attributes, action)
78
+ one_roster_message = build_bulk_one_roster_payload(attributes)
79
+ Jobs::SendNounToPipelineJob.perform_later(message, one_roster_message)
80
+ end
81
+ end
82
+
83
+ private
84
+
85
+ def build_bulk_pipeline_payload(attributes, action)
86
+ {
87
+ "noun": pipeline_noun,
88
+ "identifiers": build_bulk_identifiers(attributes),
89
+ "meta": pipeline_meta,
90
+ "data": build_bulk_data(attributes, action),
91
+ "envelope_version": '1.0.0',
92
+ "message_timestamp": Time.current.utc.iso8601
93
+ }
94
+ end
95
+
96
+ def build_bulk_identifiers(attributes)
97
+ {
98
+ "id": attributes[:id] || attributes['id']
99
+ }
100
+ end
101
+
102
+ def build_bulk_data(attributes, action)
103
+ symbolized_attrs = attributes.respond_to?(:symbolize_keys) ?
104
+ attributes.symbolize_keys :
105
+ attributes.transform_keys(&:to_sym)
106
+
107
+ excluded_attrs = respond_to?(:bulk_pipeline_excluded_attributes) ?
108
+ bulk_pipeline_excluded_attributes :
109
+ []
110
+
111
+ additional_attrs = respond_to?(:bulk_pipeline_additional_attributes) ?
112
+ bulk_pipeline_additional_attributes :
113
+ {}
114
+
115
+ symbolized_attrs
116
+ .merge(additional_attrs)
117
+ .except(*excluded_attrs)
118
+ .merge(action: action)
119
+ end
120
+
121
+ def build_bulk_one_roster_payload(attributes)
122
+ {}
123
+ end
124
+
125
+ def bulk_pipeline_excluded_attributes
126
+ []
127
+ end
128
+
129
+ def bulk_pipeline_additional_attributes
130
+ {}
131
+ end
132
+ end
73
133
  end
74
134
  end
75
135
  end
@@ -57,6 +57,14 @@ module PlatformSdk
57
57
  get_payload("/api/Accounts/?username=#{username}")
58
58
  end
59
59
 
60
+ def get_account_with_profile(account_id)
61
+ get_payload("/api/Accounts/#{account_id}/WithProfile")
62
+ end
63
+
64
+ def update_account(account_id, account_params)
65
+ patch_payload("/api/Accounts/#{account_id}", account_params)
66
+ end
67
+
60
68
  def update_profile(account_id, profile_params)
61
69
  patch_payload("/api/accounts/#{account_id}/profile", profile_params)
62
70
  end
@@ -3,7 +3,7 @@
3
3
  module PlatformSdk
4
4
  MAJOR = 3
5
5
  MINOR = 26
6
- PATCH = 10
6
+ PATCH = 12
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.10
4
+ version: 3.26.12
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-06-18 00:00:00.000000000 Z
11
+ date: 2025-08-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday