shopify_api 14.0.0 → 14.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/ISSUE_TEMPLATE/BUG_REPORT.md +23 -17
- data/.github/workflows/build.yml +2 -0
- data/.rubocop.yml +0 -1
- data/.ruby-version +1 -0
- data/CHANGELOG.md +13 -0
- data/Gemfile +13 -1
- data/Gemfile.lock +24 -22
- data/dev.yml +1 -1
- data/docs/usage/custom_apps.md +3 -3
- data/docs/usage/graphql_storefront.md +13 -6
- data/docs/usage/rest.md +1 -1
- data/docs/usage/webhooks.md +2 -2
- data/lib/shopify_api/admin_versions.rb +2 -1
- data/lib/shopify_api/auth/session.rb +3 -3
- data/lib/shopify_api/clients/graphql/storefront.rb +26 -4
- data/lib/shopify_api/logger.rb +1 -1
- data/lib/shopify_api/rest/resources/2022_04/fulfillment_event.rb +5 -8
- data/lib/shopify_api/rest/resources/2022_04/inventory_item.rb +2 -2
- data/lib/shopify_api/rest/resources/2022_04/variant.rb +6 -6
- data/lib/shopify_api/rest/resources/2022_07/fulfillment_event.rb +5 -8
- data/lib/shopify_api/rest/resources/2022_07/inventory_item.rb +2 -2
- data/lib/shopify_api/rest/resources/2022_07/variant.rb +6 -6
- data/lib/shopify_api/rest/resources/2022_10/fulfillment_event.rb +5 -8
- data/lib/shopify_api/rest/resources/2022_10/inventory_item.rb +2 -2
- data/lib/shopify_api/rest/resources/2022_10/variant.rb +4 -4
- data/lib/shopify_api/rest/resources/2023_01/fulfillment_event.rb +5 -8
- data/lib/shopify_api/rest/resources/2023_01/inventory_item.rb +2 -2
- data/lib/shopify_api/rest/resources/2023_01/variant.rb +4 -4
- data/lib/shopify_api/rest/resources/2023_04/fulfillment_event.rb +5 -8
- data/lib/shopify_api/rest/resources/2023_04/inventory_item.rb +2 -2
- data/lib/shopify_api/rest/resources/2023_04/variant.rb +4 -4
- data/lib/shopify_api/rest/resources/2023_07/fulfillment_event.rb +5 -8
- data/lib/shopify_api/rest/resources/2023_07/inventory_item.rb +2 -2
- data/lib/shopify_api/rest/resources/2023_07/variant.rb +4 -4
- data/lib/shopify_api/rest/resources/2023_10/fulfillment_event.rb +5 -8
- data/lib/shopify_api/rest/resources/2023_10/inventory_item.rb +2 -2
- data/lib/shopify_api/rest/resources/2023_10/variant.rb +4 -4
- data/lib/shopify_api/rest/resources/2024_01/fulfillment_event.rb +5 -8
- data/lib/shopify_api/rest/resources/2024_01/inventory_item.rb +2 -2
- data/lib/shopify_api/rest/resources/2024_01/variant.rb +4 -4
- data/lib/shopify_api/rest/resources/2024_04/abandoned_checkout.rb +194 -0
- data/lib/shopify_api/rest/resources/2024_04/access_scope.rb +62 -0
- data/lib/shopify_api/rest/resources/2024_04/apple_pay_certificate.rb +109 -0
- data/lib/shopify_api/rest/resources/2024_04/application_charge.rb +113 -0
- data/lib/shopify_api/rest/resources/2024_04/application_credit.rb +95 -0
- data/lib/shopify_api/rest/resources/2024_04/article.rb +269 -0
- data/lib/shopify_api/rest/resources/2024_04/asset.rb +122 -0
- data/lib/shopify_api/rest/resources/2024_04/assigned_fulfillment_order.rb +92 -0
- data/lib/shopify_api/rest/resources/2024_04/balance.rb +58 -0
- data/lib/shopify_api/rest/resources/2024_04/blog.rb +166 -0
- data/lib/shopify_api/rest/resources/2024_04/cancellation_request.rb +87 -0
- data/lib/shopify_api/rest/resources/2024_04/carrier_service.rb +120 -0
- data/lib/shopify_api/rest/resources/2024_04/checkout.rb +213 -0
- data/lib/shopify_api/rest/resources/2024_04/collect.rb +146 -0
- data/lib/shopify_api/rest/resources/2024_04/collection.rb +114 -0
- data/lib/shopify_api/rest/resources/2024_04/collection_listing.rb +159 -0
- data/lib/shopify_api/rest/resources/2024_04/comment.rb +287 -0
- data/lib/shopify_api/rest/resources/2024_04/country.rb +141 -0
- data/lib/shopify_api/rest/resources/2024_04/currency.rb +61 -0
- data/lib/shopify_api/rest/resources/2024_04/custom_collection.rb +191 -0
- data/lib/shopify_api/rest/resources/2024_04/customer.rb +333 -0
- data/lib/shopify_api/rest/resources/2024_04/customer_address.rb +215 -0
- data/lib/shopify_api/rest/resources/2024_04/deprecated_api_call.rb +61 -0
- data/lib/shopify_api/rest/resources/2024_04/discount_code.rb +226 -0
- data/lib/shopify_api/rest/resources/2024_04/dispute.rb +115 -0
- data/lib/shopify_api/rest/resources/2024_04/dispute_evidence.rb +121 -0
- data/lib/shopify_api/rest/resources/2024_04/dispute_file_upload.rb +85 -0
- data/lib/shopify_api/rest/resources/2024_04/draft_order.rb +279 -0
- data/lib/shopify_api/rest/resources/2024_04/event.rb +152 -0
- data/lib/shopify_api/rest/resources/2024_04/fulfillment.rb +235 -0
- data/lib/shopify_api/rest/resources/2024_04/fulfillment_event.rb +167 -0
- data/lib/shopify_api/rest/resources/2024_04/fulfillment_order.rb +326 -0
- data/lib/shopify_api/rest/resources/2024_04/fulfillment_request.rb +101 -0
- data/lib/shopify_api/rest/resources/2024_04/fulfillment_service.rb +134 -0
- data/lib/shopify_api/rest/resources/2024_04/gift_card.rb +222 -0
- data/lib/shopify_api/rest/resources/2024_04/gift_card_adjustment.rb +122 -0
- data/lib/shopify_api/rest/resources/2024_04/image.rb +161 -0
- data/lib/shopify_api/rest/resources/2024_04/inventory_item.rb +112 -0
- data/lib/shopify_api/rest/resources/2024_04/inventory_level.rb +183 -0
- data/lib/shopify_api/rest/resources/2024_04/location.rb +171 -0
- data/lib/shopify_api/rest/resources/2024_04/locations_for_move.rb +60 -0
- data/lib/shopify_api/rest/resources/2024_04/marketing_event.rb +213 -0
- data/lib/shopify_api/rest/resources/2024_04/metafield.rb +348 -0
- data/lib/shopify_api/rest/resources/2024_04/mobile_platform_application.rb +114 -0
- data/lib/shopify_api/rest/resources/2024_04/order.rb +489 -0
- data/lib/shopify_api/rest/resources/2024_04/order_risk.rb +148 -0
- data/lib/shopify_api/rest/resources/2024_04/page.rb +198 -0
- data/lib/shopify_api/rest/resources/2024_04/payment.rb +144 -0
- data/lib/shopify_api/rest/resources/2024_04/payment_gateway.rb +147 -0
- data/lib/shopify_api/rest/resources/2024_04/payment_transaction.rb +114 -0
- data/lib/shopify_api/rest/resources/2024_04/payout.rb +101 -0
- data/lib/shopify_api/rest/resources/2024_04/policy.rb +73 -0
- data/lib/shopify_api/rest/resources/2024_04/price_rule.rb +227 -0
- data/lib/shopify_api/rest/resources/2024_04/product.rb +227 -0
- data/lib/shopify_api/rest/resources/2024_04/product_listing.rb +200 -0
- data/lib/shopify_api/rest/resources/2024_04/product_resource_feedback.rb +92 -0
- data/lib/shopify_api/rest/resources/2024_04/province.rb +136 -0
- data/lib/shopify_api/rest/resources/2024_04/recurring_application_charge.rb +176 -0
- data/lib/shopify_api/rest/resources/2024_04/redirect.rb +143 -0
- data/lib/shopify_api/rest/resources/2024_04/refund.rb +155 -0
- data/lib/shopify_api/rest/resources/2024_04/resource_feedback.rb +77 -0
- data/lib/shopify_api/rest/resources/2024_04/script_tag.rb +159 -0
- data/lib/shopify_api/rest/resources/2024_04/shipping_zone.rb +87 -0
- data/lib/shopify_api/rest/resources/2024_04/shop.rb +222 -0
- data/lib/shopify_api/rest/resources/2024_04/smart_collection.rb +220 -0
- data/lib/shopify_api/rest/resources/2024_04/storefront_access_token.rb +91 -0
- data/lib/shopify_api/rest/resources/2024_04/tender_transaction.rb +97 -0
- data/lib/shopify_api/rest/resources/2024_04/theme.rb +127 -0
- data/lib/shopify_api/rest/resources/2024_04/transaction.rb +188 -0
- data/lib/shopify_api/rest/resources/2024_04/usage_charge.rb +106 -0
- data/lib/shopify_api/rest/resources/2024_04/user.rb +142 -0
- data/lib/shopify_api/rest/resources/2024_04/variant.rb +212 -0
- data/lib/shopify_api/rest/resources/2024_04/webhook.rb +172 -0
- data/lib/shopify_api/version.rb +1 -1
- data/lib/shopify_api/webhooks/registry.rb +6 -6
- data/lib/shopify_api.rb +1 -0
- data/shopify_api.gemspec +0 -8
- metadata +77 -101
@@ -0,0 +1,348 @@
|
|
1
|
+
# typed: false
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
########################################################################################################################
|
5
|
+
# This file is auto-generated. If you have an issue, please create a GitHub issue. #
|
6
|
+
########################################################################################################################
|
7
|
+
|
8
|
+
module ShopifyAPI
|
9
|
+
class Metafield < ShopifyAPI::Rest::Base
|
10
|
+
extend T::Sig
|
11
|
+
|
12
|
+
@prev_page_info = T.let(Concurrent::ThreadLocalVar.new { nil }, Concurrent::ThreadLocalVar)
|
13
|
+
@next_page_info = T.let(Concurrent::ThreadLocalVar.new { nil }, Concurrent::ThreadLocalVar)
|
14
|
+
|
15
|
+
@api_call_limit = T.let(Concurrent::ThreadLocalVar.new { nil }, Concurrent::ThreadLocalVar)
|
16
|
+
@retry_request_after = T.let(Concurrent::ThreadLocalVar.new { nil }, Concurrent::ThreadLocalVar)
|
17
|
+
|
18
|
+
sig { params(session: T.nilable(ShopifyAPI::Auth::Session), from_hash: T.nilable(T::Hash[T.untyped, T.untyped])).void }
|
19
|
+
def initialize(session: ShopifyAPI::Context.active_session, from_hash: nil)
|
20
|
+
|
21
|
+
@key = T.let(nil, T.nilable(String))
|
22
|
+
@namespace = T.let(nil, T.nilable(String))
|
23
|
+
@value = T.let(nil, T.nilable(T.any(String, Integer, Float, T::Boolean, String)))
|
24
|
+
@article_id = T.let(nil, T.nilable(Integer))
|
25
|
+
@blog_id = T.let(nil, T.nilable(Integer))
|
26
|
+
@collection_id = T.let(nil, T.nilable(Integer))
|
27
|
+
@created_at = T.let(nil, T.nilable(String))
|
28
|
+
@customer_id = T.let(nil, T.nilable(Integer))
|
29
|
+
@description = T.let(nil, T.nilable(String))
|
30
|
+
@draft_order_id = T.let(nil, T.nilable(Integer))
|
31
|
+
@id = T.let(nil, T.nilable(Integer))
|
32
|
+
@order_id = T.let(nil, T.nilable(Integer))
|
33
|
+
@owner_id = T.let(nil, T.nilable(Integer))
|
34
|
+
@owner_resource = T.let(nil, T.nilable(String))
|
35
|
+
@page_id = T.let(nil, T.nilable(Integer))
|
36
|
+
@product_id = T.let(nil, T.nilable(Integer))
|
37
|
+
@product_image_id = T.let(nil, T.nilable(Integer))
|
38
|
+
@type = T.let(nil, T.nilable(String))
|
39
|
+
@updated_at = T.let(nil, T.nilable(String))
|
40
|
+
@variant_id = T.let(nil, T.nilable(Integer))
|
41
|
+
|
42
|
+
super(session: session, from_hash: from_hash)
|
43
|
+
end
|
44
|
+
|
45
|
+
@has_one = T.let({}, T::Hash[Symbol, Class])
|
46
|
+
@has_many = T.let({}, T::Hash[Symbol, Class])
|
47
|
+
@paths = T.let([
|
48
|
+
{http_method: :delete, operation: :delete, ids: [:article_id, :id], path: "articles/<article_id>/metafields/<id>.json"},
|
49
|
+
{http_method: :delete, operation: :delete, ids: [:blog_id, :id], path: "blogs/<blog_id>/metafields/<id>.json"},
|
50
|
+
{http_method: :delete, operation: :delete, ids: [:blog_id, :id], path: "blogs/<blog_id>/metafields/<id>.json"},
|
51
|
+
{http_method: :delete, operation: :delete, ids: [:collection_id, :id], path: "collections/<collection_id>/metafields/<id>.json"},
|
52
|
+
{http_method: :delete, operation: :delete, ids: [:customer_id, :id], path: "customers/<customer_id>/metafields/<id>.json"},
|
53
|
+
{http_method: :delete, operation: :delete, ids: [:draft_order_id, :id], path: "draft_orders/<draft_order_id>/metafields/<id>.json"},
|
54
|
+
{http_method: :delete, operation: :delete, ids: [:id], path: "metafields/<id>.json"},
|
55
|
+
{http_method: :delete, operation: :delete, ids: [:order_id, :id], path: "orders/<order_id>/metafields/<id>.json"},
|
56
|
+
{http_method: :delete, operation: :delete, ids: [:page_id, :id], path: "pages/<page_id>/metafields/<id>.json"},
|
57
|
+
{http_method: :delete, operation: :delete, ids: [:product_image_id, :id], path: "product_images/<product_image_id>/metafields/<id>.json"},
|
58
|
+
{http_method: :delete, operation: :delete, ids: [:product_id, :id], path: "products/<product_id>/metafields/<id>.json"},
|
59
|
+
{http_method: :delete, operation: :delete, ids: [:variant_id, :id], path: "variants/<variant_id>/metafields/<id>.json"},
|
60
|
+
{http_method: :get, operation: :count, ids: [:article_id], path: "articles/<article_id>/metafields/count.json"},
|
61
|
+
{http_method: :get, operation: :count, ids: [:blog_id], path: "blogs/<blog_id>/metafields/count.json"},
|
62
|
+
{http_method: :get, operation: :count, ids: [:blog_id], path: "blogs/<blog_id>/metafields/count.json"},
|
63
|
+
{http_method: :get, operation: :count, ids: [:collection_id], path: "collections/<collection_id>/metafields/count.json"},
|
64
|
+
{http_method: :get, operation: :count, ids: [:customer_id], path: "customers/<customer_id>/metafields/count.json"},
|
65
|
+
{http_method: :get, operation: :count, ids: [:draft_order_id], path: "draft_orders/<draft_order_id>/metafields/count.json"},
|
66
|
+
{http_method: :get, operation: :count, ids: [], path: "metafields/count.json"},
|
67
|
+
{http_method: :get, operation: :count, ids: [:order_id], path: "orders/<order_id>/metafields/count.json"},
|
68
|
+
{http_method: :get, operation: :count, ids: [:page_id], path: "pages/<page_id>/metafields/count.json"},
|
69
|
+
{http_method: :get, operation: :count, ids: [:product_image_id], path: "product_images/<product_image_id>/metafields/count.json"},
|
70
|
+
{http_method: :get, operation: :count, ids: [:product_id], path: "products/<product_id>/metafields/count.json"},
|
71
|
+
{http_method: :get, operation: :count, ids: [:variant_id], path: "variants/<variant_id>/metafields/count.json"},
|
72
|
+
{http_method: :get, operation: :get, ids: [:article_id], path: "articles/<article_id>/metafields.json"},
|
73
|
+
{http_method: :get, operation: :get, ids: [:article_id, :id], path: "articles/<article_id>/metafields/<id>.json"},
|
74
|
+
{http_method: :get, operation: :get, ids: [:blog_id], path: "blogs/<blog_id>/metafields.json"},
|
75
|
+
{http_method: :get, operation: :get, ids: [:blog_id], path: "blogs/<blog_id>/metafields.json"},
|
76
|
+
{http_method: :get, operation: :get, ids: [:blog_id, :id], path: "blogs/<blog_id>/metafields/<id>.json"},
|
77
|
+
{http_method: :get, operation: :get, ids: [:blog_id, :id], path: "blogs/<blog_id>/metafields/<id>.json"},
|
78
|
+
{http_method: :get, operation: :get, ids: [:collection_id], path: "collections/<collection_id>/metafields.json"},
|
79
|
+
{http_method: :get, operation: :get, ids: [:collection_id, :id], path: "collections/<collection_id>/metafields/<id>.json"},
|
80
|
+
{http_method: :get, operation: :get, ids: [:customer_id], path: "customers/<customer_id>/metafields.json"},
|
81
|
+
{http_method: :get, operation: :get, ids: [:customer_id, :id], path: "customers/<customer_id>/metafields/<id>.json"},
|
82
|
+
{http_method: :get, operation: :get, ids: [:draft_order_id], path: "draft_orders/<draft_order_id>/metafields.json"},
|
83
|
+
{http_method: :get, operation: :get, ids: [:draft_order_id, :id], path: "draft_orders/<draft_order_id>/metafields/<id>.json"},
|
84
|
+
{http_method: :get, operation: :get, ids: [], path: "metafields.json"},
|
85
|
+
{http_method: :get, operation: :get, ids: [:id], path: "metafields/<id>.json"},
|
86
|
+
{http_method: :get, operation: :get, ids: [:order_id], path: "orders/<order_id>/metafields.json"},
|
87
|
+
{http_method: :get, operation: :get, ids: [:order_id, :id], path: "orders/<order_id>/metafields/<id>.json"},
|
88
|
+
{http_method: :get, operation: :get, ids: [:page_id], path: "pages/<page_id>/metafields.json"},
|
89
|
+
{http_method: :get, operation: :get, ids: [:page_id, :id], path: "pages/<page_id>/metafields/<id>.json"},
|
90
|
+
{http_method: :get, operation: :get, ids: [:product_image_id], path: "product_images/<product_image_id>/metafields.json"},
|
91
|
+
{http_method: :get, operation: :get, ids: [:product_image_id, :id], path: "product_images/<product_image_id>/metafields/<id>.json"},
|
92
|
+
{http_method: :get, operation: :get, ids: [:product_id], path: "products/<product_id>/metafields.json"},
|
93
|
+
{http_method: :get, operation: :get, ids: [:product_id, :id], path: "products/<product_id>/metafields/<id>.json"},
|
94
|
+
{http_method: :get, operation: :get, ids: [:variant_id], path: "variants/<variant_id>/metafields.json"},
|
95
|
+
{http_method: :get, operation: :get, ids: [:variant_id, :id], path: "variants/<variant_id>/metafields/<id>.json"},
|
96
|
+
{http_method: :post, operation: :post, ids: [:article_id], path: "articles/<article_id>/metafields.json"},
|
97
|
+
{http_method: :post, operation: :post, ids: [:blog_id], path: "blogs/<blog_id>/metafields.json"},
|
98
|
+
{http_method: :post, operation: :post, ids: [:blog_id], path: "blogs/<blog_id>/metafields.json"},
|
99
|
+
{http_method: :post, operation: :post, ids: [:collection_id], path: "collections/<collection_id>/metafields.json"},
|
100
|
+
{http_method: :post, operation: :post, ids: [:customer_id], path: "customers/<customer_id>/metafields.json"},
|
101
|
+
{http_method: :post, operation: :post, ids: [:draft_order_id], path: "draft_orders/<draft_order_id>/metafields.json"},
|
102
|
+
{http_method: :post, operation: :post, ids: [], path: "metafields.json"},
|
103
|
+
{http_method: :post, operation: :post, ids: [:order_id], path: "orders/<order_id>/metafields.json"},
|
104
|
+
{http_method: :post, operation: :post, ids: [:page_id], path: "pages/<page_id>/metafields.json"},
|
105
|
+
{http_method: :post, operation: :post, ids: [:product_image_id], path: "product_images/<product_image_id>/metafields.json"},
|
106
|
+
{http_method: :post, operation: :post, ids: [:product_id], path: "products/<product_id>/metafields.json"},
|
107
|
+
{http_method: :post, operation: :post, ids: [:variant_id], path: "variants/<variant_id>/metafields.json"},
|
108
|
+
{http_method: :put, operation: :put, ids: [:article_id, :id], path: "articles/<article_id>/metafields/<id>.json"},
|
109
|
+
{http_method: :put, operation: :put, ids: [:blog_id, :id], path: "blogs/<blog_id>/metafields/<id>.json"},
|
110
|
+
{http_method: :put, operation: :put, ids: [:blog_id, :id], path: "blogs/<blog_id>/metafields/<id>.json"},
|
111
|
+
{http_method: :put, operation: :put, ids: [:collection_id, :id], path: "collections/<collection_id>/metafields/<id>.json"},
|
112
|
+
{http_method: :put, operation: :put, ids: [:customer_id, :id], path: "customers/<customer_id>/metafields/<id>.json"},
|
113
|
+
{http_method: :put, operation: :put, ids: [:draft_order_id, :id], path: "draft_orders/<draft_order_id>/metafields/<id>.json"},
|
114
|
+
{http_method: :put, operation: :put, ids: [:id], path: "metafields/<id>.json"},
|
115
|
+
{http_method: :put, operation: :put, ids: [:order_id, :id], path: "orders/<order_id>/metafields/<id>.json"},
|
116
|
+
{http_method: :put, operation: :put, ids: [:page_id, :id], path: "pages/<page_id>/metafields/<id>.json"},
|
117
|
+
{http_method: :put, operation: :put, ids: [:product_image_id, :id], path: "product_images/<product_image_id>/metafields/<id>.json"},
|
118
|
+
{http_method: :put, operation: :put, ids: [:product_id, :id], path: "products/<product_id>/metafields/<id>.json"},
|
119
|
+
{http_method: :put, operation: :put, ids: [:variant_id, :id], path: "variants/<variant_id>/metafields/<id>.json"}
|
120
|
+
], T::Array[T::Hash[String, T.any(T::Array[Symbol], String, Symbol)]])
|
121
|
+
|
122
|
+
sig { returns(T.nilable(String)) }
|
123
|
+
attr_reader :key
|
124
|
+
sig { returns(T.nilable(String)) }
|
125
|
+
attr_reader :namespace
|
126
|
+
sig { returns(T.nilable(T.any(String, Integer, Float, T::Boolean, String))) }
|
127
|
+
attr_reader :value
|
128
|
+
sig { returns(T.nilable(Integer)) }
|
129
|
+
attr_reader :article_id
|
130
|
+
sig { returns(T.nilable(Integer)) }
|
131
|
+
attr_reader :blog_id
|
132
|
+
sig { returns(T.nilable(Integer)) }
|
133
|
+
attr_reader :collection_id
|
134
|
+
sig { returns(T.nilable(String)) }
|
135
|
+
attr_reader :created_at
|
136
|
+
sig { returns(T.nilable(Integer)) }
|
137
|
+
attr_reader :customer_id
|
138
|
+
sig { returns(T.nilable(String)) }
|
139
|
+
attr_reader :description
|
140
|
+
sig { returns(T.nilable(Integer)) }
|
141
|
+
attr_reader :draft_order_id
|
142
|
+
sig { returns(T.nilable(Integer)) }
|
143
|
+
attr_reader :id
|
144
|
+
sig { returns(T.nilable(Integer)) }
|
145
|
+
attr_reader :order_id
|
146
|
+
sig { returns(T.nilable(Integer)) }
|
147
|
+
attr_reader :owner_id
|
148
|
+
sig { returns(T.nilable(String)) }
|
149
|
+
attr_reader :owner_resource
|
150
|
+
sig { returns(T.nilable(Integer)) }
|
151
|
+
attr_reader :page_id
|
152
|
+
sig { returns(T.nilable(Integer)) }
|
153
|
+
attr_reader :product_id
|
154
|
+
sig { returns(T.nilable(Integer)) }
|
155
|
+
attr_reader :product_image_id
|
156
|
+
sig { returns(T.nilable(String)) }
|
157
|
+
attr_reader :type
|
158
|
+
sig { returns(T.nilable(String)) }
|
159
|
+
attr_reader :updated_at
|
160
|
+
sig { returns(T.nilable(Integer)) }
|
161
|
+
attr_reader :variant_id
|
162
|
+
|
163
|
+
class << self
|
164
|
+
sig do
|
165
|
+
params(
|
166
|
+
id: T.any(Integer, String),
|
167
|
+
article_id: T.nilable(T.any(Integer, String)),
|
168
|
+
blog_id: T.nilable(T.any(Integer, String)),
|
169
|
+
collection_id: T.nilable(T.any(Integer, String)),
|
170
|
+
customer_id: T.nilable(T.any(Integer, String)),
|
171
|
+
draft_order_id: T.nilable(T.any(Integer, String)),
|
172
|
+
order_id: T.nilable(T.any(Integer, String)),
|
173
|
+
page_id: T.nilable(T.any(Integer, String)),
|
174
|
+
product_image_id: T.nilable(T.any(Integer, String)),
|
175
|
+
product_id: T.nilable(T.any(Integer, String)),
|
176
|
+
variant_id: T.nilable(T.any(Integer, String)),
|
177
|
+
fields: T.untyped,
|
178
|
+
session: Auth::Session
|
179
|
+
).returns(T.nilable(Metafield))
|
180
|
+
end
|
181
|
+
def find(
|
182
|
+
id:,
|
183
|
+
article_id: nil,
|
184
|
+
blog_id: nil,
|
185
|
+
collection_id: nil,
|
186
|
+
customer_id: nil,
|
187
|
+
draft_order_id: nil,
|
188
|
+
order_id: nil,
|
189
|
+
page_id: nil,
|
190
|
+
product_image_id: nil,
|
191
|
+
product_id: nil,
|
192
|
+
variant_id: nil,
|
193
|
+
fields: nil,
|
194
|
+
session: ShopifyAPI::Context.active_session
|
195
|
+
)
|
196
|
+
result = base_find(
|
197
|
+
session: session,
|
198
|
+
ids: {id: id, article_id: article_id, blog_id: blog_id, collection_id: collection_id, customer_id: customer_id, draft_order_id: draft_order_id, order_id: order_id, page_id: page_id, product_image_id: product_image_id, product_id: product_id, variant_id: variant_id},
|
199
|
+
params: {fields: fields},
|
200
|
+
)
|
201
|
+
T.cast(result[0], T.nilable(Metafield))
|
202
|
+
end
|
203
|
+
|
204
|
+
sig do
|
205
|
+
params(
|
206
|
+
id: T.any(Integer, String),
|
207
|
+
article_id: T.nilable(T.any(Integer, String)),
|
208
|
+
blog_id: T.nilable(T.any(Integer, String)),
|
209
|
+
collection_id: T.nilable(T.any(Integer, String)),
|
210
|
+
customer_id: T.nilable(T.any(Integer, String)),
|
211
|
+
draft_order_id: T.nilable(T.any(Integer, String)),
|
212
|
+
order_id: T.nilable(T.any(Integer, String)),
|
213
|
+
page_id: T.nilable(T.any(Integer, String)),
|
214
|
+
product_image_id: T.nilable(T.any(Integer, String)),
|
215
|
+
product_id: T.nilable(T.any(Integer, String)),
|
216
|
+
variant_id: T.nilable(T.any(Integer, String)),
|
217
|
+
session: Auth::Session
|
218
|
+
).returns(T.untyped)
|
219
|
+
end
|
220
|
+
def delete(
|
221
|
+
id:,
|
222
|
+
article_id: nil,
|
223
|
+
blog_id: nil,
|
224
|
+
collection_id: nil,
|
225
|
+
customer_id: nil,
|
226
|
+
draft_order_id: nil,
|
227
|
+
order_id: nil,
|
228
|
+
page_id: nil,
|
229
|
+
product_image_id: nil,
|
230
|
+
product_id: nil,
|
231
|
+
variant_id: nil,
|
232
|
+
session: ShopifyAPI::Context.active_session
|
233
|
+
)
|
234
|
+
request(
|
235
|
+
http_method: :delete,
|
236
|
+
operation: :delete,
|
237
|
+
session: session,
|
238
|
+
ids: {id: id, article_id: article_id, blog_id: blog_id, collection_id: collection_id, customer_id: customer_id, draft_order_id: draft_order_id, order_id: order_id, page_id: page_id, product_image_id: product_image_id, product_id: product_id, variant_id: variant_id},
|
239
|
+
params: {},
|
240
|
+
)
|
241
|
+
end
|
242
|
+
|
243
|
+
sig do
|
244
|
+
params(
|
245
|
+
article_id: T.nilable(T.any(Integer, String)),
|
246
|
+
blog_id: T.nilable(T.any(Integer, String)),
|
247
|
+
collection_id: T.nilable(T.any(Integer, String)),
|
248
|
+
customer_id: T.nilable(T.any(Integer, String)),
|
249
|
+
draft_order_id: T.nilable(T.any(Integer, String)),
|
250
|
+
order_id: T.nilable(T.any(Integer, String)),
|
251
|
+
page_id: T.nilable(T.any(Integer, String)),
|
252
|
+
product_image_id: T.nilable(T.any(Integer, String)),
|
253
|
+
product_id: T.nilable(T.any(Integer, String)),
|
254
|
+
variant_id: T.nilable(T.any(Integer, String)),
|
255
|
+
limit: T.untyped,
|
256
|
+
since_id: T.untyped,
|
257
|
+
created_at_min: T.untyped,
|
258
|
+
created_at_max: T.untyped,
|
259
|
+
updated_at_min: T.untyped,
|
260
|
+
updated_at_max: T.untyped,
|
261
|
+
namespace: T.untyped,
|
262
|
+
key: T.untyped,
|
263
|
+
type: T.untyped,
|
264
|
+
fields: T.untyped,
|
265
|
+
metafield: T.nilable(T::Hash[T.untyped, T.untyped]),
|
266
|
+
session: Auth::Session,
|
267
|
+
kwargs: T.untyped
|
268
|
+
).returns(T::Array[Metafield])
|
269
|
+
end
|
270
|
+
def all(
|
271
|
+
article_id: nil,
|
272
|
+
blog_id: nil,
|
273
|
+
collection_id: nil,
|
274
|
+
customer_id: nil,
|
275
|
+
draft_order_id: nil,
|
276
|
+
order_id: nil,
|
277
|
+
page_id: nil,
|
278
|
+
product_image_id: nil,
|
279
|
+
product_id: nil,
|
280
|
+
variant_id: nil,
|
281
|
+
limit: nil,
|
282
|
+
since_id: nil,
|
283
|
+
created_at_min: nil,
|
284
|
+
created_at_max: nil,
|
285
|
+
updated_at_min: nil,
|
286
|
+
updated_at_max: nil,
|
287
|
+
namespace: nil,
|
288
|
+
key: nil,
|
289
|
+
type: nil,
|
290
|
+
fields: nil,
|
291
|
+
metafield: nil,
|
292
|
+
session: ShopifyAPI::Context.active_session,
|
293
|
+
**kwargs
|
294
|
+
)
|
295
|
+
response = base_find(
|
296
|
+
session: session,
|
297
|
+
ids: {article_id: article_id, blog_id: blog_id, collection_id: collection_id, customer_id: customer_id, draft_order_id: draft_order_id, order_id: order_id, page_id: page_id, product_image_id: product_image_id, product_id: product_id, variant_id: variant_id},
|
298
|
+
params: {limit: limit, since_id: since_id, created_at_min: created_at_min, created_at_max: created_at_max, updated_at_min: updated_at_min, updated_at_max: updated_at_max, namespace: namespace, key: key, type: type, fields: fields, metafield: metafield}.merge(kwargs).compact,
|
299
|
+
)
|
300
|
+
|
301
|
+
T.cast(response, T::Array[Metafield])
|
302
|
+
end
|
303
|
+
|
304
|
+
sig do
|
305
|
+
params(
|
306
|
+
article_id: T.nilable(T.any(Integer, String)),
|
307
|
+
blog_id: T.nilable(T.any(Integer, String)),
|
308
|
+
collection_id: T.nilable(T.any(Integer, String)),
|
309
|
+
customer_id: T.nilable(T.any(Integer, String)),
|
310
|
+
draft_order_id: T.nilable(T.any(Integer, String)),
|
311
|
+
order_id: T.nilable(T.any(Integer, String)),
|
312
|
+
page_id: T.nilable(T.any(Integer, String)),
|
313
|
+
product_image_id: T.nilable(T.any(Integer, String)),
|
314
|
+
product_id: T.nilable(T.any(Integer, String)),
|
315
|
+
variant_id: T.nilable(T.any(Integer, String)),
|
316
|
+
session: Auth::Session,
|
317
|
+
kwargs: T.untyped
|
318
|
+
).returns(T.untyped)
|
319
|
+
end
|
320
|
+
def count(
|
321
|
+
article_id: nil,
|
322
|
+
blog_id: nil,
|
323
|
+
collection_id: nil,
|
324
|
+
customer_id: nil,
|
325
|
+
draft_order_id: nil,
|
326
|
+
order_id: nil,
|
327
|
+
page_id: nil,
|
328
|
+
product_image_id: nil,
|
329
|
+
product_id: nil,
|
330
|
+
variant_id: nil,
|
331
|
+
session: ShopifyAPI::Context.active_session,
|
332
|
+
**kwargs
|
333
|
+
)
|
334
|
+
request(
|
335
|
+
http_method: :get,
|
336
|
+
operation: :count,
|
337
|
+
session: session,
|
338
|
+
ids: {article_id: article_id, blog_id: blog_id, collection_id: collection_id, customer_id: customer_id, draft_order_id: draft_order_id, order_id: order_id, page_id: page_id, product_image_id: product_image_id, product_id: product_id, variant_id: variant_id},
|
339
|
+
params: {}.merge(kwargs).compact,
|
340
|
+
body: {},
|
341
|
+
entity: nil,
|
342
|
+
)
|
343
|
+
end
|
344
|
+
|
345
|
+
end
|
346
|
+
|
347
|
+
end
|
348
|
+
end
|
@@ -0,0 +1,114 @@
|
|
1
|
+
# typed: false
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
########################################################################################################################
|
5
|
+
# This file is auto-generated. If you have an issue, please create a GitHub issue. #
|
6
|
+
########################################################################################################################
|
7
|
+
|
8
|
+
module ShopifyAPI
|
9
|
+
class MobilePlatformApplication < ShopifyAPI::Rest::Base
|
10
|
+
extend T::Sig
|
11
|
+
|
12
|
+
@prev_page_info = T.let(Concurrent::ThreadLocalVar.new { nil }, Concurrent::ThreadLocalVar)
|
13
|
+
@next_page_info = T.let(Concurrent::ThreadLocalVar.new { nil }, Concurrent::ThreadLocalVar)
|
14
|
+
|
15
|
+
@api_call_limit = T.let(Concurrent::ThreadLocalVar.new { nil }, Concurrent::ThreadLocalVar)
|
16
|
+
@retry_request_after = T.let(Concurrent::ThreadLocalVar.new { nil }, Concurrent::ThreadLocalVar)
|
17
|
+
|
18
|
+
sig { params(session: T.nilable(ShopifyAPI::Auth::Session), from_hash: T.nilable(T::Hash[T.untyped, T.untyped])).void }
|
19
|
+
def initialize(session: ShopifyAPI::Context.active_session, from_hash: nil)
|
20
|
+
|
21
|
+
@application_id = T.let(nil, T.nilable(String))
|
22
|
+
@enabled_shared_webcredentials = T.let(nil, T.nilable(T::Boolean))
|
23
|
+
@enabled_universal_or_app_links = T.let(nil, T.nilable(T::Boolean))
|
24
|
+
@id = T.let(nil, T.nilable(Integer))
|
25
|
+
@platform = T.let(nil, T.nilable(String))
|
26
|
+
@sha256_cert_fingerprints = T.let(nil, T.nilable(T::Array[T.untyped]))
|
27
|
+
|
28
|
+
super(session: session, from_hash: from_hash)
|
29
|
+
end
|
30
|
+
|
31
|
+
@has_one = T.let({}, T::Hash[Symbol, Class])
|
32
|
+
@has_many = T.let({}, T::Hash[Symbol, Class])
|
33
|
+
@paths = T.let([
|
34
|
+
{http_method: :delete, operation: :delete, ids: [:id], path: "mobile_platform_applications/<id>.json"},
|
35
|
+
{http_method: :get, operation: :get, ids: [], path: "mobile_platform_applications.json"},
|
36
|
+
{http_method: :get, operation: :get, ids: [:id], path: "mobile_platform_applications/<id>.json"},
|
37
|
+
{http_method: :post, operation: :post, ids: [], path: "mobile_platform_applications.json"},
|
38
|
+
{http_method: :put, operation: :put, ids: [:id], path: "mobile_platform_applications/<id>.json"}
|
39
|
+
], T::Array[T::Hash[String, T.any(T::Array[Symbol], String, Symbol)]])
|
40
|
+
|
41
|
+
sig { returns(T.nilable(String)) }
|
42
|
+
attr_reader :application_id
|
43
|
+
sig { returns(T.nilable(T::Boolean)) }
|
44
|
+
attr_reader :enabled_shared_webcredentials
|
45
|
+
sig { returns(T.nilable(T::Boolean)) }
|
46
|
+
attr_reader :enabled_universal_or_app_links
|
47
|
+
sig { returns(T.nilable(Integer)) }
|
48
|
+
attr_reader :id
|
49
|
+
sig { returns(T.nilable(String)) }
|
50
|
+
attr_reader :platform
|
51
|
+
sig { returns(T.nilable(T::Array[String])) }
|
52
|
+
attr_reader :sha256_cert_fingerprints
|
53
|
+
|
54
|
+
class << self
|
55
|
+
sig do
|
56
|
+
params(
|
57
|
+
id: T.any(Integer, String),
|
58
|
+
session: Auth::Session
|
59
|
+
).returns(T.nilable(MobilePlatformApplication))
|
60
|
+
end
|
61
|
+
def find(
|
62
|
+
id:,
|
63
|
+
session: ShopifyAPI::Context.active_session
|
64
|
+
)
|
65
|
+
result = base_find(
|
66
|
+
session: session,
|
67
|
+
ids: {id: id},
|
68
|
+
params: {},
|
69
|
+
)
|
70
|
+
T.cast(result[0], T.nilable(MobilePlatformApplication))
|
71
|
+
end
|
72
|
+
|
73
|
+
sig do
|
74
|
+
params(
|
75
|
+
id: T.any(Integer, String),
|
76
|
+
session: Auth::Session
|
77
|
+
).returns(T.untyped)
|
78
|
+
end
|
79
|
+
def delete(
|
80
|
+
id:,
|
81
|
+
session: ShopifyAPI::Context.active_session
|
82
|
+
)
|
83
|
+
request(
|
84
|
+
http_method: :delete,
|
85
|
+
operation: :delete,
|
86
|
+
session: session,
|
87
|
+
ids: {id: id},
|
88
|
+
params: {},
|
89
|
+
)
|
90
|
+
end
|
91
|
+
|
92
|
+
sig do
|
93
|
+
params(
|
94
|
+
session: Auth::Session,
|
95
|
+
kwargs: T.untyped
|
96
|
+
).returns(T::Array[MobilePlatformApplication])
|
97
|
+
end
|
98
|
+
def all(
|
99
|
+
session: ShopifyAPI::Context.active_session,
|
100
|
+
**kwargs
|
101
|
+
)
|
102
|
+
response = base_find(
|
103
|
+
session: session,
|
104
|
+
ids: {},
|
105
|
+
params: {}.merge(kwargs).compact,
|
106
|
+
)
|
107
|
+
|
108
|
+
T.cast(response, T::Array[MobilePlatformApplication])
|
109
|
+
end
|
110
|
+
|
111
|
+
end
|
112
|
+
|
113
|
+
end
|
114
|
+
end
|