square.rb 32.0.0.20230925 → 33.0.0.20231018

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: 6c7adca646aa24aa7a9afa7c6acd8d49e534a854fd134f6442f315015a500d77
4
- data.tar.gz: 2ea27cf68b466c3987d01685efd65c4343c7b77c3297d5b4fc113fbe39b84cf0
3
+ metadata.gz: b1a9e797a4ed71794d0b22d02812a467b629f093bf7b52d0f431d1989b7674ae
4
+ data.tar.gz: b9f99ab1089d405de8c1e73efb286beed4f3c0e609c40e84a0453e403c31c57f
5
5
  SHA512:
6
- metadata.gz: 550f0b2966ced843d9300cb3bb2a9fc65d033297aa1e5f04fd3777da04703641580c6f361419477ae97c32e487bf825d4480612cf52d6a88e58056bd8fc7186b
7
- data.tar.gz: c4f0bdfe70c66d1853a92d3eef3d314ecd2246519035039f57b44ce44e184d6fe03f8aebdb3f4a7274d337f14f2e7d8c95590a1edecefca81f7b6411b925219c
6
+ metadata.gz: 5d425e644acdb896add3713f6a5883d998e37a9cd7ffe444186cff00b169f7a1fc2d1fbb492a75eb853547e28e2fe623829ece836224c3175eb25767aa9b65ff
7
+ data.tar.gz: 78de8fb5d730819d3e731776ed7c87c8448feec80666a1d5b9b4a594fa78f8aa1521f25c81fc7ec03bb17f762e7b80a12f436090d030d3c44c40a4468dafa210
@@ -4,7 +4,7 @@ module Square
4
4
  attr_accessor :config, :http_call_back
5
5
 
6
6
  def self.user_agent
7
- 'Square-Ruby-SDK/32.0.0.20230925 ({api-version}) {engine}/{engine-version} ({os-info}) {detail}'
7
+ 'Square-Ruby-SDK/33.0.0.20231018 ({api-version}) {engine}/{engine-version} ({os-info}) {detail}'
8
8
  end
9
9
 
10
10
  def self.user_agent_parameters
@@ -157,6 +157,50 @@ module Square
157
157
  .execute
158
158
  end
159
159
 
160
+ # Lists location booking profiles of a seller.
161
+ # @param [Integer] limit Optional parameter: The maximum number of results
162
+ # to return in a paged response.
163
+ # @param [String] cursor Optional parameter: The pagination cursor from the
164
+ # preceding response to return the next page of the results. Do not set this
165
+ # when retrieving the first page of the results.
166
+ # @return [ListLocationBookingProfilesResponse Hash] response from the API call
167
+ def list_location_booking_profiles(limit: nil,
168
+ cursor: nil)
169
+ new_api_call_builder
170
+ .request(new_request_builder(HttpMethodEnum::GET,
171
+ '/v2/bookings/location-booking-profiles',
172
+ 'default')
173
+ .query_param(new_parameter(limit, key: 'limit'))
174
+ .query_param(new_parameter(cursor, key: 'cursor'))
175
+ .header_param(new_parameter('application/json', key: 'accept'))
176
+ .auth(Single.new('global')))
177
+ .response(new_response_handler
178
+ .deserializer(APIHelper.method(:json_deserialize))
179
+ .is_api_response(true)
180
+ .convertor(ApiResponse.method(:create)))
181
+ .execute
182
+ end
183
+
184
+ # Retrieves a seller's location booking profile.
185
+ # @param [String] location_id Required parameter: The ID of the location to
186
+ # retrieve the booking profile.
187
+ # @return [RetrieveLocationBookingProfileResponse Hash] response from the API call
188
+ def retrieve_location_booking_profile(location_id:)
189
+ new_api_call_builder
190
+ .request(new_request_builder(HttpMethodEnum::GET,
191
+ '/v2/bookings/location-booking-profiles/{location_id}',
192
+ 'default')
193
+ .template_param(new_parameter(location_id, key: 'location_id')
194
+ .should_encode(true))
195
+ .header_param(new_parameter('application/json', key: 'accept'))
196
+ .auth(Single.new('global')))
197
+ .response(new_response_handler
198
+ .deserializer(APIHelper.method(:json_deserialize))
199
+ .is_api_response(true)
200
+ .convertor(ApiResponse.method(:create)))
201
+ .execute
202
+ end
203
+
160
204
  # Lists booking profiles for team members.
161
205
  # @param [TrueClass | FalseClass] bookable_only Optional parameter:
162
206
  # Indicates whether to include only bookable team members in the returned
@@ -1,7 +1,7 @@
1
1
  module Square
2
2
  # EmployeesApi
3
3
  class EmployeesApi < BaseApi
4
- # ListEmployees
4
+ # TODO: type endpoint description here
5
5
  # @param [String] location_id Optional parameter: Example:
6
6
  # @param [EmployeeStatus] status Optional parameter: Specifies the
7
7
  # EmployeeStatus to filter the employee by.
@@ -32,7 +32,7 @@ module Square
32
32
  .execute
33
33
  end
34
34
 
35
- # RetrieveEmployee
35
+ # TODO: type endpoint description here
36
36
  # @param [String] id Required parameter: UUID for the employee that was
