Class: ShopifyAPI::FulfillmentV2

Inherits:
Base
  • Object
show all
Defined in:
lib/shopify_api/resources/fulfillment_v2.rb

Instance Method Summary collapse

Methods inherited from Base

activate_session, api_version, api_version=, #as_json, clear_session, early_july_pagination?, #encode, headers, init_prefix, init_prefix_explicit, #persisted?, prefix, prefix=, prefix_source, resource_prefix, resource_prefix=, version_validation!

Methods included from Countable

#count

Constructor Details

#initialize(attributes = {}, persisted = false) ⇒ FulfillmentV2

Returns a new instance of FulfillmentV2.


5
6
7
8
# File 'lib/shopify_api/resources/fulfillment_v2.rb', line 5

def initialize(attributes = {}, persisted = false)
  ShopifyAPI::Base.version_validation!(FulfillmentOrder::MINIMUM_VERSION)
  super(attributes, persisted)
end

Instance Method Details

#update_tracking(tracking_info:, notify_customer:) ⇒ Object


10
11
12
13
14
15
16
17
18
# File 'lib/shopify_api/resources/fulfillment_v2.rb', line 10

def update_tracking(tracking_info:, notify_customer:)
  body = {
    fulfillment: {
      tracking_info: tracking_info,
      notify_customer: notify_customer
    }
  }
  load_attributes_from_response(post(:update_tracking, {}, body.to_json))
end