square.rb 45.2.0.pre.rc.0 → 46.1.0.20260819
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/.fern/metadata.json +3 -2
- data/.fern/replay.lock +19 -1
- data/lib/square/catalog/client.rb +14 -1
- data/lib/square/catalog/object/client.rb +4 -0
- data/lib/square/catalog/types/batch_get_catalog_objects_request.rb +1 -0
- data/lib/square/catalog/types/search_catalog_items_request.rb +1 -0
- data/lib/square/catalog/types/search_catalog_objects_request.rb +1 -0
- data/lib/square/client.rb +1 -1
- data/lib/square/inventory/types/create_inventory_adjustment_reason_request.rb +12 -0
- data/lib/square/inventory/types/delete_inventory_adjustment_reason_request.rb +11 -0
- data/lib/square/inventory/types/list_inventory_adjustment_reasons_request.rb +12 -0
- data/lib/square/inventory/types/restore_inventory_adjustment_reason_request.rb +11 -0
- data/lib/square/inventory/types/retrieve_inventory_adjustment_reason_request.rb +11 -0
- data/lib/square/inventory/types/update_inventory_adjustment_reason_request.rb +12 -0
- data/lib/square/inventory/types/update_inventory_adjustment_request.rb +12 -0
- data/lib/square/orders/client.rb +3 -2
- data/lib/square/types/batch_get_catalog_objects_response.rb +1 -0
- data/lib/square/types/batch_retrieve_inventory_changes_request.rb +2 -0
- data/lib/square/types/batch_retrieve_inventory_changes_sort.rb +10 -0
- data/lib/square/types/batch_retrieve_inventory_changes_sort_field.rb +23 -0
- data/lib/square/types/card_brand.rb +4 -0
- data/lib/square/types/catalog_item_variation.rb +1 -0
- data/lib/square/types/catalog_item_variation_vendor_information.rb +12 -0
- data/lib/square/types/catalog_modifier.rb +1 -0
- data/lib/square/types/catalog_query.rb +1 -0
- data/lib/square/types/catalog_query_modifiers_for_child_list.rb +11 -0
- data/lib/square/types/create_inventory_adjustment_reason_response.rb +12 -0
- data/lib/square/types/delete_inventory_adjustment_reason_response.rb +12 -0
- data/lib/square/types/error_code.rb +9 -0
- data/lib/square/types/exclude_strategy.rb +1 -0
- data/lib/square/types/fulfillment.rb +1 -0
- data/lib/square/types/fulfillment_in_store_details.rb +16 -0
- data/lib/square/types/fulfillment_type.rb +1 -0
- data/lib/square/types/get_inventory_transfer_response.rb +16 -3
- data/lib/square/types/include_options.rb +11 -0
- data/lib/square/types/include_type.rb +12 -0
- data/lib/square/types/included_resources.rb +11 -0
- data/lib/square/types/inventory_adjustment.rb +6 -1
- data/lib/square/types/inventory_adjustment_reason.rb +15 -0
- data/lib/square/types/inventory_adjustment_reason_direction.rb +12 -0
- data/lib/square/types/inventory_adjustment_reason_id.rb +11 -0
- data/lib/square/types/inventory_adjustment_reason_id_type.rb +26 -0
- data/lib/square/types/inventory_change.rb +0 -1
- data/lib/square/types/inventory_change_type.rb +0 -1
- data/lib/square/types/inventory_count.rb +2 -1
- data/lib/square/types/inventory_physical_count.rb +1 -0
- data/lib/square/types/inventory_state.rb +1 -0
- data/lib/square/types/list_inventory_adjustment_reasons_response.rb +12 -0
- data/lib/square/types/location.rb +2 -0
- data/lib/square/types/loyalty_event.rb +2 -2
- data/lib/square/types/order_line_item_modifier.rb +1 -0
- data/lib/square/types/restore_inventory_adjustment_reason_response.rb +12 -0
- data/lib/square/types/retrieve_inventory_adjustment_reason_response.rb +12 -0
- data/lib/square/types/search_catalog_items_response.rb +1 -0
- data/lib/square/types/search_catalog_objects_response.rb +1 -0
- data/lib/square/types/update_inventory_adjustment_reason_response.rb +12 -0
- data/lib/square/types/update_inventory_adjustment_response.rb +10 -0
- data/lib/square/version.rb +1 -1
- data/lib/square.rb +29 -4
- data/reference.md +752 -175
- data/wiremock/wiremock-mappings.json +1 -1
- metadata +28 -3
- data/lib/square/types/inventory_transfer.rb +0 -23
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 63616f911fd171cb18a87cf222ed8229ba6a655d5d23f0de8c75f2b9d6192779
|
|
4
|
+
data.tar.gz: 485a88f53955ace6b9d56496f22d195b79d2c6199bb3299e44e609d81f96a9eb
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 035613f93744bfa5901c3e00418fc266f50b620839ad6eba5a29726d6a3998b5ef63770e27f2d5912daa52bc2bc9883534f57f54b4f2bd791b63898641c5da00
|
|
7
|
+
data.tar.gz: 6bbd2437912b11bebf662a52101fd3657917d3f3e0aa04c51e741cdc8d2f3ca426b5359dbe60b88b58ee9205f5dc615125c52e55ef744f4e801418d4a1599c95
|
data/.fern/metadata.json
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
{
|
|
2
|
-
"cliVersion": "
|
|
2
|
+
"cliVersion": "5.56.0",
|
|
3
3
|
"generatorName": "fernapi/fern-ruby-sdk",
|
|
4
4
|
"generatorVersion": "1.0.0-rc84",
|
|
5
5
|
"generatorConfig": {
|
|
6
6
|
"enableWireTests": true
|
|
7
7
|
},
|
|
8
|
-
"
|
|
8
|
+
"originGitCommit": "b05364cda2b85e35d8daa9ff2c24bbabbbd9652a",
|
|
9
|
+
"sdkVersion": "46.1.0.20260819"
|
|
9
10
|
}
|
data/.fern/replay.lock
CHANGED
|
@@ -6,5 +6,23 @@ generations:
|
|
|
6
6
|
timestamp: 2026-05-19T21:18:26.039Z
|
|
7
7
|
cli_version: unknown
|
|
8
8
|
generator_versions: {}
|
|
9
|
-
|
|
9
|
+
- commit_sha: 0df987cc98c660edfc8d9da6a8a62443df8d4754
|
|
10
|
+
tree_hash: 83a1da975e9400250bba4bf52a2ee62f320d33f5
|
|
11
|
+
timestamp: 2026-07-14T17:00:55.993Z
|
|
12
|
+
cli_version: unknown
|
|
13
|
+
generator_versions:
|
|
14
|
+
fernapi/fern-ruby-sdk: 1.0.0-rc84
|
|
15
|
+
- commit_sha: b0712bf25b1ee3e2ec220e59c3c61688c2b75c6f
|
|
16
|
+
tree_hash: 4a2f9cd8e383c435dcd1ba76069c1ae9d761aa67
|
|
17
|
+
timestamp: 2026-08-18T17:49:33.834Z
|
|
18
|
+
cli_version: unknown
|
|
19
|
+
generator_versions:
|
|
20
|
+
fernapi/fern-ruby-sdk: 1.0.0-rc84
|
|
21
|
+
- commit_sha: 2b507b58f33418df2cef553d5c1a2abbab7f3960
|
|
22
|
+
tree_hash: a5aa4a24276c8810c55ba372f9ab4180165faf92
|
|
23
|
+
timestamp: 2026-08-18T20:55:11.217Z
|
|
24
|
+
cli_version: unknown
|
|
25
|
+
generator_versions:
|
|
26
|
+
fernapi/fern-ruby-sdk: 1.0.0-rc84
|
|
27
|
+
current_generation: 2b507b58f33418df2cef553d5c1a2abbab7f3960
|
|
10
28
|
patches: []
|
|
@@ -106,9 +106,15 @@ module Square
|
|
|
106
106
|
# request (items, variations, modifier lists, discounts, and taxes) is no more
|
|
107
107
|
# than 10,000.
|
|
108
108
|
#
|
|
109
|
+
# This endpoint uses full-replacement semantics. The client must send the complete object, and any
|
|
110
|
+
# field absent from the request is interpreted as an intentional clear. This logic applies to
|
|
111
|
+
# nested objects as well. For example, omitting inlined children like variations will delete them.
|
|
112
|
+
#
|
|
109
113
|
# To ensure consistency, only one update request is processed at a time per seller account.
|
|
110
114
|
# While one (batch or non-batch) update request is being processed, other (batched and non-batched)
|
|
111
|
-
# update requests are rejected with the `429` error code.
|
|
115
|
+
# update requests are rejected with the `429` error code. Prefer batching related changes into a
|
|
116
|
+
# single call rather than issuing many small writes, since each write acquires the lock separately
|
|
117
|
+
# and parallel writes to the same seller will contend with each other, producing `429` errors.
|
|
112
118
|
#
|
|
113
119
|
# @param request_options [Hash]
|
|
114
120
|
# @param params [Square::Catalog::Types::BatchUpsertCatalogObjectsRequest]
|
|
@@ -181,6 +187,8 @@ module Square
|
|
|
181
187
|
# The `types` parameter is specified as a comma-separated list of the
|
|
182
188
|
# [CatalogObjectType](entity:CatalogObjectType) values,
|
|
183
189
|
# for example, "`ITEM`, `ITEM_VARIATION`, `MODIFIER`, `MODIFIER_LIST`, `CATEGORY`, `DISCOUNT`, `TAX`, `IMAGE`".
|
|
190
|
+
# Always specify `types` explicitly. When upgrading to a newer API version, omitting `types` may
|
|
191
|
+
# cause new object types to appear in results that were not returned under the previous version.
|
|
184
192
|
#
|
|
185
193
|
# __Important:__ ListCatalog does not return deleted catalog items. To retrieve
|
|
186
194
|
# deleted catalog items, use [SearchCatalogObjects](api-endpoint:Catalog-SearchCatalogObjects)
|
|
@@ -251,6 +259,11 @@ module Square
|
|
|
251
259
|
# variations, whereas `SearchCatalogObjects` does.
|
|
252
260
|
# - The both endpoints have different call conventions, including the query filter formats.
|
|
253
261
|
#
|
|
262
|
+
# The `object_types` parameter is specified as a list of [CatalogObjectType](entity:CatalogObjectType) values.
|
|
263
|
+
# Always specify `object_types` explicitly. When upgrading to a newer API version, omitting
|
|
264
|
+
# `object_types` may cause new object types to appear in results that were not returned under
|
|
265
|
+
# the previous version.
|
|
266
|
+
#
|
|
254
267
|
# @param request_options [Hash]
|
|
255
268
|
# @param params [Square::Catalog::Types::SearchCatalogObjectsRequest]
|
|
256
269
|
# @option request_options [String] :base_url
|
|
@@ -13,6 +13,10 @@ module Square
|
|
|
13
13
|
|
|
14
14
|
# Creates a new or updates the specified [CatalogObject](entity:CatalogObject).
|
|
15
15
|
#
|
|
16
|
+
# This endpoint uses full-replacement semantics. The client must send the complete object, and any
|
|
17
|
+
# field absent from the request is interpreted as an intentional clear. This logic applies to
|
|
18
|
+
# nested objects as well. For example, omitting inlined children like variations will delete them.
|
|
19
|
+
#
|
|
16
20
|
# To ensure consistency, only one update request is processed at a time per seller account.
|
|
17
21
|
# While one (batch or non-batch) update request is being processed, other (batched and non-batched)
|
|
18
22
|
# update requests are rejected with the `429` error code.
|
|
@@ -9,6 +9,7 @@ module Square
|
|
|
9
9
|
field :catalog_version, -> { Integer }, optional: true, nullable: false
|
|
10
10
|
field :include_deleted_objects, -> { Internal::Types::Boolean }, optional: true, nullable: false
|
|
11
11
|
field :include_category_path_to_root, -> { Internal::Types::Boolean }, optional: true, nullable: false
|
|
12
|
+
field :include_options, -> { Square::Types::IncludeOptions }, optional: true, nullable: false
|
|
12
13
|
end
|
|
13
14
|
end
|
|
14
15
|
end
|
|
@@ -14,6 +14,7 @@ module Square
|
|
|
14
14
|
field :product_types, -> { Internal::Types::Array[Square::Types::CatalogItemProductType] }, optional: true, nullable: false
|
|
15
15
|
field :custom_attribute_filters, -> { Internal::Types::Array[Square::Types::CustomAttributeFilter] }, optional: true, nullable: false
|
|
16
16
|
field :archived_state, -> { Square::Types::ArchivedState }, optional: true, nullable: false
|
|
17
|
+
field :include_options, -> { Square::Types::IncludeOptions }, optional: true, nullable: false
|
|
17
18
|
end
|
|
18
19
|
end
|
|
19
20
|
end
|
|
@@ -12,6 +12,7 @@ module Square
|
|
|
12
12
|
field :query, -> { Square::Types::CatalogQuery }, optional: true, nullable: false
|
|
13
13
|
field :limit, -> { Integer }, optional: true, nullable: false
|
|
14
14
|
field :include_category_path_to_root, -> { Internal::Types::Boolean }, optional: true, nullable: false
|
|
15
|
+
field :include_options, -> { Square::Types::IncludeOptions }, optional: true, nullable: false
|
|
15
16
|
end
|
|
16
17
|
end
|
|
17
18
|
end
|
data/lib/square/client.rb
CHANGED
|
@@ -10,7 +10,7 @@ module Square
|
|
|
10
10
|
@raw_client = Square::Internal::Http::RawClient.new(
|
|
11
11
|
base_url: base_url || Square::Environment::PRODUCTION,
|
|
12
12
|
headers: {
|
|
13
|
-
"User-Agent" => "square.rb/
|
|
13
|
+
"User-Agent" => "square.rb/46.1.0.20260819",
|
|
14
14
|
"X-Fern-Language" => "Ruby",
|
|
15
15
|
Authorization: "Bearer #{token}"
|
|
16
16
|
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Square
|
|
4
|
+
module Inventory
|
|
5
|
+
module Types
|
|
6
|
+
class CreateInventoryAdjustmentReasonRequest < Internal::Types::Model
|
|
7
|
+
field :idempotency_key, -> { String }, optional: false, nullable: false
|
|
8
|
+
field :adjustment_reason, -> { Square::Types::InventoryAdjustmentReason }, optional: false, nullable: false
|
|
9
|
+
end
|
|
10
|
+
end
|
|
11
|
+
end
|
|
12
|
+
end
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Square
|
|
4
|
+
module Inventory
|
|
5
|
+
module Types
|
|
6
|
+
class DeleteInventoryAdjustmentReasonRequest < Internal::Types::Model
|
|
7
|
+
field :reason_id, -> { Square::Types::InventoryAdjustmentReasonId }, optional: false, nullable: false
|
|
8
|
+
end
|
|
9
|
+
end
|
|
10
|
+
end
|
|
11
|
+
end
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Square
|
|
4
|
+
module Inventory
|
|
5
|
+
module Types
|
|
6
|
+
class ListInventoryAdjustmentReasonsRequest < Internal::Types::Model
|
|
7
|
+
field :include_deleted, -> { Internal::Types::Boolean }, optional: true, nullable: false
|
|
8
|
+
field :include_system_codes, -> { Internal::Types::Boolean }, optional: true, nullable: false
|
|
9
|
+
end
|
|
10
|
+
end
|
|
11
|
+
end
|
|
12
|
+
end
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Square
|
|
4
|
+
module Inventory
|
|
5
|
+
module Types
|
|
6
|
+
class RestoreInventoryAdjustmentReasonRequest < Internal::Types::Model
|
|
7
|
+
field :reason_id, -> { Square::Types::InventoryAdjustmentReasonId }, optional: false, nullable: false
|
|
8
|
+
end
|
|
9
|
+
end
|
|
10
|
+
end
|
|
11
|
+
end
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Square
|
|
4
|
+
module Inventory
|
|
5
|
+
module Types
|
|
6
|
+
class RetrieveInventoryAdjustmentReasonRequest < Internal::Types::Model
|
|
7
|
+
field :reason_id, -> { Square::Types::InventoryAdjustmentReasonId }, optional: false, nullable: false
|
|
8
|
+
end
|
|
9
|
+
end
|
|
10
|
+
end
|
|
11
|
+
end
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Square
|
|
4
|
+
module Inventory
|
|
5
|
+
module Types
|
|
6
|
+
class UpdateInventoryAdjustmentReasonRequest < Internal::Types::Model
|
|
7
|
+
field :reason_id, -> { Square::Types::InventoryAdjustmentReasonId }, optional: false, nullable: false
|
|
8
|
+
field :adjustment_reason, -> { Square::Types::InventoryAdjustmentReason }, optional: false, nullable: false
|
|
9
|
+
end
|
|
10
|
+
end
|
|
11
|
+
end
|
|
12
|
+
end
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Square
|
|
4
|
+
module Inventory
|
|
5
|
+
module Types
|
|
6
|
+
class UpdateInventoryAdjustmentRequest < Internal::Types::Model
|
|
7
|
+
field :idempotency_key, -> { String }, optional: false, nullable: false
|
|
8
|
+
field :adjustment, -> { Square::Types::InventoryAdjustment }, optional: false, nullable: false
|
|
9
|
+
end
|
|
10
|
+
end
|
|
11
|
+
end
|
|
12
|
+
end
|
data/lib/square/orders/client.rb
CHANGED
|
@@ -170,8 +170,9 @@ module Square
|
|
|
170
170
|
#
|
|
171
171
|
# Note that details for orders processed with Square Point of Sale while in
|
|
172
172
|
# offline mode might not be transmitted to Square for up to 72 hours. Offline
|
|
173
|
-
# orders have a `created_at` value that reflects the time the order was
|
|
174
|
-
# not the time
|
|
173
|
+
# orders have a `created_at` value that reflects the time the order was
|
|
174
|
+
# transmitted to Square and created server-side, not the time the order was
|
|
175
|
+
# created on the Point of Sale device.
|
|
175
176
|
#
|
|
176
177
|
# @param request_options [Hash]
|
|
177
178
|
# @param params [Square::Orders::Types::SearchOrdersRequest]
|
|
@@ -6,6 +6,7 @@ module Square
|
|
|
6
6
|
field :errors, -> { Internal::Types::Array[Square::Types::Error] }, optional: true, nullable: false
|
|
7
7
|
field :objects, -> { Internal::Types::Array[Square::Types::CatalogObject] }, optional: true, nullable: false
|
|
8
8
|
field :related_objects, -> { Internal::Types::Array[Square::Types::CatalogObject] }, optional: true, nullable: false
|
|
9
|
+
field :included_resources, -> { Square::Types::IncludedResources }, optional: true, nullable: false
|
|
9
10
|
end
|
|
10
11
|
end
|
|
11
12
|
end
|
|
@@ -11,6 +11,8 @@ module Square
|
|
|
11
11
|
field :updated_before, -> { String }, optional: true, nullable: false
|
|
12
12
|
field :cursor, -> { String }, optional: true, nullable: false
|
|
13
13
|
field :limit, -> { Integer }, optional: true, nullable: false
|
|
14
|
+
field :sort, -> { Square::Types::BatchRetrieveInventoryChangesSort }, optional: true, nullable: false
|
|
15
|
+
field :reason_ids, -> { Internal::Types::Array[Square::Types::InventoryAdjustmentReasonId] }, optional: true, nullable: false
|
|
14
16
|
end
|
|
15
17
|
end
|
|
16
18
|
end
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Square
|
|
4
|
+
module Types
|
|
5
|
+
class BatchRetrieveInventoryChangesSort < Internal::Types::Model
|
|
6
|
+
field :field, -> { String }, optional: true, nullable: false
|
|
7
|
+
field :order, -> { Square::Types::SortOrder }, optional: true, nullable: false
|
|
8
|
+
end
|
|
9
|
+
end
|
|
10
|
+
end
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Square
|
|
4
|
+
module Types
|
|
5
|
+
module BatchRetrieveInventoryChangesSortField
|
|
6
|
+
# BatchRetrieveInventoryChangesSortField is an alias for Object
|
|
7
|
+
|
|
8
|
+
# @option str [String]
|
|
9
|
+
#
|
|
10
|
+
# @return [untyped]
|
|
11
|
+
def self.load(str)
|
|
12
|
+
::JSON.parse(str)
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
# @option value [untyped]
|
|
16
|
+
#
|
|
17
|
+
# @return [String]
|
|
18
|
+
def self.dump(value)
|
|
19
|
+
::JSON.generate(value)
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
end
|
|
@@ -42,6 +42,7 @@ module Square
|
|
|
42
42
|
field :team_member_ids, -> { Internal::Types::Array[String] }, optional: true, nullable: false
|
|
43
43
|
field :stockable_conversion, -> { Square::Types::CatalogStockConversion }, optional: true, nullable: false
|
|
44
44
|
field :kitchen_name, -> { String }, optional: true, nullable: false
|
|
45
|
+
field :vendor_information, -> { Internal::Types::Array[Square::Types::CatalogItemVariationVendorInformation] }, optional: true, nullable: false
|
|
45
46
|
end
|
|
46
47
|
end
|
|
47
48
|
end
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Square
|
|
4
|
+
module Types
|
|
5
|
+
# Information about the vendor of an item variation.
|
|
6
|
+
class CatalogItemVariationVendorInformation < Internal::Types::Model
|
|
7
|
+
field :vendor_id, -> { String }, optional: true, nullable: false
|
|
8
|
+
field :vendor_code, -> { String }, optional: true, nullable: false
|
|
9
|
+
field :unit_cost_money, -> { Square::Types::Money }, optional: true, nullable: false
|
|
10
|
+
end
|
|
11
|
+
end
|
|
12
|
+
end
|
|
@@ -14,6 +14,7 @@ module Square
|
|
|
14
14
|
field :kitchen_name, -> { String }, optional: true, nullable: false
|
|
15
15
|
field :image_id, -> { String }, optional: true, nullable: false
|
|
16
16
|
field :hidden_online, -> { Internal::Types::Boolean }, optional: true, nullable: false
|
|
17
|
+
field :child_modifier_list_ids, -> { Internal::Types::Array[String] }, optional: true, nullable: false
|
|
17
18
|
end
|
|
18
19
|
end
|
|
19
20
|
end
|
|
@@ -43,6 +43,7 @@ module Square
|
|
|
43
43
|
field :items_for_modifier_list_query, -> { Square::Types::CatalogQueryItemsForModifierList }, optional: true, nullable: false
|
|
44
44
|
field :items_for_item_options_query, -> { Square::Types::CatalogQueryItemsForItemOptions }, optional: true, nullable: false
|
|
45
45
|
field :item_variations_for_item_option_values_query, -> { Square::Types::CatalogQueryItemVariationsForItemOptionValues }, optional: true, nullable: false
|
|
46
|
+
field :modifiers_for_child_list_query, -> { Square::Types::CatalogQueryModifiersForChildList }, optional: true, nullable: false
|
|
46
47
|
end
|
|
47
48
|
end
|
|
48
49
|
end
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Square
|
|
4
|
+
module Types
|
|
5
|
+
# Query to find `CatalogModifier` objects that reference a given `CatalogModifierList` in their
|
|
6
|
+
# `child_modifier_list_ids` field.
|
|
7
|
+
class CatalogQueryModifiersForChildList < Internal::Types::Model
|
|
8
|
+
field :child_modifier_list_ids, -> { Internal::Types::Array[String] }, optional: false, nullable: false
|
|
9
|
+
end
|
|
10
|
+
end
|
|
11
|
+
end
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Square
|
|
4
|
+
module Types
|
|
5
|
+
# Represents an output from a call to
|
|
6
|
+
# [CreateInventoryAdjustmentReason](api-endpoint:Inventory-CreateInventoryAdjustmentReason).
|
|
7
|
+
class CreateInventoryAdjustmentReasonResponse < Internal::Types::Model
|
|
8
|
+
field :errors, -> { Internal::Types::Array[Square::Types::Error] }, optional: true, nullable: false
|
|
9
|
+
field :adjustment_reason, -> { Square::Types::InventoryAdjustmentReason }, optional: true, nullable: false
|
|
10
|
+
end
|
|
11
|
+
end
|
|
12
|
+
end
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Square
|
|
4
|
+
module Types
|
|
5
|
+
# Represents an output from a call to
|
|
6
|
+
# [DeleteInventoryAdjustmentReason](api-endpoint:Inventory-DeleteInventoryAdjustmentReason).
|
|
7
|
+
class DeleteInventoryAdjustmentReasonResponse < Internal::Types::Model
|
|
8
|
+
field :errors, -> { Internal::Types::Array[Square::Types::Error] }, optional: true, nullable: false
|
|
9
|
+
field :adjustment_reason, -> { Square::Types::InventoryAdjustmentReason }, optional: true, nullable: false
|
|
10
|
+
end
|
|
11
|
+
end
|
|
12
|
+
end
|
|
@@ -103,6 +103,7 @@ module Square
|
|
|
103
103
|
CARD_TOKEN_EXPIRED = "CARD_TOKEN_EXPIRED"
|
|
104
104
|
CARD_TOKEN_USED = "CARD_TOKEN_USED"
|
|
105
105
|
AMOUNT_TOO_HIGH = "AMOUNT_TOO_HIGH"
|
|
106
|
+
AMOUNT_TOO_LOW = "AMOUNT_TOO_LOW"
|
|
106
107
|
UNSUPPORTED_INSTRUMENT_TYPE = "UNSUPPORTED_INSTRUMENT_TYPE"
|
|
107
108
|
REFUND_AMOUNT_INVALID = "REFUND_AMOUNT_INVALID"
|
|
108
109
|
REFUND_ALREADY_PENDING = "REFUND_ALREADY_PENDING"
|
|
@@ -133,6 +134,13 @@ module Square
|
|
|
133
134
|
PLAID_ERROR = "PLAID_ERROR"
|
|
134
135
|
PLAID_ERROR_ITEM_LOGIN_REQUIRED = "PLAID_ERROR_ITEM_LOGIN_REQUIRED"
|
|
135
136
|
PLAID_ERROR_RATE_LIMIT = "PLAID_ERROR_RATE_LIMIT"
|
|
137
|
+
PLAID_ERROR_INVALID_ACCESS_TOKEN = "PLAID_ERROR_INVALID_ACCESS_TOKEN"
|
|
138
|
+
PLAID_ERROR_INVALID_ACCOUNT_ID = "PLAID_ERROR_INVALID_ACCOUNT_ID"
|
|
139
|
+
PLAID_ERROR_NO_ACCOUNTS = "PLAID_ERROR_NO_ACCOUNTS"
|
|
140
|
+
PLAID_ERROR_ITEM_NOT_FOUND = "PLAID_ERROR_ITEM_NOT_FOUND"
|
|
141
|
+
PLAID_ERROR_INSUFFICIENT_CREDENTIALS = "PLAID_ERROR_INSUFFICIENT_CREDENTIALS"
|
|
142
|
+
PLAID_ERROR_ITEM_NOT_SUPPORTED = "PLAID_ERROR_ITEM_NOT_SUPPORTED"
|
|
143
|
+
PLAID_ERROR_PRODUCT_NOT_READY = "PLAID_ERROR_PRODUCT_NOT_READY"
|
|
136
144
|
PAYMENT_SOURCE_NOT_ENABLED_FOR_TARGET = "PAYMENT_SOURCE_NOT_ENABLED_FOR_TARGET"
|
|
137
145
|
CARD_DECLINED = "CARD_DECLINED"
|
|
138
146
|
VERIFY_CVV_FAILURE = "VERIFY_CVV_FAILURE"
|
|
@@ -144,6 +152,7 @@ module Square
|
|
|
144
152
|
ALLOWABLE_PIN_TRIES_EXCEEDED = "ALLOWABLE_PIN_TRIES_EXCEEDED"
|
|
145
153
|
RESERVATION_DECLINED = "RESERVATION_DECLINED"
|
|
146
154
|
UNKNOWN_BODY_PARAMETER = "UNKNOWN_BODY_PARAMETER"
|
|
155
|
+
CART_INELIGIBLE_FOR_EBT = "CART_INELIGIBLE_FOR_EBT"
|
|
147
156
|
NOT_FOUND = "NOT_FOUND"
|
|
148
157
|
APPLE_PAYMENT_PROCESSING_CERTIFICATE_HASH_NOT_FOUND = "APPLE_PAYMENT_PROCESSING_CERTIFICATE_HASH_NOT_FOUND"
|
|
149
158
|
METHOD_NOT_ALLOWED = "METHOD_NOT_ALLOWED"
|
|
@@ -16,6 +16,7 @@ module Square
|
|
|
16
16
|
field :pickup_details, -> { Square::Types::FulfillmentPickupDetails }, optional: true, nullable: false
|
|
17
17
|
field :shipment_details, -> { Square::Types::FulfillmentShipmentDetails }, optional: true, nullable: false
|
|
18
18
|
field :delivery_details, -> { Square::Types::FulfillmentDeliveryDetails }, optional: true, nullable: false
|
|
19
|
+
field :in_store_details, -> { Square::Types::FulfillmentInStoreDetails }, optional: true, nullable: false
|
|
19
20
|
end
|
|
20
21
|
end
|
|
21
22
|
end
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Square
|
|
4
|
+
module Types
|
|
5
|
+
# Contains the details necessary to fulfill an in-store order.
|
|
6
|
+
class FulfillmentInStoreDetails < Internal::Types::Model
|
|
7
|
+
field :note, -> { String }, optional: true, nullable: false
|
|
8
|
+
field :recipient, -> { Square::Types::FulfillmentRecipient }, optional: true, nullable: false
|
|
9
|
+
field :placed_at, -> { String }, optional: true, nullable: false
|
|
10
|
+
field :completed_at, -> { String }, optional: true, nullable: false
|
|
11
|
+
field :in_progress_at, -> { String }, optional: true, nullable: false
|
|
12
|
+
field :prepared_at, -> { String }, optional: true, nullable: false
|
|
13
|
+
field :canceled_at, -> { String }, optional: true, nullable: false
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
end
|
|
@@ -2,9 +2,22 @@
|
|
|
2
2
|
|
|
3
3
|
module Square
|
|
4
4
|
module Types
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
module GetInventoryTransferResponse
|
|
6
|
+
# GetInventoryTransferResponse is an alias for Object
|
|
7
|
+
|
|
8
|
+
# @option str [String]
|
|
9
|
+
#
|
|
10
|
+
# @return [untyped]
|
|
11
|
+
def self.load(str)
|
|
12
|
+
::JSON.parse(str)
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
# @option value [untyped]
|
|
16
|
+
#
|
|
17
|
+
# @return [String]
|
|
18
|
+
def self.dump(value)
|
|
19
|
+
::JSON.generate(value)
|
|
20
|
+
end
|
|
8
21
|
end
|
|
9
22
|
end
|
|
10
23
|
end
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Square
|
|
4
|
+
module Types
|
|
5
|
+
# Options to include related resources of the requested `CatalogObject`s. Related resources will be included in
|
|
6
|
+
# `IncludedResources` in the response.
|
|
7
|
+
class IncludeOptions < Internal::Types::Model
|
|
8
|
+
field :include, -> { Internal::Types::Array[Square::Types::IncludeType] }, optional: true, nullable: false
|
|
9
|
+
end
|
|
10
|
+
end
|
|
11
|
+
end
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Square
|
|
4
|
+
module Types
|
|
5
|
+
module IncludeType
|
|
6
|
+
extend Square::Internal::Types::Enum
|
|
7
|
+
|
|
8
|
+
INCLUDE_NESTED_MODIFIERS = "INCLUDE_NESTED_MODIFIERS"
|
|
9
|
+
INCLUDE_ANCESTOR_MODIFIERS = "INCLUDE_ANCESTOR_MODIFIERS"
|
|
10
|
+
end
|
|
11
|
+
end
|
|
12
|
+
end
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Square
|
|
4
|
+
module Types
|
|
5
|
+
# Related resources of the response `CatalogObject`s requested using `IncludeOptions`
|
|
6
|
+
class IncludedResources < Internal::Types::Model
|
|
7
|
+
field :nested_modifiers, -> { Internal::Types::Array[Square::Types::CatalogObject] }, optional: true, nullable: false
|
|
8
|
+
field :ancestor_modifiers, -> { Internal::Types::Array[Square::Types::CatalogObject] }, optional: true, nullable: false
|
|
9
|
+
end
|
|
10
|
+
end
|
|
11
|
+
end
|
|
@@ -9,7 +9,8 @@ module Square
|
|
|
9
9
|
field :reference_id, -> { String }, optional: true, nullable: false
|
|
10
10
|
field :from_state, -> { Square::Types::InventoryState }, optional: true, nullable: false
|
|
11
11
|
field :to_state, -> { Square::Types::InventoryState }, optional: true, nullable: false
|
|
12
|
-
field :
|
|
12
|
+
field :from_location_id, -> { String }, optional: true, nullable: false
|
|
13
|
+
field :to_location_id, -> { String }, optional: true, nullable: false
|
|
13
14
|
field :catalog_object_id, -> { String }, optional: true, nullable: false
|
|
14
15
|
field :catalog_object_type, -> { String }, optional: true, nullable: false
|
|
15
16
|
field :quantity, -> { String }, optional: true, nullable: false
|
|
@@ -24,6 +25,10 @@ module Square
|
|
|
24
25
|
field :purchase_order_id, -> { String }, optional: true, nullable: false
|
|
25
26
|
field :goods_receipt_id, -> { String }, optional: true, nullable: false
|
|
26
27
|
field :adjustment_group, -> { Square::Types::InventoryAdjustmentGroup }, optional: true, nullable: false
|
|
28
|
+
field :cost_money, -> { Square::Types::Money }, optional: true, nullable: false
|
|
29
|
+
field :vendor_id, -> { String }, optional: true, nullable: false
|
|
30
|
+
field :physical_count_id, -> { String }, optional: true, nullable: false
|
|
31
|
+
field :reason_id, -> { Square::Types::InventoryAdjustmentReasonId }, optional: true, nullable: false
|
|
27
32
|
end
|
|
28
33
|
end
|
|
29
34
|
end
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Square
|
|
4
|
+
module Types
|
|
5
|
+
# Represents an inventory adjustment reason.
|
|
6
|
+
class InventoryAdjustmentReason < Internal::Types::Model
|
|
7
|
+
field :id, -> { Square::Types::InventoryAdjustmentReasonId }, optional: false, nullable: false
|
|
8
|
+
field :name, -> { String }, optional: true, nullable: false
|
|
9
|
+
field :direction, -> { Square::Types::InventoryAdjustmentReasonDirection }, optional: true, nullable: false
|
|
10
|
+
field :created_at, -> { String }, optional: true, nullable: false
|
|
11
|
+
field :updated_at, -> { String }, optional: true, nullable: false
|
|
12
|
+
field :is_deleted, -> { Internal::Types::Boolean }, optional: true, nullable: false
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
end
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Square
|
|
4
|
+
module Types
|
|
5
|
+
# Identifies a standard or custom inventory adjustment reason.
|
|
6
|
+
class InventoryAdjustmentReasonId < Internal::Types::Model
|
|
7
|
+
field :type, -> { Square::Types::InventoryAdjustmentReasonIdType }, optional: false, nullable: false
|
|
8
|
+
field :custom_reason_id, -> { String }, optional: true, nullable: false
|
|
9
|
+
end
|
|
10
|
+
end
|
|
11
|
+
end
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Square
|
|
4
|
+
module Types
|
|
5
|
+
module InventoryAdjustmentReasonIdType
|
|
6
|
+
extend Square::Internal::Types::Enum
|
|
7
|
+
|
|
8
|
+
RECEIVED = "RECEIVED"
|
|
9
|
+
DAMAGED = "DAMAGED"
|
|
10
|
+
THEFT = "THEFT"
|
|
11
|
+
LOST = "LOST"
|
|
12
|
+
RETURNED = "RETURNED"
|
|
13
|
+
SPOILAGE_WASTE = "SPOILAGE_WASTE"
|
|
14
|
+
SAMPLES_PROMOTIONAL = "SAMPLES_PROMOTIONAL"
|
|
15
|
+
INTERNAL_USE = "INTERNAL_USE"
|
|
16
|
+
VENDOR_RETURN = "VENDOR_RETURN"
|
|
17
|
+
PRODUCTION_WASTE = "PRODUCTION_WASTE"
|
|
18
|
+
SALE = "SALE"
|
|
19
|
+
RECOUNT = "RECOUNT"
|
|
20
|
+
TRANSFER = "TRANSFER"
|
|
21
|
+
IN_TRANSIT = "IN_TRANSIT"
|
|
22
|
+
CANCELED_SALE = "CANCELED_SALE"
|
|
23
|
+
CUSTOM = "CUSTOM"
|
|
24
|
+
end
|
|
25
|
+
end
|
|
26
|
+
end
|
|
@@ -9,7 +9,6 @@ module Square
|
|
|
9
9
|
field :type, -> { Square::Types::InventoryChangeType }, optional: true, nullable: false
|
|
10
10
|
field :physical_count, -> { Square::Types::InventoryPhysicalCount }, optional: true, nullable: false
|
|
11
11
|
field :adjustment, -> { Square::Types::InventoryAdjustment }, optional: true, nullable: false
|
|
12
|
-
field :transfer, -> { Square::Types::InventoryTransfer }, optional: true, nullable: false
|
|
13
12
|
field :measurement_unit, -> { Square::Types::CatalogMeasurementUnit }, optional: true, nullable: false
|
|
14
13
|
field :measurement_unit_id, -> { String }, optional: true, nullable: false
|
|
15
14
|
end
|