37
37
  # requested.
38
38
  # @return [RetrieveEmployeeResponse Hash] response from the API call
@@ -32,6 +32,32 @@ module Square
32
32
  .execute
33
33
  end
34
34
 
35
+ # Schedules a plan variation change for all active subscriptions under a
36
+ # given plan
37
+ # variation. For more information, see [Swap Subscription Plan
38
+ # Variations](https://developer.squareup.com/docs/subscriptions-api/swap-pla
39
+ # n-variations).
40
+ # @param [BulkSwapPlanRequest] body Required parameter: An object containing
41
+ # the fields to POST for the request. See the corresponding object
42
+ # definition for field details.
43
+ # @return [BulkSwapPlanResponse Hash] response from the API call
44
+ def bulk_swap_plan(body:)
45
+ new_api_call_builder
46
+ .request(new_request_builder(HttpMethodEnum::POST,
47
+ '/v2/subscriptions/bulk-swap-plan',
48
+ 'default')
49
+ .header_param(new_parameter('application/json', key: 'Content-Type'))
50
+ .body_param(new_parameter(body))
51
+ .header_param(new_parameter('application/json', key: 'accept'))
52
+ .body_serializer(proc do |param| param.to_json unless param.nil? end)
53
+ .auth(Single.new('global')))
54
+ .response(new_response_handler
55
+ .deserializer(APIHelper.method(:json_deserialize))
56
+ .is_api_response(true)
57
+ .convertor(ApiResponse.method(:create)))
58
+ .execute
59
+ end
60
+
35
61
  # Searches for subscriptions.
36
62
  # Results are ordered chronologically by subscription creation date. If
37
63
  # the request specifies more than one location ID,
@@ -146,6 +172,36 @@ module Square
146
172
  .execute
147
173
  end
148
174
 
175
+ # Changes the [billing anchor
176
+ # date](https://developer.squareup.com/docs/subscriptions-api/subscription-b
177
+ # illing#billing-dates)
178
+ # for a subscription.
179
+ # @param [String] subscription_id Required parameter: The ID of the
180
+ # subscription to update the billing anchor date.
181
+ # @param [ChangeBillingAnchorDateRequest] body Required parameter: An object
182
+ # containing the fields to POST for the request. See the corresponding
183
+ # object definition for field details.
184
+ # @return [ChangeBillingAnchorDateResponse Hash] response from the API call
185
+ def change_billing_anchor_date(subscription_id:,
186
+ body:)
187
+ new_api_call_builder
188
+ .request(new_request_builder(HttpMethodEnum::POST,
189
+ '/v2/subscriptions/{subscription_id}/billing-anchor',
190
+ 'default')
191
+ .template_param(new_parameter(subscription_id, key: 'subscription_id')
192
+ .should_encode(true))
193
+ .header_param(new_parameter('application/json', key: 'Content-Type'))
194
+ .body_param(new_parameter(body))
195
+ .header_param(new_parameter('application/json', key: 'accept'))
196
+ .body_serializer(proc do |param| param.to_json unless param.nil? end)
197
+ .auth(Single.new('global')))
198
+ .response(new_response_handler
199
+ .deserializer(APIHelper.method(:json_deserialize))
200
+ .is_api_response(true)
201
+ .convertor(ApiResponse.method(:create)))
202
+ .execute
203
+ end
204
+
149
205
  # Schedules a `CANCEL` action to cancel an active subscription. This
150
206
  # sets the `canceled_date` field to the end of the active billing period.
151
207
  # After this date,
data/lib/square/client.rb CHANGED
@@ -4,7 +4,7 @@ module Square
4
4
  attr_reader :config, :auth_managers
5
5
 
6
6
  def sdk_version
7
- '32.0.0.20230925'
7
+ '33.0.0.20231018'
8
8
  end
9
9
 
10
10
  def square_version
@@ -267,7 +267,7 @@ module Square
267
267
  retry_methods: %i[get put], http_callback: nil,
268
268
  environment: 'production',
269
269
  custom_url: 'https://connect.squareup.com', access_token: '',
270
- square_version: '2023-09-25', user_agent_detail: '',
270
+ square_version: '2023-10-18', user_agent_detail: '',
271
271
  additional_headers: {}, config: nil)
272
272
  @config = if config.nil?
273
273
  Configuration.new(connection: connection, adapter: adapter,
@@ -19,7 +19,7 @@ module Square
19
19
  retry_methods: %i[get put], http_callback: nil,
20
20
  environment: 'production',
21
21
  custom_url: 'https://connect.squareup.com', access_token: '',
22
- square_version: '2023-09-25', user_agent_detail: '',
22
+ square_version: '2023-10-18', user_agent_detail: '',
23
23
  additional_headers: {})
24
24
 
25
25
  super connection: connection, adapter: adapter, timeout: timeout,
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: square.rb
3
3
  version: !ruby/object:Gem::Version
4
- version: 32.0.0.20230925
4
+ version: 33.0.0.20231018
5
5
  platform: ruby
6
6
  authors:
7
7
  - Square Developer Platform
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-09-26 00:00:00.000000000 Z
11
+ date: 2023-10-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: apimatic_core_interfaces