Class: ShopifyAPI::OrderRisk
- Inherits:
-
Rest::Base
- Object
- Rest::Base
- ShopifyAPI::OrderRisk
- Extended by:
- T::Sig
- Defined in:
- lib/shopify_api/rest/resources/2022_04/order_risk.rb,
lib/shopify_api/rest/resources/2022_07/order_risk.rb,
lib/shopify_api/rest/resources/2022_10/order_risk.rb,
lib/shopify_api/rest/resources/2023_01/order_risk.rb,
lib/shopify_api/rest/resources/2023_04/order_risk.rb,
lib/shopify_api/rest/resources/2023_07/order_risk.rb,
lib/shopify_api/rest/resources/2023_10/order_risk.rb,
lib/shopify_api/rest/resources/2024_01/order_risk.rb,
lib/shopify_api/rest/resources/2024_04/order_risk.rb,
lib/shopify_api/rest/resources/2024_07/order_risk.rb,
lib/shopify_api/rest/resources/2024_10/order_risk.rb
Instance Attribute Summary collapse
-
#cause_cancel ⇒ Object
readonly
Returns the value of attribute cause_cancel.
-
#checkout_id ⇒ Object
readonly
Returns the value of attribute checkout_id.
-
#display ⇒ Object
readonly
Returns the value of attribute display.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#merchant_message ⇒ Object
readonly
Returns the value of attribute merchant_message.
-
#message ⇒ Object
readonly
Returns the value of attribute message.
-
#order_id ⇒ Object
readonly
Returns the value of attribute order_id.
-
#recommendation ⇒ Object
readonly
Returns the value of attribute recommendation.
-
#score ⇒ Object
readonly
Returns the value of attribute score.
-
#source ⇒ Object
readonly
Returns the value of attribute source.
Attributes inherited from Rest::Base
Class Method Summary collapse
- .all(order_id: nil, session: ShopifyAPI::Context.active_session, **kwargs) ⇒ Object
- .delete(id:, order_id: nil, session: ShopifyAPI::Context.active_session) ⇒ Object
- .find(id:, order_id: nil, session: ShopifyAPI::Context.active_session) ⇒ Object
- .json_body_name ⇒ Object
- .json_response_body_names ⇒ Object
Instance Method Summary collapse
-
#initialize(session: ShopifyAPI::Context.active_session, from_hash: nil) ⇒ OrderRisk
constructor
A new instance of OrderRisk.
Methods inherited from Rest::Base
api_call_limit, base_find, class_name, create_instance, create_instances_from_response, #delete, get_path, get_path_ids, has_many?, has_one?, inherited, #method_missing, next_page?, next_page_info, prev_page?, prev_page_info, primary_key, read_only_attributes, request, #respond_to_missing?, retry_request_after, #save, #save!, #to_hash
Constructor Details
#initialize(session: ShopifyAPI::Context.active_session, from_hash: nil) ⇒ OrderRisk
Returns a new instance of OrderRisk.
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
# File 'lib/shopify_api/rest/resources/2022_04/order_risk.rb', line 19 def initialize(session: ShopifyAPI::Context.active_session, from_hash: nil) @cause_cancel = T.let(nil, T.nilable(T::Boolean)) @checkout_id = T.let(nil, T.nilable(Integer)) @display = T.let(nil, T.nilable(T::Boolean)) @id = T.let(nil, T.nilable(Integer)) @merchant_message = T.let(nil, T.nilable(String)) @message = T.let(nil, T.nilable(String)) @order_id = T.let(nil, T.nilable(Integer)) @recommendation = T.let(nil, T.nilable(String)) @score = T.let(nil, T.nilable(String)) @source = T.let(nil, T.nilable(String)) super(session: session, from_hash: from_hash) end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class ShopifyAPI::Rest::Base
Instance Attribute Details
#cause_cancel ⇒ Object (readonly)
Returns the value of attribute cause_cancel.
46 47 48 |
# File 'lib/shopify_api/rest/resources/2022_04/order_risk.rb', line 46 def cause_cancel @cause_cancel end |
#checkout_id ⇒ Object (readonly)
Returns the value of attribute checkout_id.
48 49 50 |
# File 'lib/shopify_api/rest/resources/2022_04/order_risk.rb', line 48 def checkout_id @checkout_id end |
#display ⇒ Object (readonly)
Returns the value of attribute display.
50 51 52 |
# File 'lib/shopify_api/rest/resources/2022_04/order_risk.rb', line 50 def display @display end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
52 53 54 |
# File 'lib/shopify_api/rest/resources/2022_04/order_risk.rb', line 52 def id @id end |
#merchant_message ⇒ Object (readonly)
Returns the value of attribute merchant_message.
54 55 56 |
# File 'lib/shopify_api/rest/resources/2022_04/order_risk.rb', line 54 def @merchant_message end |
#message ⇒ Object (readonly)
Returns the value of attribute message.
56 57 58 |
# File 'lib/shopify_api/rest/resources/2022_04/order_risk.rb', line 56 def @message end |
#order_id ⇒ Object (readonly)
Returns the value of attribute order_id.
58 59 60 |
# File 'lib/shopify_api/rest/resources/2022_04/order_risk.rb', line 58 def order_id @order_id end |
#recommendation ⇒ Object (readonly)
Returns the value of attribute recommendation.
60 61 62 |
# File 'lib/shopify_api/rest/resources/2022_04/order_risk.rb', line 60 def recommendation @recommendation end |
#score ⇒ Object (readonly)
Returns the value of attribute score.
62 63 64 |
# File 'lib/shopify_api/rest/resources/2022_04/order_risk.rb', line 62 def score @score end |
#source ⇒ Object (readonly)
Returns the value of attribute source.
64 65 66 |
# File 'lib/shopify_api/rest/resources/2022_04/order_risk.rb', line 64 def source @source end |
Class Method Details
.all(order_id: nil, session: ShopifyAPI::Context.active_session, **kwargs) ⇒ Object
131 132 133 134 135 136 137 138 139 140 141 142 143 |
# File 'lib/shopify_api/rest/resources/2022_04/order_risk.rb', line 131 def all( order_id: nil, session: ShopifyAPI::Context.active_session, **kwargs ) response = base_find( session: session, ids: {order_id: order_id}, params: {}.merge(kwargs).compact, ) T.cast(response, T::Array[OrderRisk]) end |
.delete(id:, order_id: nil, session: ShopifyAPI::Context.active_session) ⇒ Object
110 111 112 113 114 115 116 117 118 119 120 121 122 |
# File 'lib/shopify_api/rest/resources/2022_04/order_risk.rb', line 110 def delete( id:, order_id: nil, session: ShopifyAPI::Context.active_session ) request( http_method: :delete, operation: :delete, session: session, ids: {id: id, order_id: order_id}, params: {}, ) end |
.find(id:, order_id: nil, session: ShopifyAPI::Context.active_session) ⇒ Object
90 91 92 93 94 95 96 97 98 99 100 101 |
# File 'lib/shopify_api/rest/resources/2022_04/order_risk.rb', line 90 def find( id:, order_id: nil, session: ShopifyAPI::Context.active_session ) result = base_find( session: session, ids: {id: id, order_id: order_id}, params: {}, ) T.cast(result[0], T.nilable(OrderRisk)) end |
.json_body_name ⇒ Object
70 71 72 |
# File 'lib/shopify_api/rest/resources/2022_04/order_risk.rb', line 70 def json_body_name() "risk" end |
.json_response_body_names ⇒ Object
77 78 79 80 81 |
# File 'lib/shopify_api/rest/resources/2022_04/order_risk.rb', line 77 def json_response_body_names() [ "risk" ] end |