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,121 @@
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 Report < 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
+ @category = T.let(nil, T.nilable(String))
20
+ @id = T.let(nil, T.nilable(Integer))
21
+ @name = T.let(nil, T.nilable(String))
22
+ @shopify_ql = T.let(nil, T.nilable(String))
23
+ @updated_at = T.let(nil, T.nilable(String))
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: "reports/<id>.json"},
30
+ {http_method: :get, operation: :get, ids: [], path: "reports.json"},
31
+ {http_method: :get, operation: :get, ids: [:id], path: "reports/<id>.json"},
32
+ {http_method: :post, operation: :post, ids: [], path: "reports.json"},
33
+ {http_method: :put, operation: :put, ids: [:id], path: "reports/<id>.json"}
34
+ ], T::Array[T::Hash[String, T.any(T::Array[Symbol], String, Symbol)]])
35
+
36
+ sig { returns(T.nilable(String)) }
37
+ attr_reader :category
38
+ sig { returns(T.nilable(Integer)) }
39
+ attr_reader :id
40
+ sig { returns(T.nilable(String)) }
41
+ attr_reader :name
42
+ sig { returns(T.nilable(String)) }
43
+ attr_reader :shopify_ql
44
+ sig { returns(T.nilable(String)) }
45
+ attr_reader :updated_at
46
+
47
+ class << self
48
+ sig do
49
+ params(
50
+ id: T.any(Integer, String),
51
+ fields: T.untyped,
52
+ session: Auth::Session
53
+ ).returns(T.nilable(Report))
54
+ end
55
+ def find(
56
+ id:,
57
+ fields: nil,
58
+ session: ShopifyAPI::Context.active_session
59
+ )
60
+ result = base_find(
61
+ session: session,
62
+ ids: {id: id},
63
+ params: {fields: fields},
64
+ )
65
+ T.cast(result[0], T.nilable(Report))
66
+ end
67
+
68
+ sig do
69
+ params(
70
+ id: T.any(Integer, String),
71
+ session: Auth::Session
72
+ ).returns(T.untyped)
73
+ end
74
+ def delete(
75
+ id:,
76
+ session: ShopifyAPI::Context.active_session
77
+ )
78
+ request(
79
+ http_method: :delete,
80
+ operation: :delete,
81
+ session: session,
82
+ ids: {id: id},
83
+ params: {},
84
+ )
85
+ end
86
+
87
+ sig do
88
+ params(
89
+ ids: T.untyped,
90
+ limit: T.untyped,
91
+ since_id: T.untyped,
92
+ updated_at_min: T.untyped,
93
+ updated_at_max: T.untyped,
94
+ fields: T.untyped,
95
+ session: Auth::Session,
96
+ kwargs: T.untyped
97
+ ).returns(T::Array[Report])
98
+ end
99
+ def all(
100
+ ids: nil,
101
+ limit: nil,
102
+ since_id: nil,
103
+ updated_at_min: nil,
104
+ updated_at_max: nil,
105
+ fields: nil,
106
+ session: ShopifyAPI::Context.active_session,
107
+ **kwargs
108
+ )
109
+ response = base_find(
110
+ session: session,
111
+ ids: {},
112
+ params: {ids: ids, limit: limit, since_id: since_id, updated_at_min: updated_at_min, updated_at_max: updated_at_max, fields: fields}.merge(kwargs).compact,
113
+ )
114
+
115
+ T.cast(response, T::Array[Report])
116
+ end
117
+
118
+ end
119
+
120
+ end
121
+ end
@@ -20,7 +20,6 @@ module ShopifyAPI
20
20
  @address2 = T.let(nil, T.nilable(String))
21
21
  @checkout_api_supported = T.let(nil, T.nilable(T::Boolean))
22
22
  @city = T.let(nil, T.nilable(String))
23
- @cookie_consent_level = T.let(nil, T.nilable(String))
24
23
  @country = T.let(nil, T.nilable(String))
