shopify_api 14.3.0 → 14.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (94) hide show
  1. checksums.yaml +4 -4
  2. data/BREAKING_CHANGES_FOR_V15.md +42 -0
  3. data/CHANGELOG.md +12 -0
  4. data/Gemfile.lock +2 -2
  5. data/README.md +3 -0
  6. data/docs/usage/oauth.md +88 -16
  7. data/lib/shopify_api/admin_versions.rb +2 -1
  8. data/lib/shopify_api/clients/graphql/client.rb +3 -2
  9. data/lib/shopify_api/clients/graphql/storefront.rb +4 -2
  10. data/lib/shopify_api/rest/resources/2022_04/shop.rb +2 -2
  11. data/lib/shopify_api/rest/resources/2022_07/shop.rb +2 -2
  12. data/lib/shopify_api/rest/resources/2022_10/shop.rb +2 -2
  13. data/lib/shopify_api/rest/resources/2023_01/shop.rb +2 -2
  14. data/lib/shopify_api/rest/resources/2023_04/shop.rb +2 -2
  15. data/lib/shopify_api/rest/resources/2023_07/shop.rb +2 -2
  16. data/lib/shopify_api/rest/resources/2023_10/shop.rb +2 -2
  17. data/lib/shopify_api/rest/resources/2024_01/shop.rb +2 -2
  18. data/lib/shopify_api/rest/resources/2024_04/shop.rb +2 -2
  19. data/lib/shopify_api/rest/resources/2024_07/abandoned_checkout.rb +194 -0
  20. data/lib/shopify_api/rest/resources/2024_07/access_scope.rb +62 -0
  21. data/lib/shopify_api/rest/resources/2024_07/apple_pay_certificate.rb +109 -0
  22. data/lib/shopify_api/rest/resources/2024_07/application_charge.rb +113 -0
  23. data/lib/shopify_api/rest/resources/2024_07/application_credit.rb +95 -0
  24. data/lib/shopify_api/rest/resources/2024_07/article.rb +269 -0
  25. data/lib/shopify_api/rest/resources/2024_07/asset.rb +122 -0
  26. data/lib/shopify_api/rest/resources/2024_07/assigned_fulfillment_order.rb +92 -0
  27. data/lib/shopify_api/rest/resources/2024_07/balance.rb +58 -0
  28. data/lib/shopify_api/rest/resources/2024_07/blog.rb +166 -0
  29. data/lib/shopify_api/rest/resources/2024_07/cancellation_request.rb +87 -0
  30. data/lib/shopify_api/rest/resources/2024_07/carrier_service.rb +120 -0
  31. data/lib/shopify_api/rest/resources/2024_07/checkout.rb +213 -0
  32. data/lib/shopify_api/rest/resources/2024_07/collect.rb +146 -0
  33. data/lib/shopify_api/rest/resources/2024_07/collection.rb +114 -0
  34. data/lib/shopify_api/rest/resources/2024_07/collection_listing.rb +159 -0
  35. data/lib/shopify_api/rest/resources/2024_07/comment.rb +287 -0
  36. data/lib/shopify_api/rest/resources/2024_07/country.rb +141 -0
  37. data/lib/shopify_api/rest/resources/2024_07/currency.rb +61 -0
  38. data/lib/shopify_api/rest/resources/2024_07/custom_collection.rb +191 -0
  39. data/lib/shopify_api/rest/resources/2024_07/customer.rb +333 -0
  40. data/lib/shopify_api/rest/resources/2024_07/customer_address.rb +215 -0
  41. data/lib/shopify_api/rest/resources/2024_07/deprecated_api_call.rb +61 -0
  42. data/lib/shopify_api/rest/resources/2024_07/discount_code.rb +226 -0
  43. data/lib/shopify_api/rest/resources/2024_07/dispute.rb +115 -0
  44. data/lib/shopify_api/rest/resources/2024_07/dispute_evidence.rb +121 -0
  45. data/lib/shopify_api/rest/resources/2024_07/dispute_file_upload.rb +85 -0
  46. data/lib/shopify_api/rest/resources/2024_07/draft_order.rb +279 -0
  47. data/lib/shopify_api/rest/resources/2024_07/event.rb +152 -0
  48. data/lib/shopify_api/rest/resources/2024_07/fulfillment.rb +235 -0
  49. data/lib/shopify_api/rest/resources/2024_07/fulfillment_event.rb +167 -0
  50. data/lib/shopify_api/rest/resources/2024_07/fulfillment_order.rb +326 -0
  51. data/lib/shopify_api/rest/resources/2024_07/fulfillment_request.rb +101 -0
  52. data/lib/shopify_api/rest/resources/2024_07/fulfillment_service.rb +134 -0
  53. data/lib/shopify_api/rest/resources/2024_07/gift_card.rb +222 -0
  54. data/lib/shopify_api/rest/resources/2024_07/gift_card_adjustment.rb +122 -0
  55. data/lib/shopify_api/rest/resources/2024_07/image.rb +161 -0
  56. data/lib/shopify_api/rest/resources/2024_07/inventory_item.rb +112 -0
  57. data/lib/shopify_api/rest/resources/2024_07/inventory_level.rb +183 -0
  58. data/lib/shopify_api/rest/resources/2024_07/location.rb +171 -0
  59. data/lib/shopify_api/rest/resources/2024_07/locations_for_move.rb +60 -0
  60. data/lib/shopify_api/rest/resources/2024_07/marketing_event.rb +213 -0
  61. data/lib/shopify_api/rest/resources/2024_07/metafield.rb +348 -0
  62. data/lib/shopify_api/rest/resources/2024_07/mobile_platform_application.rb +114 -0
  63. data/lib/shopify_api/rest/resources/2024_07/order.rb +489 -0
  64. data/lib/shopify_api/rest/resources/2024_07/order_risk.rb +148 -0
  65. data/lib/shopify_api/rest/resources/2024_07/page.rb +198 -0
  66. data/lib/shopify_api/rest/resources/2024_07/payment.rb +144 -0
  67. data/lib/shopify_api/rest/resources/2024_07/payment_gateway.rb +147 -0
  68. data/lib/shopify_api/rest/resources/2024_07/payment_transaction.rb +114 -0
  69. data/lib/shopify_api/rest/resources/2024_07/payout.rb +101 -0
  70. data/lib/shopify_api/rest/resources/2024_07/policy.rb +73 -0
  71. data/lib/shopify_api/rest/resources/2024_07/price_rule.rb +227 -0
  72. data/lib/shopify_api/rest/resources/2024_07/product.rb +227 -0
  73. data/lib/shopify_api/rest/resources/2024_07/product_listing.rb +200 -0
  74. data/lib/shopify_api/rest/resources/2024_07/product_resource_feedback.rb +92 -0
  75. data/lib/shopify_api/rest/resources/2024_07/province.rb +136 -0
  76. data/lib/shopify_api/rest/resources/2024_07/recurring_application_charge.rb +176 -0
  77. data/lib/shopify_api/rest/resources/2024_07/redirect.rb +143 -0
  78. data/lib/shopify_api/rest/resources/2024_07/refund.rb +155 -0
  79. data/lib/shopify_api/rest/resources/2024_07/resource_feedback.rb +77 -0
  80. data/lib/shopify_api/rest/resources/2024_07/script_tag.rb +159 -0
  81. data/lib/shopify_api/rest/resources/2024_07/shipping_zone.rb +87 -0
  82. data/lib/shopify_api/rest/resources/2024_07/shop.rb +222 -0
  83. data/lib/shopify_api/rest/resources/2024_07/smart_collection.rb +220 -0
  84. data/lib/shopify_api/rest/resources/2024_07/storefront_access_token.rb +91 -0
  85. data/lib/shopify_api/rest/resources/2024_07/tender_transaction.rb +97 -0
  86. data/lib/shopify_api/rest/resources/2024_07/theme.rb +127 -0
  87. data/lib/shopify_api/rest/resources/2024_07/transaction.rb +188 -0
  88. data/lib/shopify_api/rest/resources/2024_07/usage_charge.rb +106 -0
  89. data/lib/shopify_api/rest/resources/2024_07/user.rb +142 -0
  90. data/lib/shopify_api/rest/resources/2024_07/variant.rb +212 -0
  91. data/lib/shopify_api/rest/resources/2024_07/webhook.rb +172 -0
  92. data/lib/shopify_api/version.rb +1 -1
  93. data/lib/shopify_api/webhooks/registry.rb +5 -4
  94. metadata +80 -6
