square.rb 34.0.0.20231115 → 34.1.0.20231213

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 782b164931df9b858596a44072900426a8602cdf90bb151d91e456c3ce0bf000
4
- data.tar.gz: 3f42b29aff8f32c74bb59d48d358a8ffab6fa668e1ce79d1e737850c3f9f1eb1
3
+ metadata.gz: b29bc50c5ee5bebc08ff29a066e77f35975336e71bbdad94416f59c58f4863f0
4
+ data.tar.gz: 4257fabf7ea4d1b49198744a53206ff4a6d21724267701c199a9ea7a7b58b734
5
5
  SHA512:
6
- metadata.gz: 931a8f0def1a0eda533df2cbeca7407c76e9e4d16c8086e12fcde25b0ad3f4cc547dad95b14b4c243cbf9ccee7bd99e11f45733286a9856fe723a509b21dd2d8
7
- data.tar.gz: 1a3e3acb369443df965fb5447d650368a93cba33a9a5439cfb48ae0ba425b86915366eb64027656fcb406081462e20b1e48b3d8b6428d7fb1c553eab04654cdd
6
+ metadata.gz: aa095d1d8cc6d0e8e7a84321bb9158dccb291105237a8b080c9033b946c314183c7c74e01467ba6f2c2e12684b45baaad28e33a55ebdf3395f2a2268b81410e8
7
+ data.tar.gz: f75abe542aef5e60c7166d9fd22db64db1d0f67e53fc2015e07a399624ba7575a161045a1858c1df46e61194bcbca75c21db8e647a26b46143fecbf0d9b4b9aa
@@ -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/34.0.0.20231115 ({api-version}) {engine}/{engine-version} ({os-info}) {detail}'
7
+ 'Square-Ruby-SDK/34.1.0.20231213 ({api-version}) {engine}/{engine-version} ({os-info}) {detail}'
8
8
  end
9
9
 
10
10
  def self.user_agent_parameters
@@ -328,10 +328,19 @@ module Square
328
328
  # of an object can be found in the version field of
329
329
  # [CatalogObject]($m/CatalogObject)s. If not included, results will be from
330
330
  # the current version of the catalog.
331
+ # @param [TrueClass | FalseClass] include_category_path_to_root Optional
332
+ # parameter: Specifies whether or not to include the `path_to_root` list for
333
+ # each returned category instance. The `path_to_root` list consists of
334
+ # `CategoryPathToRootNode` objects and specifies the path that starts with
335
+ # the immediate parent category of the returned category and ends with its
336
+ # root category. If the returned category is a top-level category, the
337
+ # `path_to_root` list is empty and is not returned in the response
338
+ # payload.
331
339
  # @return [RetrieveCatalogObjectResponse Hash] response from the API call
332
340
  def retrieve_catalog_object(object_id:,
333
341
  include_related_objects: false,
334
- catalog_version: nil)
342
+ catalog_version: nil,
343
+ include_category_path_to_root: false)
335
344
  new_api_call_builder
336
345
  .request(new_request_builder(HttpMethodEnum::GET,
337
346
  '/v2/catalog/object/{object_id}',
@@ -340,6 +349,7 @@ module Square
340
349
  .should_encode(true))
341
350
  .query_param(new_parameter(include_related_objects, key: 'include_related_objects'))
342
351
  .query_param(new_parameter(catalog_version, key: 'catalog_version'))
352
+ .query_param(new_parameter(include_category_path_to_root, key: 'include_category_path_to_root'))
343
353
  .header_param(new_parameter('application/json', key: 'accept'))
344
354
  .auth(Single.new('global')))
