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