Class: ShopifyAPI::AssignedFulfillmentOrder

Inherits:
Rest::Base
  • Object
show all
Extended by:
T::Sig
Defined in:
lib/shopify_api/rest/resources/2021_07/assigned_fulfillment_order.rb,
lib/shopify_api/rest/resources/2021_10/assigned_fulfillment_order.rb,
lib/shopify_api/rest/resources/2022_01/assigned_fulfillment_order.rb,
lib/shopify_api/rest/resources/2022_04/assigned_fulfillment_order.rb

Instance Attribute Summary collapse

Attributes inherited from Rest::Base

#errors, #original_state

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Rest::Base

base_find, class_name, create_instance, create_instances_from_response, #delete, get_path, has_many?, has_one?, json_body_name, #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) ⇒ AssignedFulfillmentOrder

Returns a new instance of AssignedFulfillmentOrder.


12
13
14
15
16
17
18
19
20
21
22
23
# File 'lib/shopify_api/rest/resources/2021_07/assigned_fulfillment_order.rb', line 12

def initialize(session: ShopifyAPI::Context.active_session)
  super(session: session)

  @assigned_location_id = T.let(nil, T.nilable(Integer))
  @destination = T.let(nil, T.nilable(T::Hash[T.untyped, T.untyped]))
  @id = T.let(nil, T.nilable(Integer))
  @line_items = T.let(nil, T.nilable(T::Array[T.untyped]))
  @order_id = T.let(nil, T.nilable(Integer))
  @request_status = T.let(nil, T.nilable(String))
  @shop_id = T.let(nil, T.nilable(Integer))
  @status = 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

#assigned_location_idObject (readonly)

Returns the value of attribute assigned_location_id.


32
33
34
# File 'lib/shopify_api/rest/resources/2021_07/assigned_fulfillment_order.rb', line 32

def assigned_location_id
  @assigned_location_id
end

#destinationObject (readonly)

Returns the value of attribute destination.


34
35
36
# File 'lib/shopify_api/rest/resources/2021_07/assigned_fulfillment_order.rb', line 34

def destination
  @destination
end

#idObject (readonly)

Returns the value of attribute id.


36
37
38
# File 'lib/shopify_api/rest/resources/2021_07/assigned_fulfillment_order.rb', line 36

def id
  @id
end

#line_itemsObject (readonly)

Returns the value of attribute line_items.


38
39
40
# File 'lib/shopify_api/rest/resources/2021_07/assigned_fulfillment_order.rb', line 38

def line_items
  @line_items
end

#order_idObject (readonly)

Returns the value of attribute order_id.


40
41
42
# File 'lib/shopify_api/rest/resources/2021_07/assigned_fulfillment_order.rb', line 40

def order_id
  @order_id
end

#request_statusObject (readonly)

Returns the value of attribute request_status.


42
43
44
# File 'lib/shopify_api/rest/resources/2021_07/assigned_fulfillment_order.rb', line 42

def request_status
  @request_status
end

#shop_idObject (readonly)

Returns the value of attribute shop_id.


44
45
46
# File 'lib/shopify_api/rest/resources/2021_07/assigned_fulfillment_order.rb', line 44

def shop_id
  @shop_id
end

#statusObject (readonly)

Returns the value of attribute status.


46
47
48
# File 'lib/shopify_api/rest/resources/2021_07/assigned_fulfillment_order.rb', line 46

def status
  @status
end

Class Method Details

.all(assignment_status: nil, location_ids: nil, session: ShopifyAPI::Context.active_session, **kwargs) ⇒ Object


57
58
59
60
61
62
63
64
65
66
67
68
69
70
# File 'lib/shopify_api/rest/resources/2021_07/assigned_fulfillment_order.rb', line 57

def all(
  assignment_status: nil,
  location_ids: nil,
  session: ShopifyAPI::Context.active_session,
  **kwargs
)
  response = base_find(
    session: session,
    ids: {},
    params: {assignment_status: assignment_status, location_ids: location_ids}.merge(kwargs).compact,
  )

  T.cast(response, T::Array[AssignedFulfillmentOrder])
end