345
355
  .response(new_response_handler
@@ -35,6 +35,91 @@ module Square
35
35
  .execute
36
36
  end
37
37
 
38
+ # Retrieves the location-level settings for a Square-hosted checkout page.
39
+ # @param [String] location_id Required parameter: The ID of the location for
40
+ # which to retrieve settings.
41
+ # @return [RetrieveLocationSettingsResponse Hash] response from the API call
42
+ def retrieve_location_settings(location_id:)
43
+ new_api_call_builder
44
+ .request(new_request_builder(HttpMethodEnum::GET,
45
+ '/v2/online-checkout/location-settings/{location_id}',
46
+ 'default')
47
+ .template_param(new_parameter(location_id, key: 'location_id')
48
+ .should_encode(true))
49
+ .header_param(new_parameter('application/json', key: 'accept'))
50
+ .auth(Single.new('global')))
51
+ .response(new_response_handler
52
+ .deserializer(APIHelper.method(:json_deserialize))
53
+ .is_api_response(true)
54
+ .convertor(ApiResponse.method(:create)))
55
+ .execute
56
+ end
57
+
58
+ # Updates the location-level settings for a Square-hosted checkout page.
59
+ # @param [String] location_id Required parameter: The ID of the location for
60
+ # which to retrieve settings.
61
+ # @param [UpdateLocationSettingsRequest] body Required parameter: An object
62
+ # containing the fields to POST for the request. See the corresponding
63
+ # object definition for field details.
64
+ # @return [UpdateLocationSettingsResponse Hash] response from the API call
65
+ def update_location_settings(location_id:,
66
+ body:)
67
+ new_api_call_builder
68
+ .request(new_request_builder(HttpMethodEnum::PUT,
69
+ '/v2/online-checkout/location-settings/{location_id}',
70
+ 'default')
71
+ .template_param(new_parameter(location_id, key: 'location_id')
72
+ .should_encode(true))
73
+ .header_param(new_parameter('application/json', key: 'Content-Type'))
74
+ .body_param(new_parameter(body))
75
+ .header_param(new_parameter('application/json', key: 'accept'))
76
+ .body_serializer(proc do |param| param.to_json unless param.nil? end)
77
+ .auth(Single.new('global')))
78
+ .response(new_response_handler
79
+ .deserializer(APIHelper.method(:json_deserialize))
80
+ .is_api_response(true)
81
+ .convertor(ApiResponse.method(:create)))
82
+ .execute
83
+ end
84
+
85
+ # Retrieves the merchant-level settings for a Square-hosted checkout page.
86
+ # @return [RetrieveMerchantSettingsResponse Hash] response from the API call
87
+ def retrieve_merchant_settings
88
+ new_api_call_builder
89
+ .request(new_request_builder(HttpMethodEnum::GET,
90
+ '/v2/online-checkout/merchant-settings',
91
+ 'default')
92
+ .header_param(new_parameter('application/json', key: 'accept'))
93
+ .auth(Single.new('global')))
94
+ .response(new_response_handler
95
+ .deserializer(APIHelper.method(:json_deserialize))
96
+ .is_api_response(true)
97
+ .convertor(ApiResponse.method(:create)))
98
+ .execute
99
+ end
100
+
101
+ # Updates the merchant-level settings for a Square-hosted checkout page.
102
+ # @param [UpdateMerchantSettingsRequest] body Required parameter: An object
103
+ # containing the fields to POST for the request. See the corresponding
104
+ # object definition for field details.
105
+ # @return [UpdateMerchantSettingsResponse Hash] response from the API call
106
+ def update_merchant_settings(body:)
107
+ new_api_call_builder
108
+ .request(new_request_builder(HttpMethodEnum::PUT,
109
+ '/v2/online-checkout/merchant-settings',
110
+ 'default')
111
+ .header_param(new_parameter('application/json', key: 'Content-Type'))
112
+ .body_param(new_parameter(body))
113
+ .header_param(new_parameter('application/json', key: 'accept'))
114
+ .body_serializer(proc do |param| param.to_json unless param.nil? end)
115
+ .auth(Single.new('global')))
116
+ .response(new_response_handler
117
+ .deserializer(APIHelper.method(:json_deserialize))
118
+ .is_api_response(true)
119
+ .convertor(ApiResponse.method(:create)))
120
+ .execute
121
+ end
122
+
38
123
  # Lists all payment links.
39
124
  # @param [String] cursor Optional parameter: A pagination cursor returned by
40
125
  # a previous call to this endpoint. Provide this cursor to retrieve the next
@@ -94,7 +94,7 @@ module Square
94
94
  # Actions](https://developer.squareup.com/docs/terminal-api/advanced-feature
95
95
  # s/custom-workflows/link-and-dismiss-actions) for more details.
96
96
  # @param [String] action_id Required parameter: Unique ID for the
97
- # `TerminalAction` associated with the waiting dialog to be dismissed.
97
+ # `TerminalAction` associated with the action to be dismissed.
98
98
  # @return [DismissTerminalActionResponse Hash] response from the API call
99
99
  def dismiss_terminal_action(action_id:)
100
100
  new_api_call_builder
@@ -203,6 +203,27 @@ module Square
203
203
  .execute
204
204
  end
205
205
 
206
+ # Dismisses a Terminal checkout request if the status and type of the
207
+ # request permits it.
208
+ # @param [String] checkout_id Required parameter: Unique ID for the
209
+ # `TerminalCheckout` associated with the checkout to be dismissed.
210
+ # @return [DismissTerminalCheckoutResponse Hash] response from the API call
211
+ def dismiss_terminal_checkout(checkout_id:)
212
+ new_api_call_builder
213
+ .request(new_request_builder(HttpMethodEnum::POST,
214
+ '/v2/terminals/checkouts/{checkout_id}/dismiss',
215
+ 'default')
216
+ .template_param(new_parameter(checkout_id, key: 'checkout_id')
217
+ .should_encode(true))
218
+ .header_param(new_parameter('application/json', key: 'accept'))
219
+ .auth(Single.new('global')))
220
+ .response(new_response_handler
221
+ .deserializer(APIHelper.method(:json_deserialize))
222
+ .is_api_response(true)
223
+ .convertor(ApiResponse.method(:create)))
224
+ .execute
225
+ end
226
+
206
227
  # Creates a request to refund an Interac payment completed on a Square
207
228
  # Terminal. Refunds for Interac payments on a Square Terminal are supported
208
229
  # only for Interac debit cards in Canada. Other refunds for Terminal
@@ -294,5 +315,26 @@ module Square
294
315
  .convertor(ApiResponse.method(:create)))
