trophy_api_client 1.4.0 → 1.5.0

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: 7604c5f6f0a271ed7eae0b4878f29932ba518ac374f61c0854a4c5afb5a58c6d
4
- data.tar.gz: 5b8a86b550c0aba78eb4edae772cfd3799f4108727eb2acac4770e9358fc7c41
3
+ metadata.gz: 7f93fc6f266f49a381617ca6d262f760e777a174f77daa80f902ced5676ee423
4
+ data.tar.gz: b67333cb8bd33fcee392d5b917b3b2f70bb48489779d8b42dec3554302f49160
5
5
  SHA512:
6
- metadata.gz: f31395b433ab72efbd23a45a2e8dbda31c6ba589841e2d3eae7260f5744831948f3460d810cce0e91035c87ac112e47b1abbddc78b5ea9360c745169d364a61f
7
- data.tar.gz: 92f5324cb1d892cacdda6303f7617d52e70eb17a3e41df09c93041dc90437eefd9637911fe3da12bc70e31e481c09800845c268084eb9bce03d195920959fae0
6
+ metadata.gz: 42e60f2f9c52427320993227dd3d3d0afbfcb6f87f1abb4e8513c264c5df8e2a63fc216c54aeb6960cce81ea24f6c3b20b755cda22a7bbd6c77b8a79f56ef3e5
7
+ data.tar.gz: bf10f0374086942dc1c4967c3299e3664274bdae7cef0b3f91106f61dbd3480bf996389237ae5669501cbc70acfed11ed3c2f25526dac0218b26805d7aeed14c
data/lib/gemconfig.rb CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  module TrophyApiClient
4
4
  module Gemconfig
5
- VERSION = "1.4.0"
5
+ VERSION = "1.5.0"
6
6
  AUTHORS = ["Trophy Labs, Inc"].freeze
7
7
  EMAIL = ""
8
8
  SUMMARY = "Ruby library for the Trophy API."
@@ -60,7 +60,7 @@ module TrophyApiClient
60
60
  TrophyApiClient::CreatePointsBoostsResponse.from_json(json_object: response.body)
61
61
  end
62
62
 
63
- # Archive multiple points boosts by ID.
63
+ # Delete multiple points boosts by ID.
64
64
  #
65
65
  # @param ids [String] A list of up to 100 boost IDs.
66
66
  # @param request_options [TrophyApiClient::RequestOptions]
@@ -71,8 +71,8 @@ module TrophyApiClient
71
71
  # environment: TrophyApiClient::Environment::PRODUCTION,
72
72
  # api_key: "YOUR_API_KEY"
73
73
  # )
74
- # api.admin.points.boosts.batch_archive
75
- def batch_archive(ids: nil, request_options: nil)
74
+ # api.admin.points.boosts.delete
75
+ def delete(ids: nil, request_options: nil)
76
76
  response = @request_client.conn.delete do |req|
77
77
  req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
78
78
  req.headers["X-API-KEY"] = request_options.api_key unless request_options&.api_key.nil?
@@ -89,39 +89,6 @@ module TrophyApiClient
89
89
  end
90
90
  TrophyApiClient::DeletePointsBoostsResponse.from_json(json_object: response.body)
91
91
  end
92
-
93
- # Archive a points boost by ID.
94
- #
95
- # @param id [String] The UUID of the points boost to archive
96
- # @param request_options [TrophyApiClient::RequestOptions]
97
- # @return [TrophyApiClient::DeletePointsBoostsResponse]
98
- # @example
99
- # api = TrophyApiClient::Client.new(
100
- # base_url: "https://api.example.com",
101
- # environment: TrophyApiClient::Environment::PRODUCTION,
102
- # api_key: "YOUR_API_KEY"
103
- # )
104
- # api.admin.points.boosts.archive(id: "id")
105
- def archive(id:, request_options: nil)
106
- response = @request_client.conn.delete do |req|
107
- req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
108
- req.headers["X-API-KEY"] = request_options.api_key unless request_options&.api_key.nil?
109
- req.headers = {
110
- **(req.headers || {}),
111
- **@request_client.get_headers,
112
- **(request_options&.additional_headers || {})
113
- }.compact
114
- unless request_options.nil? || request_options&.additional_query_parameters.nil?
115
- req.params = { **(request_options&.additional_query_parameters || {}) }.compact
116
- end
117
- unless request_options.nil? || request_options&.additional_body_parameters.nil?
118
- req.body = { **(request_options&.additional_body_parameters || {}) }.compact
119
- end
120
- req.url "#{@request_client.get_url(environment: admin,
121
- request_options: request_options)}/points/boosts/#{id}"
122
- end
123
- TrophyApiClient::DeletePointsBoostsResponse.from_json(json_object: response.body)
124
- end
125
92
  end
126
93
 
127
94
  class AsyncBoostsClient
@@ -177,7 +144,7 @@ module TrophyApiClient
177
144
  end
178
145
  end
179
146
 
180
- # Archive multiple points boosts by ID.
147
+ # Delete multiple points boosts by ID.
181
148
  #