25
24
  @country_code = T.let(nil, T.nilable(String))
26
25
  @country_name = T.let(nil, T.nilable(String))
@@ -89,8 +88,6 @@ module ShopifyAPI
89
88
  sig { returns(T.nilable(String)) }
90
89
  attr_reader :city
91
90
  sig { returns(T.nilable(String)) }
92
- attr_reader :cookie_consent_level
93
- sig { returns(T.nilable(String)) }
94
91
  attr_reader :country
95
92
  sig { returns(T.nilable(String)) }
96
93
  attr_reader :country_code
@@ -27,7 +27,6 @@ module ShopifyAPI
27
27
  @inventory_management = T.let(nil, T.nilable(String))
28
28
  @inventory_policy = T.let(nil, T.nilable(String))
29
29
  @inventory_quantity = T.let(nil, T.nilable(Integer))
30
- @inventory_quantity_adjustment = T.let(nil, T.nilable(Integer))
31
30
  @old_inventory_quantity = T.let(nil, T.nilable(Integer))
32
31
  @option = T.let(nil, T.nilable(T::Hash[T.untyped, T.untyped]))
33
32
  @position = T.let(nil, T.nilable(Integer))
@@ -55,8 +54,7 @@ module ShopifyAPI
55
54
  {http_method: :put, operation: :put, ids: [:id], path: "variants/<id>.json"}
56
55
  ], T::Array[T::Hash[String, T.any(T::Array[Symbol], String, Symbol)]])
57
56
  @read_only_attributes = T.let([
58
- :inventory_quantity,
59
- :inventory_quantity_adjustment
57
+ :inventory_quantity
60
58
  ], T::Array[Symbol])
61
59
 
62
60
  sig { returns(T.nilable(String)) }
@@ -82,8 +80,6 @@ module ShopifyAPI
82
80
  sig { returns(T.nilable(Integer)) }
83
81
  attr_reader :inventory_quantity
84
82
  sig { returns(T.nilable(Integer)) }
85
- attr_reader :inventory_quantity_adjustment
86
- sig { returns(T.nilable(Integer)) }
87
83
  attr_reader :old_inventory_quantity
88
84
  sig { returns(T.nilable(T::Hash[T.untyped, T.untyped])) }
89
85
  attr_reader :option
