square.rb 39.0.0.20240821 → 39.1.0.20240919

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.
Files changed (47) hide show
  1. checksums.yaml +4 -4
  2. data/lib/square/api/apple_pay_api.rb +1 -1
  3. data/lib/square/api/bank_accounts_api.rb +3 -3
  4. data/lib/square/api/base_api.rb +1 -1
  5. data/lib/square/api/booking_custom_attributes_api.rb +11 -11
  6. data/lib/square/api/bookings_api.rb +13 -13
  7. data/lib/square/api/cards_api.rb +4 -4
  8. data/lib/square/api/cash_drawers_api.rb +3 -3
  9. data/lib/square/api/catalog_api.rb +14 -14
  10. data/lib/square/api/checkout_api.rb +10 -10
  11. data/lib/square/api/customer_custom_attributes_api.rb +10 -10
  12. data/lib/square/api/customer_groups_api.rb +5 -5
  13. data/lib/square/api/customer_segments_api.rb +2 -2
  14. data/lib/square/api/customers_api.rb +14 -14
  15. data/lib/square/api/devices_api.rb +5 -5
  16. data/lib/square/api/disputes_api.rb +9 -9
  17. data/lib/square/api/employees_api.rb +2 -2
  18. data/lib/square/api/events_api.rb +4 -4
  19. data/lib/square/api/gift_card_activities_api.rb +2 -2
  20. data/lib/square/api/gift_cards_api.rb +7 -7
  21. data/lib/square/api/inventory_api.rb +13 -13
  22. data/lib/square/api/invoices_api.rb +10 -10
  23. data/lib/square/api/labor_api.rb +16 -16
  24. data/lib/square/api/location_custom_attributes_api.rb +11 -11
  25. data/lib/square/api/locations_api.rb +4 -4
  26. data/lib/square/api/loyalty_api.rb +18 -18
  27. data/lib/square/api/merchant_custom_attributes_api.rb +11 -11
  28. data/lib/square/api/merchants_api.rb +2 -2
  29. data/lib/square/api/mobile_authorization_api.rb +1 -1
  30. data/lib/square/api/o_auth_api.rb +3 -3
  31. data/lib/square/api/order_custom_attributes_api.rb +11 -11
  32. data/lib/square/api/orders_api.rb +8 -8
  33. data/lib/square/api/payments_api.rb +7 -7
  34. data/lib/square/api/payouts_api.rb +3 -3
  35. data/lib/square/api/refunds_api.rb +3 -3
  36. data/lib/square/api/sites_api.rb +1 -1
  37. data/lib/square/api/snippets_api.rb +3 -3
  38. data/lib/square/api/subscriptions_api.rb +12 -12
  39. data/lib/square/api/team_api.rb +8 -8
  40. data/lib/square/api/terminal_api.rb +15 -15
  41. data/lib/square/api/transactions_api.rb +4 -4
  42. data/lib/square/api/v1_transactions_api.rb +3 -3
  43. data/lib/square/api/vendors_api.rb +7 -7
  44. data/lib/square/api/webhook_subscriptions_api.rb +8 -8
  45. data/lib/square/client.rb +2 -2
  46. data/lib/square/configuration.rb +1 -1
  47. metadata +2 -2
@@ -5,7 +5,7 @@ module Square
5
5
  # @param [CreateTerminalActionRequest] body Required parameter: An object
6
6
  # containing the fields to POST for the request. See the corresponding
7
7
  # object definition for field details.
8
- # @return [CreateTerminalActionResponse Hash] response from the API call
8
+ # @return [ApiResponse] the complete http response with raw body and status code.
9
9
  def create_terminal_action(body:)
10
10
  new_api_call_builder
