Class: ShopifyAPI::CancellationRequest
- Inherits:
-
Rest::Base
- Object
- Rest::Base
- ShopifyAPI::CancellationRequest
- Extended by:
- T::Sig
- Defined in:
- lib/shopify_api/rest/resources/2022_04/cancellation_request.rb,
lib/shopify_api/rest/resources/2022_07/cancellation_request.rb,
lib/shopify_api/rest/resources/2022_10/cancellation_request.rb,
lib/shopify_api/rest/resources/2023_01/cancellation_request.rb,
lib/shopify_api/rest/resources/2023_04/cancellation_request.rb,
lib/shopify_api/rest/resources/2023_07/cancellation_request.rb,
lib/shopify_api/rest/resources/2023_10/cancellation_request.rb,
lib/shopify_api/rest/resources/2024_01/cancellation_request.rb,
lib/shopify_api/rest/resources/2024_04/cancellation_request.rb,
lib/shopify_api/rest/resources/2024_07/cancellation_request.rb,
lib/shopify_api/rest/resources/2024_10/cancellation_request.rb
Instance Attribute Summary collapse
-
#fulfillment_order_id ⇒ Object
readonly
Returns the value of attribute fulfillment_order_id.
Attributes inherited from Rest::Base
Instance Method Summary collapse
- #accept(message: nil, body: nil, **kwargs) ⇒ Object
-
#initialize(session: ShopifyAPI::Context.active_session, from_hash: nil) ⇒ CancellationRequest
constructor
A new instance of CancellationRequest.
- #reject(message: nil, body: nil, **kwargs) ⇒ Object
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, json_body_name, json_response_body_names, #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) ⇒ CancellationRequest
Returns a new instance of CancellationRequest.
19 20 21 22 23 24 |
# File 'lib/shopify_api/rest/resources/2022_04/cancellation_request.rb', line 19 def initialize(session: ShopifyAPI::Context.active_session, from_hash: nil) @fulfillment_order_id = T.let(nil, T.nilable(Integer)) 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
#fulfillment_order_id ⇒ Object (readonly)
Returns the value of attribute fulfillment_order_id.
35 36 37 |
# File 'lib/shopify_api/rest/resources/2022_04/cancellation_request.rb', line 35 def fulfillment_order_id @fulfillment_order_id end |
Instance Method Details
#accept(message: nil, body: nil, **kwargs) ⇒ Object
47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 |
# File 'lib/shopify_api/rest/resources/2022_04/cancellation_request.rb', line 47 def accept( message: nil, body: nil, **kwargs ) self.class.request( http_method: :post, operation: :accept, session: @session, ids: {fulfillment_order_id: @fulfillment_order_id}, params: {message: }.merge(kwargs).compact, body: body, entity: self, ) end |
#reject(message: nil, body: nil, **kwargs) ⇒ Object
70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 |
# File 'lib/shopify_api/rest/resources/2022_04/cancellation_request.rb', line 70 def reject( message: nil, body: nil, **kwargs ) self.class.request( http_method: :post, operation: :reject, session: @session, ids: {fulfillment_order_id: @fulfillment_order_id}, params: {message: }.merge(kwargs).compact, body: body, entity: self, ) end |