square.rb 30.0.0.20230720 → 31.0.0.20230816
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +8 -0
- data/lib/square/api/base_api.rb +1 -1
- data/lib/square/api/bookings_api.rb +31 -0
- data/lib/square/api/gift_cards_api.rb +1 -1
- data/lib/square/client.rb +2 -2
- data/lib/square/configuration.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a240a4a6d004debbbfa68cda7f06de20424c7095df8cdd3f9874dab556d6f869
|
4
|
+
data.tar.gz: 5387eaf02e834b69df1cd238a8ba68e3d7195966d8b40f831e9942f52066e39f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d0296c13c1fc83e7e54d56cc397929f3d50ed3d243505c6372e890e7fec6cb65b6aabafd62bf15f80602982196ab36103bc8e7b816c633665717e172e0a8bdda
|
7
|
+
data.tar.gz: 2dce736c93cff6399463e35427319a4fe82009019c1300eafc39b3588a0056bdbba7bc26489b31f18152e22ffe6e9c7aadf10640b46384d8d0812755e65ab431
|
data/README.md
CHANGED
@@ -77,6 +77,7 @@ rake
|
|
77
77
|
|
78
78
|
### Orders
|
79
79
|
* [Orders]
|
80
|
+
* [Order Custom Attributes]
|
80
81
|
|
81
82
|
### Subscriptions
|
82
83
|
* [Subscriptions]
|
@@ -103,10 +104,13 @@ rake
|
|
103
104
|
|
104
105
|
### Bookings
|
105
106
|
* [Bookings]
|
107
|
+
* [Booking Custom Attributes]
|
106
108
|
|
107
109
|
### Business
|
108
110
|
* [Merchants]
|
111
|
+
* [Merchant Custom Attributes]
|
109
112
|
* [Locations]
|
113
|
+
* [Location Custom Attributes]
|
110
114
|
* [Devices]
|
111
115
|
* [Cash Drawers]
|
112
116
|
* [Vendors]
|
@@ -162,9 +166,13 @@ The following Square APIs are [deprecated](https://developer.squareup.com/docs/b
|
|
162
166
|
[Labor]: doc/api/labor.md
|
163
167
|
[Loyalty]: doc/api/loyalty.md
|
164
168
|
[Bookings]: doc/api/bookings.md
|
169
|
+
[Booking Custom Attributes]: doc/api/booking-custom-attributes.md
|
165
170
|
[Locations]: doc/api/locations.md
|
171
|
+
[Location Custom Attributes]: doc/api/location-custom-attributes.md
|
166
172
|
[Merchants]: doc/api/merchants.md
|
173
|
+
[Merchant Custom Attributes]: doc/api/merchant-custom-attributes.md
|
167
174
|
[Orders]: doc/api/orders.md
|
175
|
+
[Order Custom Attributes]: doc/api/order-custom-attributes.md
|
168
176
|
[Invoices]: doc/api/invoices.md
|
169
177
|
[Apple Pay]: doc/api/apple-pay.md
|
170
178
|
[Refunds]: doc/api/refunds.md
|
data/lib/square/api/base_api.rb
CHANGED
@@ -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/
|
7
|
+
'Square-Ruby-SDK/31.0.0.20230816 ({api-version}) {engine}/{engine-version} ({os-info}) {detail}'
|
8
8
|
end
|
9
9
|
|
10
10
|
def self.user_agent_parameters
|
@@ -11,6 +11,9 @@ module Square
|
|
11
11
|
# @param [String] cursor Optional parameter: The pagination cursor from the
|
12
12
|
# preceding response to return the next page of the results. Do not set this
|
13
13
|
# when retrieving the first page of the results.
|
14
|
+
# @param [String] customer_id Optional parameter: The
|
15
|
+
# [customer](entity:Customer) for whom to retrieve bookings. If this is not
|
16
|
+
# set, bookings for all customers are retrieved.
|
14
17
|
# @param [String] team_member_id Optional parameter: The team member for
|
15
18
|
# whom to retrieve bookings. If this is not set, bookings of all members are
|
16
19
|
# retrieved.
|
@@ -26,6 +29,7 @@ module Square
|
|
26
29
|
# @return [ListBookingsResponse Hash] response from the API call
|
27
30
|
def list_bookings(limit: nil,
|
28
31
|
cursor: nil,
|
32
|
+
customer_id: nil,
|
29
33
|
team_member_id: nil,
|
30
34
|
location_id: nil,
|
31
35
|
start_at_min: nil,
|
@@ -36,6 +40,7 @@ module Square
|
|
36
40
|
'default')
|
37
41
|
.query_param(new_parameter(limit, key: 'limit'))
|
38
42
|
.query_param(new_parameter(cursor, key: 'cursor'))
|
43
|
+
.query_param(new_parameter(customer_id, key: 'customer_id'))
|
39
44
|
.query_param(new_parameter(team_member_id, key: 'team_member_id'))
|
40
45
|
.query_param(new_parameter(location_id, key: 'location_id'))
|
41
46
|
.query_param(new_parameter(start_at_min, key: 'start_at_min'))
|
@@ -110,6 +115,32 @@ module Square
|
|
110
115
|
.execute
|
111
116
|
end
|
112
117
|
|
118
|
+
# Bulk-Retrieves a list of bookings by booking IDs.
|
119
|
+
# To call this endpoint with buyer-level permissions, set
|
120
|
+
# `APPOINTMENTS_READ` for the OAuth scope.
|
121
|
+
# To call this endpoint with seller-level permissions, set
|
122
|
+
# `APPOINTMENTS_ALL_READ` and `APPOINTMENTS_READ` for the OAuth scope.
|
123
|
+
# @param [BulkRetrieveBookingsRequest] body Required parameter: An object
|
124
|
+
# containing the fields to POST for the request. See the corresponding
|
125
|
+
# object definition for field details.
|
126
|
+
# @return [BulkRetrieveBookingsResponse Hash] response from the API call
|
127
|
+
def bulk_retrieve_bookings(body:)
|
128
|
+
new_api_call_builder
|
129
|
+
.request(new_request_builder(HttpMethodEnum::POST,
|
130
|
+
'/v2/bookings/bulk-retrieve',
|
131
|
+
'default')
|
132
|
+
.header_param(new_parameter('application/json', key: 'Content-Type'))
|
133
|
+
.body_param(new_parameter(body))
|
134
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
135
|
+
.body_serializer(proc do |param| param.to_json unless param.nil? end)
|
136
|
+
.auth(Single.new('global')))
|
137
|
+
.response(new_response_handler
|
138
|
+
.deserializer(APIHelper.method(:json_deserialize))
|
139
|
+
.is_api_response(true)
|
140
|
+
.convertor(ApiResponse.method(:create)))
|
141
|
+
.execute
|
142
|
+
end
|
143
|
+
|
113
144
|
# Retrieves a seller's booking profile.
|
114
145
|
# @return [RetrieveBusinessBookingProfileResponse Hash] response from the API call
|
115
146
|
def retrieve_business_booking_profile
|
@@ -13,7 +13,7 @@ module Square
|
|
13
13
|
# cards of all states.
|
14
14
|
# @param [Integer] limit Optional parameter: If a limit is provided, the
|
15
15
|
# endpoint returns only the specified number of results per page. The
|
16
|
-
# maximum value is
|
16
|
+
# maximum value is 200. The default value is 30. For more information, see
|
17
17
|
# [Pagination](https://developer.squareup.com/docs/working-with-apis/paginat
|
18
18
|
# ion).
|
19
19
|
# @param [String] cursor Optional parameter: A pagination cursor returned by
|
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
|
-
'
|
7
|
+
'31.0.0.20230816'
|
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-
|
270
|
+
square_version: '2023-08-16', user_agent_detail: '',
|
271
271
|
additional_headers: {}, config: nil)
|
272
272
|
@config = if config.nil?
|
273
273
|
Configuration.new(connection: connection, adapter: adapter,
|
data/lib/square/configuration.rb
CHANGED
@@ -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-
|
22
|
+
square_version: '2023-08-16', 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:
|
4
|
+
version: 31.0.0.20230816
|
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
|
+
date: 2023-08-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: apimatic_core_interfaces
|