295
316
  .execute
296
317
  end
318
+
319
+ # Dismisses a Terminal refund request if the status and type of the request
320
+ # permits it.
321
+ # @param [String] terminal_refund_id Required parameter: Unique ID for the
322
+ # `TerminalRefund` associated with the refund to be dismissed.
323
+ # @return [DismissTerminalRefundResponse Hash] response from the API call
324
+ def dismiss_terminal_refund(terminal_refund_id:)
325
+ new_api_call_builder
326
+ .request(new_request_builder(HttpMethodEnum::POST,
327
+ '/v2/terminals/refunds/{terminal_refund_id}/dismiss',
328
+ 'default')
329
+ .template_param(new_parameter(terminal_refund_id, key: 'terminal_refund_id')
330
+ .should_encode(true))
331
+ .header_param(new_parameter('application/json', key: 'accept'))
332
+ .auth(Single.new('global')))
333
+ .response(new_response_handler
334
+ .deserializer(APIHelper.method(:json_deserialize))
335
+ .is_api_response(true)
336
+ .convertor(ApiResponse.method(:create)))
337
+ .execute
338
+ end
297
339
  end
298
340
  end
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
- '34.0.0.20231115'
7
+ '34.1.0.20231213'
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-11-15', user_agent_detail: '',
270
+ square_version: '2023-12-13', 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-11-15', user_agent_detail: '',
22
+ square_version: '2023-12-13', 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: 34.0.0.20231115
4
+ version: 34.1.0.20231213
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-11-15 00:00:00.000000000 Z
11
+ date: 2023-12-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: apimatic_core_interfaces