square.rb 3.20191023.0 → 3.20191120.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 +4 -4
- data/lib/square/api/apple_pay_api.rb +3 -3
- data/lib/square/api/base_api.rb +2 -2
- data/lib/square/api/catalog_api.rb +105 -16
- data/lib/square/api/customers_api.rb +7 -10
- data/lib/square/api/employees_api.rb +2 -2
- data/lib/square/api/inventory_api.rb +6 -6
- data/lib/square/api/locations_api.rb +36 -2
- data/lib/square/api/mobile_authorization_api.rb +4 -3
- data/lib/square/api/o_auth_api.rb +1 -1
- data/lib/square/api/refunds_api.rb +3 -3
- data/lib/square/api/reporting_api.rb +4 -6
- data/lib/square/api/transactions_api.rb +21 -18
- data/lib/square/api/v1_items_api.rb +445 -45
- data/lib/square/api/v1_locations_api.rb +23 -2
- data/lib/square/client.rb +2 -2
- data/spec/user_journey_spec.rb +12 -14
- metadata +2 -2
@@ -10,9 +10,19 @@ module Square
|
|
10
10
|
super(config, http_call_back: http_call_back)
|
11
11
|
end
|
12
12
|
|
13
|
-
# Get a business
|
13
|
+
# Get the general information for a business.
|
14
|
+
# ---
|
15
|
+
# - __Deprecation date__: 2019-11-20
|
16
|
+
# - [__Retirement
|
17
|
+
# date__](https://developer.squareup.com/docs/build-basics/api-lifecycle#dep
|
18
|
+
# recated): 2020-11-18
|
19
|
+
# - [Migration
|
20
|
+
# guide](https://developer.squareup.com/docs/migrate-from-v1/guides/v1-locat
|
21
|
+
# ions)
|
22
|
+
# ---
|
14
23
|
# @return [V1Merchant Hash] response from the API call
|
15
24
|
def retrieve_business
|
25
|
+
warn 'Endpoint retrieve_business in V1LocationsApi is deprecated'
|
16
26
|
# Prepare query url.
|
17
27
|
_query_builder = config.get_base_uri
|
18
28
|
_query_builder << '/v1/me'
|
@@ -37,9 +47,20 @@ module Square
|
|
37
47
|
ApiResponse.new(_response, data: decoded, errors: _errors)
|
38
48
|
end
|
39
49
|
|
40
|
-
# Provides details for
|
50
|
+
# Provides details for all business locations associated with a Square
|
51
|
+
# account, including the Square-assigned object ID for the location.
|
52
|
+
# ---
|
53
|
+
# - __Deprecation date__: 2019-11-20
|
54
|
+
# - [__Retirement
|
55
|
+
# date__](https://developer.squareup.com/docs/build-basics/api-lifecycle#dep
|
56
|
+
# recated): 2020-11-18
|
57
|
+
# - [Migration
|
58
|
+
# guide](https://developer.squareup.com/docs/migrate-from-v1/guides/v1-locat
|
59
|
+
# ions)
|
60
|
+
# ---
|
41
61
|
# @return [List of V1Merchant Hash] response from the API call
|
42
62
|
def list_locations
|
63
|
+
warn 'Endpoint list_locations in V1LocationsApi is deprecated'
|
43
64
|
# Prepare query url.
|
44
65
|
_query_builder = config.get_base_uri
|
45
66
|
_query_builder << '/v1/me/locations'
|
data/lib/square/client.rb
CHANGED
data/spec/user_journey_spec.rb
CHANGED
@@ -14,18 +14,18 @@ describe "UserJourney" do
|
|
14
14
|
|
15
15
|
let :customer do
|
16
16
|
{
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
17
|
+
"given_name": "Amelia",
|
18
|
+
"family_name": "Earhart",
|
19
|
+
"phone_number": phone_number,
|
20
|
+
"note": "a customer",
|
21
|
+
"address": {
|
22
|
+
"address_line_1": "500 Electric Ave",
|
23
|
+
"address_line_2": "Suite 600",
|
24
|
+
"locality": "New York",
|
25
|
+
"administrative_district_level_1": "NY",
|
26
|
+
"postal_code": postal_code,
|
27
|
+
"country": "US"
|
28
|
+
}
|
29
29
|
}
|
30
30
|
end
|
31
31
|
|
@@ -70,7 +70,6 @@ describe "UserJourney" do
|
|
70
70
|
end
|
71
71
|
end
|
72
72
|
|
73
|
-
|
74
73
|
# There is no sandbox support for V1 endpoints as production token is required for the following tests
|
75
74
|
# describe 'V1 Category' do
|
76
75
|
# it 'should succeed for each endpoint call' do
|
@@ -111,7 +110,6 @@ describe "UserJourney" do
|
|
111
110
|
response = sq.customers.create_customer(body: customer)
|
112
111
|
assert_equal response.data.customer[:phone_number], phone_number
|
113
112
|
|
114
|
-
|
115
113
|
assert_equal response.status_code, 200
|
116
114
|
created_customer = response.data.customer
|
117
115
|
|
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: 3.
|
4
|
+
version: 3.20191120.0
|
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: 2019-
|
11
|
+
date: 2019-11-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: logging
|