shopify_api 13.1.0 → 13.2.0

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