182
149
  # @param ids [String] A list of up to 100 boost IDs.
183
150
  # @param request_options [TrophyApiClient::RequestOptions]
@@ -188,8 +155,8 @@ module TrophyApiClient
188
155
  # environment: TrophyApiClient::Environment::PRODUCTION,
189
156
  # api_key: "YOUR_API_KEY"
190
157
  # )
191
- # api.admin.points.boosts.batch_archive
192
- def batch_archive(ids: nil, request_options: nil)
158
+ # api.admin.points.boosts.delete
159
+ def delete(ids: nil, request_options: nil)
193
160
  Async do
194
161
  response = @request_client.conn.delete do |req|
195
162
  req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
@@ -208,41 +175,6 @@ module TrophyApiClient
208
175
  TrophyApiClient::DeletePointsBoostsResponse.from_json(json_object: response.body)
209
176
  end
210
177
  end
211
-
212
- # Archive a points boost by ID.
213
- #
214
- # @param id [String] The UUID of the points boost to archive
215
- # @param request_options [TrophyApiClient::RequestOptions]
216
- # @return [TrophyApiClient::DeletePointsBoostsResponse]
217
- # @example
218
- # api = TrophyApiClient::Client.new(
219
- # base_url: "https://api.example.com",
220
- # environment: TrophyApiClient::Environment::PRODUCTION,
221
- # api_key: "YOUR_API_KEY"
222
- # )
223
- # api.admin.points.boosts.archive(id: "id")
224
- def archive(id:, request_options: nil)
225
- Async do
226
- response = @request_client.conn.delete do |req|
227
- req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
228
- req.headers["X-API-KEY"] = request_options.api_key unless request_options&.api_key.nil?
229
- req.headers = {
230
- **(req.headers || {}),
231
- **@request_client.get_headers,
232
- **(request_options&.additional_headers || {})
233
- }.compact
234
- unless request_options.nil? || request_options&.additional_query_parameters.nil?
235
- req.params = { **(request_options&.additional_query_parameters || {}) }.compact
236
- end
237
- unless request_options.nil? || request_options&.additional_body_parameters.nil?
238
- req.body = { **(request_options&.additional_body_parameters || {}) }.compact
239
- end
240
- req.url "#{@request_client.get_url(environment: admin,
241
- request_options: request_options)}/points/boosts/#{id}"
242
- end
243
- TrophyApiClient::DeletePointsBoostsResponse.from_json(json_object: response.body)
244
- end
245
- end
246
178
  end
247
179
  end
248
180
  end
@@ -6,10 +6,9 @@ require "ostruct"
6
6
  require "json"
7
7
 
8
8
  module TrophyApiClient
9
- # Response containing the points boosts that were archived and any per-item
10
- # issues.
9
+ # Response containing the points boosts that were deleted and any per-item issues.
11
10
  class DeletePointsBoostsResponse
12
- # @return [Array<TrophyApiClient::DeletedResource>] Array of archived points boosts represented by ID.
11
+ # @return [Array<TrophyApiClient::DeletedResource>] Array of deleted points boosts represented by ID.
13
12
  attr_reader :deleted
14
13
  # @return [Array<TrophyApiClient::AdminIssue>] Array of issues encountered during boost archival.
15
14
  attr_reader :issues
@@ -21,7 +20,7 @@ module TrophyApiClient
21
20
 
22
21
  OMIT = Object.new
23
22
 
24
- # @param deleted [Array<TrophyApiClient::DeletedResource>] Array of archived points boosts represented by ID.
23
+ # @param deleted [Array<TrophyApiClient::DeletedResource>] Array of deleted points boosts represented by ID.
25
24
  # @param issues [Array<TrophyApiClient::AdminIssue>] Array of issues encountered during boost archival.
26
25
  # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
27
26
  # @return [TrophyApiClient::DeletePointsBoostsResponse]
@@ -4,9 +4,9 @@ require "ostruct"
4
4
  require "json"
5
5
 
6
6
  module TrophyApiClient
7
- # A soft-deleted resource represented by ID.
7
+ # A deleted resource represented by ID.
8
8
  class DeletedResource
9
- # @return [String] The ID of the archived resource.
9
+ # @return [String] The ID of the deleted resource.
10
10
  attr_reader :id
11
11
  # @return [OpenStruct] Additional properties unmapped to the current class definition
12
12
  attr_reader :additional_properties
@@ -16,7 +16,7 @@ module TrophyApiClient
16
16
 
17
17
  OMIT = Object.new
18
18
 
19
- # @param id [String] The ID of the archived resource.
19
+ # @param id [String] The ID of the deleted resource.
20
20
  # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
21
21
  # @return [TrophyApiClient::DeletedResource]
22
22
  def initialize(id:, additional_properties: nil)
@@ -1,3 +1,3 @@
1
1
  module MyGem
2
- VERSION = "1.4.0"
2
+ VERSION = "1.5.0"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: trophy_api_client
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.0
4
+ version: 1.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Trophy Labs, Inc