Class: ShopifyAPI::OrderRisk
- Inherits:
-
Rest::Base
- Object
- Rest::Base
- ShopifyAPI::OrderRisk
- Extended by:
- T::Sig
- Defined in:
- lib/shopify_api/rest/resources/2021_07/order_risk.rb,
lib/shopify_api/rest/resources/2021_10/order_risk.rb,
lib/shopify_api/rest/resources/2022_01/order_risk.rb,
lib/shopify_api/rest/resources/2022_04/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
Instance Method Summary collapse
-
#initialize(session: ShopifyAPI::Context.active_session) ⇒ OrderRisk
constructor
A new instance of OrderRisk.
Methods inherited from Rest::Base
base_find, class_name, create_instance, create_instances_from_response, #delete, get_path, has_many?, has_one?, #method_missing, next_page?, next_page_info, prev_page?, prev_page_info, primary_key, read_only_attributes, request, #respond_to_missing?, #save, #save!, #to_hash
Constructor Details
#initialize(session: ShopifyAPI::Context.active_session) ⇒ OrderRisk
Returns a new instance of OrderRisk.
12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/shopify_api/rest/resources/2021_07/order_risk.rb', line 12 def initialize(session: ShopifyAPI::Context.active_session) super(session: session) @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(Float)) @source = T.let(nil, T.nilable(String)) 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.
38 39 40 |
# File 'lib/shopify_api/rest/resources/2021_07/order_risk.rb', line 38 def cause_cancel @cause_cancel end |
#checkout_id ⇒ Object (readonly)
Returns the value of attribute checkout_id.
40 41 42 |
# File 'lib/shopify_api/rest/resources/2021_07/order_risk.rb', line 40 def checkout_id @checkout_id end |
#display ⇒ Object (readonly)
Returns the value of attribute display.
42 43 44 |
# File 'lib/shopify_api/rest/resources/2021_07/order_risk.rb', line 42 def display @display end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
44 45 46 |
# File 'lib/shopify_api/rest/resources/2021_07/order_risk.rb', line 44 def id @id end |
#merchant_message ⇒ Object (readonly)
Returns the value of attribute merchant_message.
46 47 48 |
# File 'lib/shopify_api/rest/resources/2021_07/order_risk.rb', line 46 def @merchant_message end |
#message ⇒ Object (readonly)
Returns the value of attribute message.
48 49 50 |
# File 'lib/shopify_api/rest/resources/2021_07/order_risk.rb', line 48 def @message end |
#order_id ⇒ Object (readonly)
Returns the value of attribute order_id.
50 51 52 |
# File 'lib/shopify_api/rest/resources/2021_07/order_risk.rb', line 50 def order_id @order_id end |
#recommendation ⇒ Object (readonly)
Returns the value of attribute recommendation.
52 53 54 |
# File 'lib/shopify_api/rest/resources/2021_07/order_risk.rb', line 52 def recommendation @recommendation end |
#score ⇒ Object (readonly)
Returns the value of attribute score.
54 55 56 |
# File 'lib/shopify_api/rest/resources/2021_07/order_risk.rb', line 54 def score @score end |
#source ⇒ Object (readonly)
Returns the value of attribute source.
56 57 58 |
# File 'lib/shopify_api/rest/resources/2021_07/order_risk.rb', line 56 def source @source end |
Class Method Details
.all(order_id: nil, session: ShopifyAPI::Context.active_session, **kwargs) ⇒ Object
114 115 116 117 118 119 120 121 122 123 124 125 126 |
# File 'lib/shopify_api/rest/resources/2021_07/order_risk.rb', line 114 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
93 94 95 96 97 98 99 100 101 102 103 104 105 |
# File 'lib/shopify_api/rest/resources/2021_07/order_risk.rb', line 93 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
73 74 75 76 77 78 79 80 81 82 83 84 |
# File 'lib/shopify_api/rest/resources/2021_07/order_risk.rb', line 73 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
62 63 64 |
# File 'lib/shopify_api/rest/resources/2021_07/order_risk.rb', line 62 def json_body_name() "risk" end |