@@ -0,0 +1,190 @@
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 AbandonedCheckout < 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
+ @abandoned_checkout_url = T.let(nil, T.nilable(String))
20
+ @billing_address = T.let(nil, T.nilable(T::Hash[T.untyped, T.untyped]))
21
+ @buyer_accepts_marketing = T.let(nil, T.nilable(T::Boolean))
22
+ @buyer_accepts_sms_marketing = T.let(nil, T.nilable(T::Boolean))
23
+ @cart_token = T.let(nil, T.nilable(String))
24
+ @closed_at = T.let(nil, T.nilable(String))
25
+ @completed_at = T.let(nil, T.nilable(String))
26
+ @created_at = T.let(nil, T.nilable(String))
27
+ @currency = T.let(nil, T.nilable(Currency))
28
+ @customer = T.let(nil, T.nilable(Customer))
29
+ @customer_locale = T.let(nil, T.nilable(String))
30
+ @device_id = T.let(nil, T.nilable(Integer))
31
+ @discount_codes = T.let(nil, T.nilable(T::Array[T.untyped]))
32
+ @email = T.let(nil, T.nilable(String))
33
+ @gateway = T.let(nil, T.nilable(String))
34
+ @id = T.let(nil, T.nilable(Integer))
35
+ @landing_site = T.let(nil, T.nilable(String))
36
+ @line_items = T.let(nil, T.nilable(T::Hash[T.untyped, T.untyped]))
37
+ @location_id = T.let(nil, T.nilable(Integer))
38
+ @note = T.let(nil, T.nilable(String))
39
+ @phone = T.let(nil, T.nilable(String))
40
+ @presentment_currency = T.let(nil, T.nilable(String))
41
+ @referring_site = T.let(nil, T.nilable(String))
42
+ @shipping_address = T.let(nil, T.nilable(T::Hash[T.untyped, T.untyped]))
43
+ @shipping_lines = T.let(nil, T.nilable(T::Hash[T.untyped, T.untyped]))
44
+ @sms_marketing_phone = T.let(nil, T.nilable(String))
45
+ @source_name = T.let(nil, T.nilable(String))
46
+ @subtotal_price = T.let(nil, T.nilable(String))
47
+ @tax_lines = T.let(nil, T.nilable(T::Hash[T.untyped, T.untyped]))
48
+ @taxes_included = T.let(nil, T.nilable(T::Boolean))
49
+ @token = T.let(nil, T.nilable(String))
50
+ @total_discounts = T.let(nil, T.nilable(String))
51
+ @total_duties = T.let(nil, T.nilable(String))
52
+ @total_line_items_price = T.let(nil, T.nilable(String))
53
+ @total_price = T.let(nil, T.nilable(String))
54
+ @total_tax = T.let(nil, T.nilable(String))
55
+ @total_weight = T.let(nil, T.nilable(Integer))
56
+ @updated_at = T.let(nil, T.nilable(String))
57
+ @user_id = T.let(nil, T.nilable(Integer))
58
+ end
59
+
60
+ @has_one = T.let({
61
+ currency: Currency,
62
+ customer: Customer
63
+ }, T::Hash[Symbol, Class])
64
+ @has_many = T.let({
65
+ discount_codes: DiscountCode
66
+ }, T::Hash[Symbol, Class])
67
+ @paths = T.let([
68
+ {http_method: :get, operation: :checkouts, ids: [], path: "checkouts.json"},
69
+ {http_method: :get, operation: :checkouts, ids: [], path: "checkouts.json"}
70
+ ], T::Array[T::Hash[String, T.any(T::Array[Symbol], String, Symbol)]])
71
+
72
+ sig { returns(T.nilable(String)) }
73
+ attr_reader :abandoned_checkout_url
74
+ sig { returns(T.nilable(T::Hash[T.untyped, T.untyped])) }
75
+ attr_reader :billing_address
76
+ sig { returns(T.nilable(T::Boolean)) }
77
+ attr_reader :buyer_accepts_marketing
78
+ sig { returns(T.nilable(T::Boolean)) }
79
+ attr_reader :buyer_accepts_sms_marketing
80
+ sig { returns(T.nilable(String)) }
81
+ attr_reader :cart_token
82
+ sig { returns(T.nilable(String)) }
83
+ attr_reader :closed_at
84
+ sig { returns(T.nilable(String)) }
85
+ attr_reader :completed_at
86
+ sig { returns(T.nilable(String)) }
87
+ attr_reader :created_at
88
+ sig { returns(T.nilable(Currency)) }
89
+ attr_reader :currency
90
+ sig { returns(T.nilable(Customer)) }
91
+ attr_reader :customer
92
+ sig { returns(T.nilable(String)) }
93
+ attr_reader :customer_locale
94
+ sig { returns(T.nilable(Integer)) }
95
+ attr_reader :device_id
96
+ sig { returns(T.nilable(T::Array[DiscountCode])) }
97
+ attr_reader :discount_codes
98
+ sig { returns(T.nilable(String)) }
99
+ attr_reader :email
100
+ sig { returns(T.nilable(String)) }
101
+ attr_reader :gateway
102
+ sig { returns(T.nilable(Integer)) }
103
+ attr_reader :id
104
+ sig { returns(T.nilable(String)) }
105
+ attr_reader :landing_site
106
+ sig { returns(T.nilable(T::Hash[T.untyped, T.untyped])) }
107
+ attr_reader :line_items
108
+ sig { returns(T.nilable(Integer)) }
109
+ attr_reader :location_id
110
+ sig { returns(T.nilable(String)) }
111
+ attr_reader :note
112
+ sig { returns(T.nilable(String)) }
113
+ attr_reader :phone
114
+ sig { returns(T.nilable(String)) }
115
+ attr_reader :presentment_currency
116
+ sig { returns(T.nilable(String)) }
117
+ attr_reader :referring_site
118
+ sig { returns(T.nilable(T::Hash[T.untyped, T.untyped])) }
119
+ attr_reader :shipping_address
120
+ sig { returns(T.nilable(T::Hash[T.untyped, T.untyped])) }
121
+ attr_reader :shipping_lines
122
+ sig { returns(T.nilable(String)) }
123
+ attr_reader :sms_marketing_phone
124
+ sig { returns(T.nilable(String)) }
125
+ attr_reader :source_name
126
+ sig { returns(T.nilable(String)) }
127
+ attr_reader :subtotal_price
128
+ sig { returns(T.nilable(T::Hash[T.untyped, T.untyped])) }
129
+ attr_reader :tax_lines
130
+ sig { returns(T.nilable(T::Boolean)) }
131
+ attr_reader :taxes_included
132
+ sig { returns(T.nilable(String)) }
133
+ attr_reader :token
134
+ sig { returns(T.nilable(String)) }
135
+ attr_reader :total_discounts
136
+ sig { returns(T.nilable(String)) }
137
+ attr_reader :total_duties
138
+ sig { returns(T.nilable(String)) }
139
+ attr_reader :total_line_items_price
140
+ sig { returns(T.nilable(String)) }
141
+ attr_reader :total_price
142
+ sig { returns(T.nilable(String)) }
143
+ attr_reader :total_tax
144
+ sig { returns(T.nilable(Integer)) }
145
+ attr_reader :total_weight
146
+ sig { returns(T.nilable(String)) }
147
+ attr_reader :updated_at
148
+ sig { returns(T.nilable(Integer)) }
149
+ attr_reader :user_id
150
+
151
+ class << self
152
+ sig do
153
+ params(
154
+ since_id: T.untyped,
155
+ created_at_min: T.untyped,
156
+ created_at_max: T.untyped,
157
+ updated_at_min: T.untyped,
158
+ updated_at_max: T.untyped,
159
+ status: T.untyped,
160
+ limit: T.untyped,
161
+ session: Auth::Session,
162
+ kwargs: T.untyped
163
+ ).returns(T.untyped)
164
+ end
165
+ def checkouts(
166
+ since_id: nil,
167
+ created_at_min: nil,
168
+ created_at_max: nil,
169
+ updated_at_min: nil,
170
+ updated_at_max: nil,
171
+ status: nil,
172
+ limit: nil,
173
+ session: ShopifyAPI::Context.active_session,
174
+ **kwargs
175
+ )
176
+ request(
177
+ http_method: :get,
178
+ operation: :checkouts,
179
+ session: session,
180
+ ids: {},
181
+ params: {since_id: since_id, created_at_min: created_at_min, created_at_max: created_at_max, updated_at_min: updated_at_min, updated_at_max: updated_at_max, status: status, limit: limit}.merge(kwargs).compact,
182
+ body: {},
183
+ entity: nil,
184
+ )
185
+ end
186
+
187
+ end
188
+
189
+ end
190
+ end
@@ -0,0 +1,58 @@
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 AccessScope < 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
+ @handle = T.let(nil, T.nilable(String))
20
+ @access_scopes = T.let(nil, T.nilable(T::Array[T.untyped]))
21
+ end
22
+
23
+ @has_one = T.let({}, T::Hash[Symbol, Class])
24
+ @has_many = T.let({}, T::Hash[Symbol, Class])
25
+ @custom_prefix = T.let("/admin/oauth", T.nilable(String))
26
+ @paths = T.let([
27
+ {http_method: :get, operation: :get, ids: [], path: "access_scopes.json"}
28
+ ], T::Array[T::Hash[String, T.any(T::Array[Symbol], String, Symbol)]])
29
+
30
+ sig { returns(T.nilable(String)) }
31
+ attr_reader :handle
32
+ sig { returns(T.nilable(T::Array[T::Hash[T.untyped, T.untyped]])) }
33
+ attr_reader :access_scopes
34
+
35
+ class << self
36
+ sig do
37
+ params(
38
+ session: Auth::Session,
39
+ kwargs: T.untyped
40
+ ).returns(T::Array[AccessScope])
41
+ end
42
+ def all(
43
+ session: ShopifyAPI::Context.active_session,
44
+ **kwargs
45
+ )
46
+ response = base_find(
47
+ session: session,
48
+ ids: {},
49
+ params: {}.merge(kwargs).compact,
50
+ )
51
+
52
+ T.cast(response, T::Array[AccessScope])
53
+ end
54
+
55
+ end
56
+
57
+ end
58
+ end
@@ -0,0 +1,105 @@
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 ApplePayCertificate < 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
+ @id = T.let(nil, T.nilable(Integer))
20
+ @merchant_id = T.let(nil, T.nilable(String))
21
+ @status = T.let(nil, T.nilable(String))
22
+ end
23
+
24
+ @has_one = T.let({}, T::Hash[Symbol, Class])
25
+ @has_many = T.let({}, T::Hash[Symbol, Class])
26
+ @paths = T.let([
27
+ {http_method: :delete, operation: :delete, ids: [:id], path: "apple_pay_certificates/<id>.json"},
28
+ {http_method: :get, operation: :csr, ids: [:id], path: "apple_pay_certificates/<id>/csr.json"},
29
+ {http_method: :get, operation: :get, ids: [:id], path: "apple_pay_certificates/<id>.json"},
30
+ {http_method: :post, operation: :post, ids: [], path: "apple_pay_certificates.json"},
31
+ {http_method: :put, operation: :put, ids: [:id], path: "apple_pay_certificates/<id>.json"}
32
+ ], T::Array[T::Hash[String, T.any(T::Array[Symbol], String, Symbol)]])
33
+
34
+ sig { returns(T.nilable(Integer)) }
35
+ attr_reader :id
36
+ sig { returns(T.nilable(String)) }
37
+ attr_reader :merchant_id
38
+ sig { returns(T.nilable(String)) }
39
+ attr_reader :status
40
+
41
+ class << self
42
+ sig do
43
+ params(
44
+ id: T.any(Integer, String),
45
+ session: Auth::Session
46
+ ).returns(T.nilable(ApplePayCertificate))
47
+ end
48
+ def find(
49
+ id:,
50
+ session: ShopifyAPI::Context.active_session
51
+ )
52
+ result = base_find(
53
+ session: session,
54
+ ids: {id: id},
55
+ params: {},
56
+ )
57
+ T.cast(result[0], T.nilable(ApplePayCertificate))
58
+ end
59
+
60
+ sig do
61
+ params(
62
+ id: T.any(Integer, String),
63
+ session: Auth::Session
64
+ ).returns(T.untyped)
65
+ end
66
+ def delete(
67
+ id:,
68
+ session: ShopifyAPI::Context.active_session
69
+ )
70
+ request(
71
+ http_method: :delete,
72
+ operation: :delete,
73
+ session: session,
74
+ ids: {id: id},
75
+ params: {},
76
+ )
77
+ end
78
+
79
+ sig do
80
+ params(
81
+ id: T.any(Integer, String),
82
+ session: Auth::Session,
83
+ kwargs: T.untyped
84
+ ).returns(T.untyped)
85
+ end
86
+ def csr(
87
+ id:,
88
+ session: ShopifyAPI::Context.active_session,
89
+ **kwargs
90
+ )
91
+ request(
92
+ http_method: :get,
93
+ operation: :csr,
94
+ session: session,
95
+ ids: {id: id},
96
+ params: {}.merge(kwargs).compact,
97
+ body: {},
98
+ entity: nil,
99
+ )
100
+ end
101
+
102
+ end
103
+
104
+ end
105
+ end
@@ -0,0 +1,109 @@
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 ApplicationCharge < 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
+ @confirmation_url = T.let(nil, T.nilable(String))
20
+ @created_at = T.let(nil, T.nilable(String))
21
+ @currency = T.let(nil, T.nilable(Currency))
22
+ @id = T.let(nil, T.nilable(Integer))
23
+ @name = T.let(nil, T.nilable(String))
24
+ @price = T.let(nil, T.nilable(T.any(String, Float)))
25
+ @return_url = T.let(nil, T.nilable(String))
26
+ @status = T.let(nil, T.nilable(String))
27
+ @test = T.let(nil, T.nilable(T::Boolean))
28
+ @updated_at = T.let(nil, T.nilable(String))
29
+ end
30
+
31
+ @has_one = T.let({
32
+ currency: Currency
33
+ }, T::Hash[Symbol, Class])
34
+ @has_many = T.let({}, T::Hash[Symbol, Class])
35
+ @paths = T.let([
36
+ {http_method: :get, operation: :get, ids: [], path: "application_charges.json"},
37
+ {http_method: :get, operation: :get, ids: [:id], path: "application_charges/<id>.json"},
38
+ {http_method: :post, operation: :post, ids: [], path: "application_charges.json"}
39
+ ], T::Array[T::Hash[String, T.any(T::Array[Symbol], String, Symbol)]])
40
+
41
+ sig { returns(T.nilable(String)) }
42
+ attr_reader :confirmation_url
43
+ sig { returns(T.nilable(String)) }
44
+ attr_reader :created_at
45
+ sig { returns(T.nilable(Currency)) }
46
+ attr_reader :currency
47
+ sig { returns(T.nilable(Integer)) }
48
+ attr_reader :id
49
+ sig { returns(T.nilable(String)) }
50
+ attr_reader :name
51
+ sig { returns(T.nilable(T.any(String, Float))) }
52
+ attr_reader :price
53
+ sig { returns(T.nilable(String)) }
54
+ attr_reader :return_url
55
+ sig { returns(T.nilable(String)) }
56
+ attr_reader :status
57
+ sig { returns(T.nilable(T::Boolean)) }
58
+ attr_reader :test
59
+ sig { returns(T.nilable(String)) }
60
+ attr_reader :updated_at
61
+
62
+ class << self
63
+ sig do
64
+ params(
65
+ id: T.any(Integer, String),
66
+ fields: T.untyped,
67
+ session: Auth::Session
68
+ ).returns(T.nilable(ApplicationCharge))
69
+ end
70
+ def find(
71
+ id:,
72
+ fields: nil,
73
+ session: ShopifyAPI::Context.active_session
74
+ )
75
+ result = base_find(
76
+ session: session,
77
+ ids: {id: id},
78
+ params: {fields: fields},
79
+ )
80
+ T.cast(result[0], T.nilable(ApplicationCharge))
81
+ end
82
+
83
+ sig do
84
+ params(
85
+ since_id: T.untyped,
86
+ fields: T.untyped,
87
+ session: Auth::Session,
88
+ kwargs: T.untyped
89
+ ).returns(T::Array[ApplicationCharge])
90
+ end
91
+ def all(
92
+ since_id: nil,
93
+ fields: nil,
94
+ session: ShopifyAPI::Context.active_session,
95
+ **kwargs
96
+ )
97
+ response = base_find(
98
+ session: session,
99
+ ids: {},
100
+ params: {since_id: since_id, fields: fields}.merge(kwargs).compact,
101
+ )
102
+
103
+ T.cast(response, T::Array[ApplicationCharge])
104
+ end
105
+
106
+ end
107
+
108
+ end
109
+ end