@@ -0,0 +1,222 @@
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 Shop < 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
+ @address1 = T.let(nil, T.nilable(String))
22
+ @address2 = T.let(nil, T.nilable(String))
23
+ @checkout_api_supported = T.let(nil, T.nilable(T::Boolean))
24
+ @city = T.let(nil, T.nilable(String))
25
+ @country = T.let(nil, T.nilable(String))
26
+ @country_code = T.let(nil, T.nilable(String))
27
+ @country_name = T.let(nil, T.nilable(String))
28
+ @county_taxes = T.let(nil, T.nilable(T::Boolean))
29
+ @created_at = T.let(nil, T.nilable(String))
30
+ @currency = T.let(nil, T.nilable(String))
31
+ @customer_email = T.let(nil, T.nilable(String))
32
+ @domain = T.let(nil, T.nilable(String))
33
+ @eligible_for_card_reader_giveaway = T.let(nil, T.nilable(T::Boolean))
34
+ @eligible_for_payments = T.let(nil, T.nilable(T::Boolean))
35
+ @email = T.let(nil, T.nilable(String))
36
+ @enabled_presentment_currencies = T.let(nil, T.nilable(T::Array[T.untyped]))
37
+ @finances = T.let(nil, T.nilable(T::Boolean))
38
+ @force_ssl = T.let(nil, T.nilable(T::Boolean))
39
+ @google_apps_domain = T.let(nil, T.nilable(String))
40
+ @google_apps_login_enabled = T.let(nil, T.nilable(String))
41
+ @has_discounts = T.let(nil, T.nilable(T::Boolean))
42
+ @has_gift_cards = T.let(nil, T.nilable(T::Boolean))
43
+ @has_storefront = T.let(nil, T.nilable(T::Boolean))
44
+ @iana_timezone = T.let(nil, T.nilable(String))
45
+ @id = T.let(nil, T.nilable(Integer))
46
+ @latitude = T.let(nil, T.nilable(Float))
47
+ @longitude = T.let(nil, T.nilable(Float))
48
+ @marketing_sms_consent_enabled_at_checkout = T.let(nil, T.nilable(T::Boolean))
49
+ @money_format = T.let(nil, T.nilable(String))
50
+ @money_in_emails_format = T.let(nil, T.nilable(String))
51
+ @money_with_currency_format = T.let(nil, T.nilable(String))
52
+ @money_with_currency_in_emails_format = T.let(nil, T.nilable(String))
53
+ @multi_location_enabled = T.let(nil, T.nilable(T::Boolean))
54
+ @myshopify_domain = T.let(nil, T.nilable(String))
55
+ @name = T.let(nil, T.nilable(String))
56
+ @password_enabled = T.let(nil, T.nilable(T::Boolean))
57
+ @phone = T.let(nil, T.nilable(String))
58
+ @plan_display_name = T.let(nil, T.nilable(String))
59
+ @plan_name = T.let(nil, T.nilable(String))
60
+ @pre_launch_enabled = T.let(nil, T.nilable(T::Boolean))
61
+ @primary_locale = T.let(nil, T.nilable(String))
62
+ @primary_location_id = T.let(nil, T.nilable(Integer))
63
+ @province = T.let(nil, T.nilable(String))
64
+ @province_code = T.let(nil, T.nilable(String))
65
+ @requires_extra_payments_agreement = T.let(nil, T.nilable(T::Boolean))
66
+ @setup_required = T.let(nil, T.nilable(T::Boolean))
67
+ @shop_owner = T.let(nil, T.nilable(String))
68
+ @source = T.let(nil, T.nilable(String))
69
+ @tax_shipping = T.let(nil, T.nilable(T::Boolean))
70
+ @taxes_included = T.let(nil, T.nilable(T::Boolean))
71
+ @timezone = T.let(nil, T.nilable(String))
72
+ @transactional_sms_disabled = T.let(nil, T.nilable(T::Boolean))
73
+ @updated_at = T.let(nil, T.nilable(String))
74
+ @weight_unit = T.let(nil, T.nilable(String))
75
+ @zip = T.let(nil, T.nilable(String))
76
+
77
+ super(session: session, from_hash: from_hash)
78
+ end
79
+
80
+ @has_one = T.let({}, T::Hash[Symbol, Class])
81
+ @has_many = T.let({}, T::Hash[Symbol, Class])
82
+ @paths = T.let([
83
+ {http_method: :get, operation: :get, ids: [], path: "shop.json"}
84
+ ], T::Array[T::Hash[String, T.any(T::Array[Symbol], String, Symbol)]])
85
+
86
+ sig { returns(T.nilable(String)) }
87
+ attr_reader :address1
88
+ sig { returns(T.nilable(String)) }
89
+ attr_reader :address2
90
+ sig { returns(T.nilable(T::Boolean)) }
91
+ attr_reader :checkout_api_supported
92
+ sig { returns(T.nilable(String)) }
93
+ attr_reader :city
94
+ sig { returns(T.nilable(String)) }
95
+ attr_reader :country
96
+ sig { returns(T.nilable(String)) }
97
+ attr_reader :country_code
98
+ sig { returns(T.nilable(String)) }
99
+ attr_reader :country_name
100
+ sig { returns(T.nilable(T::Boolean)) }
101
+ attr_reader :county_taxes
102
+ sig { returns(T.nilable(String)) }
103
+ attr_reader :created_at
104
+ sig { returns(T.nilable(String)) }
105
+ attr_reader :currency
106
+ sig { returns(T.nilable(String)) }
107
+ attr_reader :customer_email
108
+ sig { returns(T.nilable(String)) }
109
+ attr_reader :domain
110
+ sig { returns(T.nilable(T::Boolean)) }
111
+ attr_reader :eligible_for_card_reader_giveaway
112
+ sig { returns(T.nilable(T::Boolean)) }
113
+ attr_reader :eligible_for_payments
114
+ sig { returns(T.nilable(String)) }
115
+ attr_reader :email
116
+ sig { returns(T.nilable(T::Array[String])) }
117
+ attr_reader :enabled_presentment_currencies
118
+ sig { returns(T.nilable(T::Boolean)) }
119
+ attr_reader :finances
120
+ sig { returns(T.nilable(T::Boolean)) }
121
+ attr_reader :force_ssl
122
+ sig { returns(T.nilable(String)) }
123
+ attr_reader :google_apps_domain
124
+ sig { returns(T.nilable(String)) }
125
+ attr_reader :google_apps_login_enabled
126
+ sig { returns(T.nilable(T::Boolean)) }
127
+ attr_reader :has_discounts
128
+ sig { returns(T.nilable(T::Boolean)) }
129
+ attr_reader :has_gift_cards
130
+ sig { returns(T.nilable(T::Boolean)) }
131
+ attr_reader :has_storefront
132
+ sig { returns(T.nilable(String)) }
133
+ attr_reader :iana_timezone
134
+ sig { returns(T.nilable(Integer)) }
135
+ attr_reader :id
136
+ sig { returns(T.nilable(Float)) }
137
+ attr_reader :latitude
138
+ sig { returns(T.nilable(Float)) }
139
+ attr_reader :longitude
140
+ sig { returns(T.nilable(T::Boolean)) }
141
+ attr_reader :marketing_sms_consent_enabled_at_checkout
142
+ sig { returns(T.nilable(String)) }
143
+ attr_reader :money_format
144
+ sig { returns(T.nilable(String)) }
145
+ attr_reader :money_in_emails_format
146
+ sig { returns(T.nilable(String)) }
147
+ attr_reader :money_with_currency_format
148
+ sig { returns(T.nilable(String)) }
149
+ attr_reader :money_with_currency_in_emails_format
150
+ sig { returns(T.nilable(T::Boolean)) }
151
+ attr_reader :multi_location_enabled
152
+ sig { returns(T.nilable(String)) }
153
+ attr_reader :myshopify_domain
154
+ sig { returns(T.nilable(String)) }
155
+ attr_reader :name
156
+ sig { returns(T.nilable(T::Boolean)) }
157
+ attr_reader :password_enabled
158
+ sig { returns(T.nilable(String)) }
159
+ attr_reader :phone
160
+ sig { returns(T.nilable(String)) }
161
+ attr_reader :plan_display_name
162
+ sig { returns(T.nilable(String)) }
163
+ attr_reader :plan_name
164
+ sig { returns(T.nilable(T::Boolean)) }
165
+ attr_reader :pre_launch_enabled
166
+ sig { returns(T.nilable(String)) }
167
+ attr_reader :primary_locale
168
+ sig { returns(T.nilable(Integer)) }
169
+ attr_reader :primary_location_id
170
+ sig { returns(T.nilable(String)) }
171
+ attr_reader :province
172
+ sig { returns(T.nilable(String)) }
173
+ attr_reader :province_code
174
+ sig { returns(T.nilable(T::Boolean)) }
175
+ attr_reader :requires_extra_payments_agreement
176
+ sig { returns(T.nilable(T::Boolean)) }
177
+ attr_reader :setup_required
178
+ sig { returns(T.nilable(String)) }
179
+ attr_reader :shop_owner
180
+ sig { returns(T.nilable(String)) }
181
+ attr_reader :source
182
+ sig { returns(T.nilable(T::Boolean)) }
183
+ attr_reader :tax_shipping
184
+ sig { returns(T.nilable(T::Boolean)) }
185
+ attr_reader :taxes_included
186
+ sig { returns(T.nilable(String)) }
187
+ attr_reader :timezone
188
+ sig { returns(T.nilable(T::Boolean)) }
189
+ attr_reader :transactional_sms_disabled
190
+ sig { returns(T.nilable(String)) }
191
+ attr_reader :updated_at
192
+ sig { returns(T.nilable(String)) }
193
+ attr_reader :weight_unit
194
+ sig { returns(T.nilable(String)) }
195
+ attr_reader :zip
196
+
197
+ class << self
198
+ sig do
199
+ params(
200
+ fields: T.untyped,
201
+ session: Auth::Session,
202
+ kwargs: T.untyped
203
+ ).returns(T::Array[Shop])
204
+ end
205
+ def all(
206
+ fields: nil,
207
+ session: ShopifyAPI::Context.active_session,
208
+ **kwargs
209
+ )
210
+ response = base_find(
211
+ session: session,
212
+ ids: {},
213
+ params: {fields: fields}.merge(kwargs).compact,
214
+ )
215
+
216
+ T.cast(response, T::Array[Shop])
217
+ end
218
+
219
+ end
220
+
221
+ end
222
+ end
@@ -0,0 +1,220 @@
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 SmartCollection < 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
+ @rules = T.let(nil, T.nilable(T.any(T::Hash[T.untyped, T.untyped], T::Array[T.untyped])))
22
+ @title = T.let(nil, T.nilable(String))
23
+ @body_html = T.let(nil, T.nilable(String))
24
+ @disjunctive = T.let(nil, T.nilable(T::Boolean))
25
+ @handle = T.let(nil, T.nilable(String))
26
+ @id = T.let(nil, T.nilable(Integer))
27
+ @image = T.let(nil, T.nilable(T.any(String, T::Hash[T.untyped, T.untyped])))
28
+ @published_at = T.let(nil, T.nilable(String))
29
+ @published_scope = T.let(nil, T.nilable(String))
30
+ @sort_order = T.let(nil, T.nilable(String))
31
+ @template_suffix = T.let(nil, T.nilable(String))
32
+ @updated_at = T.let(nil, T.nilable(String))
33
+
34
+ super(session: session, from_hash: from_hash)
35
+ end
36
+
37
+ @has_one = T.let({}, T::Hash[Symbol, Class])
38
+ @has_many = T.let({}, T::Hash[Symbol, Class])
39
+ @paths = T.let([
40
+ {http_method: :delete, operation: :delete, ids: [:id], path: "smart_collections/<id>.json"},
41
+ {http_method: :get, operation: :count, ids: [], path: "smart_collections/count.json"},
42
+ {http_method: :get, operation: :get, ids: [], path: "smart_collections.json"},
43
+ {http_method: :get, operation: :get, ids: [:id], path: "smart_collections/<id>.json"},
44
+ {http_method: :post, operation: :post, ids: [], path: "smart_collections.json"},
45
+ {http_method: :put, operation: :order, ids: [:id], path: "smart_collections/<id>/order.json"},
46
+ {http_method: :put, operation: :put, ids: [:id], path: "smart_collections/<id>.json"}
47
+ ], T::Array[T::Hash[String, T.any(T::Array[Symbol], String, Symbol)]])
48
+
49
+ sig { returns(T.nilable(T.any(T::Hash[T.untyped, T.untyped], T::Array[T::Hash[T.untyped, T.untyped]]))) }
50
+ attr_reader :rules
51
+ sig { returns(T.nilable(String)) }
52
+ attr_reader :title
53
+ sig { returns(T.nilable(String)) }
54
+ attr_reader :body_html
55
+ sig { returns(T.nilable(T::Boolean)) }
56
+ attr_reader :disjunctive
57
+ sig { returns(T.nilable(String)) }
58
+ attr_reader :handle
59
+ sig { returns(T.nilable(Integer)) }
60
+ attr_reader :id
61
+ sig { returns(T.nilable(T.any(String, T::Hash[T.untyped, T.untyped]))) }
62
+ attr_reader :image
63
+ sig { returns(T.nilable(String)) }
64
+ attr_reader :published_at
65
+ sig { returns(T.nilable(String)) }
66
+ attr_reader :published_scope
67
+ sig { returns(T.nilable(String)) }
68
+ attr_reader :sort_order
69
+ sig { returns(T.nilable(String)) }
70
+ attr_reader :template_suffix
71
+ sig { returns(T.nilable(String)) }
72
+ attr_reader :updated_at
73
+
74
+ class << self
75
+ sig do
76
+ params(
77
+ id: T.any(Integer, String),
78
+ fields: T.untyped,
79
+ session: Auth::Session
80
+ ).returns(T.nilable(SmartCollection))
81
+ end
82
+ def find(
83
+ id:,
84
+ fields: nil,
85
+ session: ShopifyAPI::Context.active_session
86
+ )
87
+ result = base_find(
88
+ session: session,
89
+ ids: {id: id},
90
+ params: {fields: fields},
91
+ )
92
+ T.cast(result[0], T.nilable(SmartCollection))
93
+ end
94
+
95
+ sig do
96
+ params(
97
+ id: T.any(Integer, String),
98
+ session: Auth::Session
99
+ ).returns(T.untyped)
100
+ end
101
+ def delete(
102
+ id:,
103
+ session: ShopifyAPI::Context.active_session
104
+ )
105
+ request(
106
+ http_method: :delete,
107
+ operation: :delete,
108
+ session: session,
109
+ ids: {id: id},
110
+ params: {},
111
+ )
112
+ end
113
+
114
+ sig do
115
+ params(
116
+ limit: T.untyped,
117
+ ids: T.untyped,
118
+ since_id: T.untyped,
119
+ title: T.untyped,
120
+ product_id: T.untyped,
121
+ handle: T.untyped,
122
+ updated_at_min: T.untyped,
123
+ updated_at_max: T.untyped,
124
+ published_at_min: T.untyped,
125
+ published_at_max: T.untyped,
126
+ published_status: T.untyped,
127
+ fields: T.untyped,
128
+ session: Auth::Session,
129
+ kwargs: T.untyped
130
+ ).returns(T::Array[SmartCollection])
131
+ end
132
+ def all(
133
+ limit: nil,
134
+ ids: nil,
135
+ since_id: nil,
136
+ title: nil,
137
+ product_id: nil,
138
+ handle: nil,
139
+ updated_at_min: nil,
140
+ updated_at_max: nil,
141
+ published_at_min: nil,
142
+ published_at_max: nil,
143
+ published_status: nil,
144
+ fields: nil,
145
+ session: ShopifyAPI::Context.active_session,
146
+ **kwargs
147
+ )
148
+ response = base_find(
149
+ session: session,
150
+ ids: {},
151
+ params: {limit: limit, ids: ids, since_id: since_id, title: title, product_id: product_id, handle: handle, updated_at_min: updated_at_min, updated_at_max: updated_at_max, published_at_min: published_at_min, published_at_max: published_at_max, published_status: published_status, fields: fields}.merge(kwargs).compact,
152
+ )
153
+
154
+ T.cast(response, T::Array[SmartCollection])
155
+ end
156
+
157
+ sig do
158
+ params(
159
+ title: T.untyped,
160
+ product_id: T.untyped,
161
+ updated_at_min: T.untyped,
162
+ updated_at_max: T.untyped,
163
+ published_at_min: T.untyped,
164
+ published_at_max: T.untyped,
165
+ published_status: T.untyped,
166
+ session: Auth::Session,
167
+ kwargs: T.untyped
168
+ ).returns(T.untyped)
169
+ end
170
+ def count(
171
+ title: nil,
172
+ product_id: nil,
173
+ updated_at_min: nil,
174
+ updated_at_max: nil,
175
+ published_at_min: nil,
176
+ published_at_max: nil,
177
+ published_status: nil,
178
+ session: ShopifyAPI::Context.active_session,
179
+ **kwargs
180
+ )
181
+ request(
182
+ http_method: :get,
183
+ operation: :count,
184
+ session: session,
185
+ ids: {},
186
+ params: {title: title, product_id: product_id, updated_at_min: updated_at_min, updated_at_max: updated_at_max, published_at_min: published_at_min, published_at_max: published_at_max, published_status: published_status}.merge(kwargs).compact,
187
+ body: {},
188
+ entity: nil,
189
+ )
190
+ end
191
+
192
+ end
193
+
194
+ sig do
195
+ params(
196
+ products: T.untyped,
197
+ sort_order: T.untyped,
198
+ body: T.untyped,
199
+ kwargs: T.untyped
200
+ ).returns(T.untyped)
201
+ end
202
+ def order(
203
+ products: nil,
204
+ sort_order: nil,
205
+ body: nil,
206
+ **kwargs
207
+ )
208
+ self.class.request(
209
+ http_method: :put,
210
+ operation: :order,
211
+ session: @session,
212
+ ids: {id: @id},
213
+ params: {products: products, sort_order: sort_order}.merge(kwargs).compact,
214
+ body: body,
215
+ entity: self,
216
+ )
217
+ end
218
+
219
+ end
220
+ end
@@ -0,0 +1,91 @@
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 StorefrontAccessToken < 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
+ @title = T.let(nil, T.nilable(String))
22
+ @access_scope = T.let(nil, T.nilable(String))
23
+ @access_token = T.let(nil, T.nilable(String))
24
+ @created_at = T.let(nil, T.nilable(String))
25
+ @id = T.let(nil, T.nilable(Integer))
26
+
27
+ super(session: session, from_hash: from_hash)
28
+ end
29
+
30
+ @has_one = T.let({}, T::Hash[Symbol, Class])
31
+ @has_many = T.let({}, T::Hash[Symbol, Class])
32
+ @paths = T.let([
33
+ {http_method: :delete, operation: :delete, ids: [:id], path: "storefront_access_tokens/<id>.json"},
34
+ {http_method: :get, operation: :get, ids: [], path: "storefront_access_tokens.json"},
35
+ {http_method: :post, operation: :post, ids: [], path: "storefront_access_tokens.json"}
36
+ ], T::Array[T::Hash[String, T.any(T::Array[Symbol], String, Symbol)]])
37
+
38
+ sig { returns(T.nilable(String)) }
39
+ attr_reader :title
40
+ sig { returns(T.nilable(String)) }
41
+ attr_reader :access_scope
42
+ sig { returns(T.nilable(String)) }
43
+ attr_reader :access_token
44
+ sig { returns(T.nilable(String)) }
45
+ attr_reader :created_at
46
+ sig { returns(T.nilable(Integer)) }
47
+ attr_reader :id
48
+
49
+ class << self
50
+ sig do
51
+ params(
52
+ id: T.any(Integer, String),
53
+ session: Auth::Session
54
+ ).returns(T.untyped)
55
+ end
56
+ def delete(
57
+ id:,
58
+ session: ShopifyAPI::Context.active_session
59
+ )
60
+ request(
61
+ http_method: :delete,
62
+ operation: :delete,
63
+ session: session,
64
+ ids: {id: id},
65
+ params: {},
66
+ )
67
+ end
68
+
69
+ sig do
70
+ params(
71
+ session: Auth::Session,
72
+ kwargs: T.untyped
73
+ ).returns(T::Array[StorefrontAccessToken])
74
+ end
75
+ def all(
76
+ session: ShopifyAPI::Context.active_session,
77
+ **kwargs
78
+ )
79
+ response = base_find(
80
+ session: session,
81
+ ids: {},
82
+ params: {}.merge(kwargs).compact,
83
+ )
84
+
85
+ T.cast(response, T::Array[StorefrontAccessToken])
86
+ end
87
+
88
+ end
89
+
90
+ end
91
+ end
@@ -0,0 +1,97 @@
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 TenderTransaction < 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
+ @amount = T.let(nil, T.nilable(String))
22
+ @currency = T.let(nil, T.nilable(String))
23
+ @id = T.let(nil, T.nilable(Integer))
24
+ @order_id = T.let(nil, T.nilable(Integer))
25
+ @payment_details = T.let(nil, T.nilable(T::Hash[T.untyped, T.untyped]))
26
+ @payment_method = T.let(nil, T.nilable(String))
27
+ @processed_at = T.let(nil, T.nilable(String))
28
+ @remote_reference = T.let(nil, T.nilable(String))
29
+ @test = T.let(nil, T.nilable(T::Boolean))
30
+ @user_id = T.let(nil, T.nilable(Integer))
31
+
32
+ super(session: session, from_hash: from_hash)
33
+ end
34
+
35
+ @has_one = T.let({}, T::Hash[Symbol, Class])
36
+ @has_many = T.let({}, T::Hash[Symbol, Class])
37
+ @paths = T.let([
38
+ {http_method: :get, operation: :get, ids: [], path: "tender_transactions.json"}
39
+ ], T::Array[T::Hash[String, T.any(T::Array[Symbol], String, Symbol)]])
40
+
41
+ sig { returns(T.nilable(String)) }
42
+ attr_reader :amount
43
+ sig { returns(T.nilable(String)) }
44
+ attr_reader :currency
45
+ sig { returns(T.nilable(Integer)) }
46
+ attr_reader :id
47
+ sig { returns(T.nilable(Integer)) }
48
+ attr_reader :order_id
49
+ sig { returns(T.nilable(T::Hash[T.untyped, T.untyped])) }
50
+ attr_reader :payment_details
51
+ sig { returns(T.nilable(String)) }
52
+ attr_reader :payment_method
53
+ sig { returns(T.nilable(String)) }
54
+ attr_reader :processed_at
55
+ sig { returns(T.nilable(String)) }
56
+ attr_reader :remote_reference
57
+ sig { returns(T.nilable(T::Boolean)) }
58
+ attr_reader :test
59
+ sig { returns(T.nilable(Integer)) }
60
+ attr_reader :user_id
61
+
62
+ class << self
63
+ sig do
64
+ params(
65
+ limit: T.untyped,
66
+ since_id: T.untyped,
67
+ processed_at_min: T.untyped,
68
+ processed_at_max: T.untyped,
69
+ processed_at: T.untyped,
70
+ order: T.untyped,
71
+ session: Auth::Session,
72
+ kwargs: T.untyped
73
+ ).returns(T::Array[TenderTransaction])
74
+ end
75
+ def all(
76
+ limit: nil,
77
+ since_id: nil,
78
+ processed_at_min: nil,
79
+ processed_at_max: nil,
80
+ processed_at: nil,
81
+ order: nil,
82
+ session: ShopifyAPI::Context.active_session,
83
+ **kwargs
84
+ )
85
+ response = base_find(
86
+ session: session,
87
+ ids: {},
88
+ params: {limit: limit, since_id: since_id, processed_at_min: processed_at_min, processed_at_max: processed_at_max, processed_at: processed_at, order: order}.merge(kwargs).compact,
89
+ )
90
+
91
+ T.cast(response, T::Array[TenderTransaction])
92
+ end
93
+
94
+ end
95
+
96
+ end
97
+ end