11
11
  .request(new_request_builder(HttpMethodEnum::POST,
@@ -29,7 +29,7 @@ module Square
29
29
  # @param [SearchTerminalActionsRequest] body Required parameter: An object
30
30
  # containing the fields to POST for the request. See the corresponding
31
31
  # object definition for field details.
32
- # @return [SearchTerminalActionsResponse Hash] response from the API call
32
+ # @return [ApiResponse] the complete http response with raw body and status code.
33
33
  def search_terminal_actions(body:)
34
34
  new_api_call_builder
35
35
  .request(new_request_builder(HttpMethodEnum::POST,
@@ -51,7 +51,7 @@ module Square
51
51
  # requests are available for 30 days.
52
52
  # @param [String] action_id Required parameter: Unique ID for the desired
53
53
  # `TerminalAction`.
54
- # @return [GetTerminalActionResponse Hash] response from the API call
54
+ # @return [ApiResponse] the complete http response with raw body and status code.
55
55
  def get_terminal_action(action_id:)
56
56
  new_api_call_builder
57
57
  .request(new_request_builder(HttpMethodEnum::GET,
@@ -71,7 +71,7 @@ module Square
71
71
  # Cancels a Terminal action request if the status of the request permits it.
72
72
  # @param [String] action_id Required parameter: Unique ID for the desired
73
73
  # `TerminalAction`.
74
- # @return [CancelTerminalActionResponse Hash] response from the API call
74
+ # @return [ApiResponse] the complete http response with raw body and status code.
75
75
  def cancel_terminal_action(action_id:)
76
76
  new_api_call_builder
77
77
  .request(new_request_builder(HttpMethodEnum::POST,
@@ -95,7 +95,7 @@ module Square
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
97
  # `TerminalAction` associated with the action to be dismissed.
98
- # @return [DismissTerminalActionResponse Hash] response from the API call
98
+ # @return [ApiResponse] the complete http response with raw body and status code.
99
99
  def dismiss_terminal_action(action_id:)
100
100
  new_api_call_builder
101
101
  .request(new_request_builder(HttpMethodEnum::POST,
@@ -118,7 +118,7 @@ module Square
118
118
  # @param [CreateTerminalCheckoutRequest] body Required parameter: An object
119
119
  # containing the fields to POST for the request. See the corresponding
120
120
  # object definition for field details.
121
- # @return [CreateTerminalCheckoutResponse Hash] response from the API call
121
+ # @return [ApiResponse] the complete http response with raw body and status code.
122
122
  def create_terminal_checkout(body:)
123
123
  new_api_call_builder
124
124
  .request(new_request_builder(HttpMethodEnum::POST,
@@ -143,7 +143,7 @@ module Square
143
143
  # @param [SearchTerminalCheckoutsRequest] body Required parameter: An object
144
144
  # containing the fields to POST for the request. See the corresponding
145
145
  # object definition for field details.
146
- # @return [SearchTerminalCheckoutsResponse Hash] response from the API call
146
+ # @return [ApiResponse] the complete http response with raw body and status code.
147
147
  def search_terminal_checkouts(body:)
148
148
  new_api_call_builder
149
149
  .request(new_request_builder(HttpMethodEnum::POST,
@@ -165,7 +165,7 @@ module Square
165
165
  # requests are available for 30 days.
166
166
  # @param [String] checkout_id Required parameter: The unique ID for the
167
167
  # desired `TerminalCheckout`.
168
- # @return [GetTerminalCheckoutResponse Hash] response from the API call
168
+ # @return [ApiResponse] the complete http response with raw body and status code.
169
169
  def get_terminal_checkout(checkout_id:)
170
170
  new_api_call_builder
171
171
  .request(new_request_builder(HttpMethodEnum::GET,
@@ -186,7 +186,7 @@ module Square
186
186
  # it.
187
187
  # @param [String] checkout_id Required parameter: The unique ID for the
188
188
  # desired `TerminalCheckout`.
189
- # @return [CancelTerminalCheckoutResponse Hash] response from the API call
189
+ # @return [ApiResponse] the complete http response with raw body and status code.
190
190
  def cancel_terminal_checkout(checkout_id:)
191
191
  new_api_call_builder
192
192
  .request(new_request_builder(HttpMethodEnum::POST,
@@ -207,7 +207,7 @@ module Square
207
207
  # request permits it.
208
208
  # @param [String] checkout_id Required parameter: Unique ID for the
209
209
  # `TerminalCheckout` associated with the checkout to be dismissed.
210
- # @return [DismissTerminalCheckoutResponse Hash] response from the API call
210
+ # @return [ApiResponse] the complete http response with raw body and status code.
211
211
  def dismiss_terminal_checkout(checkout_id:)
212
212
  new_api_call_builder
213
213
  .request(new_request_builder(HttpMethodEnum::POST,
@@ -232,7 +232,7 @@ module Square
232
232
  # @param [CreateTerminalRefundRequest] body Required parameter: An object
233
233
  # containing the fields to POST for the request. See the corresponding
234
234
  # object definition for field details.
235
- # @return [CreateTerminalRefundResponse Hash] response from the API call
235
+ # @return [ApiResponse] the complete http response with raw body and status code.
236
236
  def create_terminal_refund(body:)
237
237
  new_api_call_builder
238
238
  .request(new_request_builder(HttpMethodEnum::POST,
@@ -256,7 +256,7 @@ module Square
256
256
  # @param [SearchTerminalRefundsRequest] body Required parameter: An object
257
257
  # containing the fields to POST for the request. See the corresponding
258
258
  # object definition for field details.
259
- # @return [SearchTerminalRefundsResponse Hash] response from the API call
259
+ # @return [ApiResponse] the complete http response with raw body and status code.
260
260
  def search_terminal_refunds(body:)
261
261
  new_api_call_builder
262
262
  .request(new_request_builder(HttpMethodEnum::POST,
@@ -278,7 +278,7 @@ module Square
278
278
  # are available for 30 days.
279
279
  # @param [String] terminal_refund_id Required parameter: The unique ID for
280
280
  # the desired `TerminalRefund`.
281
- # @return [GetTerminalRefundResponse Hash] response from the API call
281
+ # @return [ApiResponse] the complete http response with raw body and status code.
282
282
  def get_terminal_refund(terminal_refund_id:)
283
283
  new_api_call_builder
284
284
  .request(new_request_builder(HttpMethodEnum::GET,
@@ -299,7 +299,7 @@ module Square
299
299
  # status of the request permits it.
300
300
  # @param [String] terminal_refund_id Required parameter: The unique ID for
301
301
  # the desired `TerminalRefund`.
302
- # @return [CancelTerminalRefundResponse Hash] response from the API call
302
+ # @return [ApiResponse] the complete http response with raw body and status code.
303
303
  def cancel_terminal_refund(terminal_refund_id:)
304
304
  new_api_call_builder
305
305
  .request(new_request_builder(HttpMethodEnum::POST,
@@ -320,7 +320,7 @@ module Square
320
320
  # permits it.
321
321
  # @param [String] terminal_refund_id Required parameter: Unique ID for the
322
322
  # `TerminalRefund` associated with the refund to be dismissed.
323
- # @return [DismissTerminalRefundResponse Hash] response from the API call
323
+ # @return [ApiResponse] the complete http response with raw body and status code.
324
324
  def dismiss_terminal_refund(terminal_refund_id:)
325
325
  new_api_call_builder
326
326
  .request(new_request_builder(HttpMethodEnum::POST,
@@ -28,7 +28,7 @@ module Square
28
28
  # results for your original query. See [Paginating
29
29
  # results](https://developer.squareup.com/docs/working-with-apis/pagination)
30
30
  # for more information.
31
- # @return [ListTransactionsResponse Hash] response from the API call
31
+ # @return [ApiResponse] the complete http response with raw body and status code.
32
32
  def list_transactions(location_id:,
33
33
  begin_time: nil,
34
34
  end_time: nil,
@@ -59,7 +59,7 @@ module Square
59
59
  # transaction's associated location.
60
60
  # @param [String] transaction_id Required parameter: The ID of the
61
61
  # transaction to retrieve.
62
- # @return [RetrieveTransactionResponse Hash] response from the API call
62
+ # @return [ApiResponse] the complete http response with raw body and status code.
63
63
  def retrieve_transaction(location_id:,
64
64
  transaction_id:)
65
65
  warn 'Endpoint retrieve_transaction in TransactionsApi is deprecated'
@@ -89,7 +89,7 @@ module Square
89
89
  # for more information.
90
90
  # @param [String] location_id Required parameter: Example:
91
91
  # @param [String] transaction_id Required parameter: Example:
92
- # @return [CaptureTransactionResponse Hash] response from the API call
92
+ # @return [ApiResponse] the complete http response with raw body and status code.
93
93
  def capture_transaction(location_id:,
94
94
  transaction_id:)
95
95
  warn 'Endpoint capture_transaction in TransactionsApi is deprecated'
@@ -119,7 +119,7 @@ module Square
119
119
  # for more information.
120
120
  # @param [String] location_id Required parameter: Example:
121
121
  # @param [String] transaction_id Required parameter: Example:
122
- # @return [VoidTransactionResponse Hash] response from the API call
122
+ # @return [ApiResponse] the complete http response with raw body and status code.
123
123
  def void_transaction(location_id:,
124
124
  transaction_id:)
125
125
  warn 'Endpoint void_transaction in TransactionsApi is deprecated'
@@ -11,7 +11,7 @@ module Square
11
11
  # @param [String] batch_token Optional parameter: A pagination cursor to
12
12
  # retrieve the next set of results for your original query to the
13
13
  # endpoint.
14
- # @return [Array[V1Order] Hash] response from the API call
14
+ # @return [ApiResponse] the complete http response with raw body and status code.
15
15
  def v1_list_orders(location_id:,
16
16
  order: nil,
17
17
  limit: nil,
@@ -43,7 +43,7 @@ module Square
43
43
  # @param [String] order_id Required parameter: The order's Square-issued ID.
44
44
  # You obtain this value from Order objects returned by the List Orders
45
45
  # endpoint
46
- # @return [V1Order Hash] response from the API call
46
+ # @return [ApiResponse] the complete http response with raw body and status code.
47
47
  def v1_retrieve_order(location_id:,
48
48
  order_id:)
49
49
  warn 'Endpoint v1_retrieve_order in V1TransactionsApi is deprecated'
@@ -74,7 +74,7 @@ module Square
74
74
  # @param [V1UpdateOrderRequest] body Required parameter: An object
75
75
  # containing the fields to POST for the request. See the corresponding
76
76
  # object definition for field details.
77
- # @return [V1Order Hash] response from the API call
77
+ # @return [ApiResponse] the complete http response with raw body and status code.
78
78
  def v1_update_order(location_id:,
79
79
  order_id:,
80
80
  body:)
@@ -6,7 +6,7 @@ module Square
6
6
  # @param [BulkCreateVendorsRequest] body Required parameter: An object
7
7
  # containing the fields to POST for the request. See the corresponding
8
8
  # object definition for field details.
9
- # @return [BulkCreateVendorsResponse Hash] response from the API call
9
+ # @return [ApiResponse] the complete http response with raw body and status code.
10
10
  def bulk_create_vendors(body:)
11
11
  new_api_call_builder
12
12
  .request(new_request_builder(HttpMethodEnum::POST,
@@ -28,7 +28,7 @@ module Square
28
28
  # @param [BulkRetrieveVendorsRequest] body Required parameter: An object
29
29
  # containing the fields to POST for the request. See the corresponding
30
30
  # object definition for field details.
31
- # @return [BulkRetrieveVendorsResponse Hash] response from the API call
31
+ # @return [ApiResponse] the complete http response with raw body and status code.
32
32
  def bulk_retrieve_vendors(body:)
33
33
  new_api_call_builder
34
34
  .request(new_request_builder(HttpMethodEnum::POST,
@@ -51,7 +51,7 @@ module Square
51
51
  # @param [BulkUpdateVendorsRequest] body Required parameter: An object
52
52
  # containing the fields to POST for the request. See the corresponding
53
53
  # object definition for field details.
54
- # @return [BulkUpdateVendorsResponse Hash] response from the API call
54
+ # @return [ApiResponse] the complete http response with raw body and status code.
55
55
  def bulk_update_vendors(body:)
56
56
  new_api_call_builder
57
57
  .request(new_request_builder(HttpMethodEnum::PUT,
@@ -74,7 +74,7 @@ module Square
74
74
  # @param [CreateVendorRequest] body Required parameter: An object containing
75
75
  # the fields to POST for the request. See the corresponding object
76
76
  # definition for field details.
77
- # @return [CreateVendorResponse Hash] response from the API call
77
+ # @return [ApiResponse] the complete http response with raw body and status code.
78
78
  def create_vendor(body:)
79
79
  new_api_call_builder
80
80
  .request(new_request_builder(HttpMethodEnum::POST,
@@ -97,7 +97,7 @@ module Square
97
97
  # @param [SearchVendorsRequest] body Required parameter: An object
98
98
  # containing the fields to POST for the request. See the corresponding
99
99
  # object definition for field details.
100
- # @return [SearchVendorsResponse Hash] response from the API call
100
+ # @return [ApiResponse] the complete http response with raw body and status code.
101
101
  def search_vendors(body:)
102
102
  new_api_call_builder
103
103
  .request(new_request_builder(HttpMethodEnum::POST,
@@ -118,7 +118,7 @@ module Square
118
118
  # Retrieves the vendor of a specified [Vendor]($m/Vendor) ID.
119
119
  # @param [String] vendor_id Required parameter: ID of the
120
120
  # [Vendor](entity:Vendor) to retrieve.
121
- # @return [RetrieveVendorResponse Hash] response from the API call
121
+ # @return [ApiResponse] the complete http response with raw body and status code.
122
122
  def retrieve_vendor(vendor_id:)
123
123
  new_api_call_builder
124
124
  .request(new_request_builder(HttpMethodEnum::GET,
@@ -140,7 +140,7 @@ module Square
140
140
  # the fields to POST for the request. See the corresponding object
141
141
  # definition for field details.
142
142
  # @param [String] vendor_id Required parameter: Example:
143
- # @return [UpdateVendorResponse Hash] response from the API call
143
+ # @return [ApiResponse] the complete http response with raw body and status code.
144
144
  def update_vendor(body:,
145
145
  vendor_id:)
146
146
  new_api_call_builder
@@ -5,7 +5,7 @@ module Square
5
5
  # @param [String] api_version Optional parameter: The API version for which
6
6
  # to list event types. Setting this field overrides the default version used
7
7
  # by the application.
8
- # @return [ListWebhookEventTypesResponse Hash] response from the API call
8
+ # @return [ApiResponse] the complete http response with raw body and status code.
9
9
  def list_webhook_event_types(api_version: nil)
10
10
  new_api_call_builder
11
11
  .request(new_request_builder(HttpMethodEnum::GET,
@@ -37,7 +37,7 @@ module Square
37
37
  # to be returned in a single page. It is possible to receive fewer results
38
38
  # than the specified limit on a given page. The default value of 100 is also
39
39
  # the maximum allowed value. Default: 100
40
- # @return [ListWebhookSubscriptionsResponse Hash] response from the API call
40
+ # @return [ApiResponse] the complete http response with raw body and status code.
41
41
  def list_webhook_subscriptions(cursor: nil,
42
42
  include_disabled: false,
43
43
  sort_order: nil,
@@ -63,7 +63,7 @@ module Square
63
63
  # @param [CreateWebhookSubscriptionRequest] body Required parameter: An
64
64
  # object containing the fields to POST for the request. See the
65
65
  # corresponding object definition for field details.
66
- # @return [CreateWebhookSubscriptionResponse Hash] response from the API call
66
+ # @return [ApiResponse] the complete http response with raw body and status code.
67
67
  def create_webhook_subscription(body:)
68
68
  new_api_call_builder
69
69
  .request(new_request_builder(HttpMethodEnum::POST,
@@ -84,7 +84,7 @@ module Square
84
84
  # Deletes a webhook subscription.
85
85
  # @param [String] subscription_id Required parameter: [REQUIRED] The ID of
86
86
  # the [Subscription](entity:WebhookSubscription) to delete.
87
- # @return [DeleteWebhookSubscriptionResponse Hash] response from the API call
87
+ # @return [ApiResponse] the complete http response with raw body and status code.
88
88
  def delete_webhook_subscription(subscription_id:)
89
89
  new_api_call_builder
90
90
  .request(new_request_builder(HttpMethodEnum::DELETE,
@@ -104,7 +104,7 @@ module Square
104
104
  # Retrieves a webhook subscription identified by its ID.
105
105
  # @param [String] subscription_id Required parameter: [REQUIRED] The ID of
106
106
  # the [Subscription](entity:WebhookSubscription) to retrieve.
107
- # @return [RetrieveWebhookSubscriptionResponse Hash] response from the API call
107
+ # @return [ApiResponse] the complete http response with raw body and status code.
108
108
  def retrieve_webhook_subscription(subscription_id:)
109
109
  new_api_call_builder
110
110
  .request(new_request_builder(HttpMethodEnum::GET,
@@ -127,7 +127,7 @@ module Square
127
127
  # @param [UpdateWebhookSubscriptionRequest] body Required parameter: An
128
128
  # object containing the fields to POST for the request. See the
129
129
  # corresponding object definition for field details.
130
- # @return [UpdateWebhookSubscriptionResponse Hash] response from the API call
130
+ # @return [ApiResponse] the complete http response with raw body and status code.
131
131
  def update_webhook_subscription(subscription_id:,
132
132
  body:)
133
133
  new_api_call_builder
@@ -155,7 +155,7 @@ module Square
155
155
  # @param [UpdateWebhookSubscriptionSignatureKeyRequest] body Required
156
156
  # parameter: An object containing the fields to POST for the request. See
157
157
  # the corresponding object definition for field details.
158
- # @return [UpdateWebhookSubscriptionSignatureKeyResponse Hash] response from the API call
158
+ # @return [ApiResponse] the complete http response with raw body and status code.
159
159
  def update_webhook_subscription_signature_key(subscription_id:,
160
160
  body:)
161
161
  new_api_call_builder
@@ -183,7 +183,7 @@ module Square
183
183
  # @param [TestWebhookSubscriptionRequest] body Required parameter: An object
184
184
  # containing the fields to POST for the request. See the corresponding
185
185
  # object definition for field details.
186
- # @return [TestWebhookSubscriptionResponse Hash] response from the API call
186
+ # @return [ApiResponse] the complete http response with raw body and status code.
187
187
  def test_webhook_subscription(subscription_id:,
188
188
  body:)
189
189
  new_api_call_builder
data/lib/square/client.rb CHANGED
@@ -5,7 +5,7 @@ module Square
5
5
  attr_reader :config, :auth_managers
6
6
 
7
7
  def sdk_version
8
- '39.0.0.20240821'
8
+ '39.1.0.20240919'
9
9
  end
10
10
 
11
11
  def square_version
@@ -274,7 +274,7 @@ module Square
274
274
  retry_statuses: [408, 413, 429, 500, 502, 503, 504, 521, 522, 524],
275
275
  retry_methods: %i[get put], http_callback: nil, environment: 'production',
276
276
  custom_url: 'https://connect.squareup.com', access_token: nil,
277
- bearer_auth_credentials: nil, square_version: '2024-08-21',
277
+ bearer_auth_credentials: nil, square_version: '2024-09-19',
278
278
  user_agent_detail: '', additional_headers: {}, config: nil
279
279
  )
280
280
  @config = if config.nil?
@@ -24,7 +24,7 @@ module Square
24
24
  retry_statuses: [408, 413, 429, 500, 502, 503, 504, 521, 522, 524],
25
25
  retry_methods: %i[get put], http_callback: nil, environment: 'production',
26
26
  custom_url: 'https://connect.squareup.com', access_token: nil,
27
- bearer_auth_credentials: nil, square_version: '2024-08-21',
27
+ bearer_auth_credentials: nil, square_version: '2024-09-19',
28
28
  user_agent_detail: '', additional_headers: {}
29
29
  )
30
30
 
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: 39.0.0.20240821
4
+ version: 39.1.0.20240919
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: 2024-08-21 00:00:00.000000000 Z
11
+ date: 2024-09-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: apimatic_core_interfaces