Shopify_api Ruby Gem not creating fulfillment
up vote
0
down vote
favorite
I have a csv that we upload to an app and I want that csv with Order Number and Tracking Number to then go in and mark the order as fulfilled and put in a tracking number on each order. When coding this, my Intellisense is not picking up the ShopifyAPI::Fulfillment so I am not 100% sure if that is how I should do it. I don't get an error in the code but I also don't get the order fulfilled... am I doing something wrong?
order = ShopifyAPI::Order.find(:all, params: { name: o_id, status: "any" })
if order[0].id != "" and !order[0].id.to_s.empty?
items = Array.new order[0].line_items.each do |item|
items.push({"id": item.id})
end
fulfill = ShopifyAPI::Fulfillment.new(order_id: order[0].id, line_items: items)
fulfill.tracking_numbers = [track.to_s]
puts fulfill
fulfill.save
order[0].save
end
ruby shopify fulfillment
add a comment |
up vote
0
down vote
favorite
I have a csv that we upload to an app and I want that csv with Order Number and Tracking Number to then go in and mark the order as fulfilled and put in a tracking number on each order. When coding this, my Intellisense is not picking up the ShopifyAPI::Fulfillment so I am not 100% sure if that is how I should do it. I don't get an error in the code but I also don't get the order fulfilled... am I doing something wrong?
order = ShopifyAPI::Order.find(:all, params: { name: o_id, status: "any" })
if order[0].id != "" and !order[0].id.to_s.empty?
items = Array.new order[0].line_items.each do |item|
items.push({"id": item.id})
end
fulfill = ShopifyAPI::Fulfillment.new(order_id: order[0].id, line_items: items)
fulfill.tracking_numbers = [track.to_s]
puts fulfill
fulfill.save
order[0].save
end
ruby shopify fulfillment
Quick side note, if you're using Ruby on Rails, or at least ActiveSupport, then you can changeorder[0].id != "" and !order[0].id.to_s.empty?
toorder[0].id.present?
– Nate
Nov 8 at 1:07
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I have a csv that we upload to an app and I want that csv with Order Number and Tracking Number to then go in and mark the order as fulfilled and put in a tracking number on each order. When coding this, my Intellisense is not picking up the ShopifyAPI::Fulfillment so I am not 100% sure if that is how I should do it. I don't get an error in the code but I also don't get the order fulfilled... am I doing something wrong?
order = ShopifyAPI::Order.find(:all, params: { name: o_id, status: "any" })
if order[0].id != "" and !order[0].id.to_s.empty?
items = Array.new order[0].line_items.each do |item|
items.push({"id": item.id})
end
fulfill = ShopifyAPI::Fulfillment.new(order_id: order[0].id, line_items: items)
fulfill.tracking_numbers = [track.to_s]
puts fulfill
fulfill.save
order[0].save
end
ruby shopify fulfillment
I have a csv that we upload to an app and I want that csv with Order Number and Tracking Number to then go in and mark the order as fulfilled and put in a tracking number on each order. When coding this, my Intellisense is not picking up the ShopifyAPI::Fulfillment so I am not 100% sure if that is how I should do it. I don't get an error in the code but I also don't get the order fulfilled... am I doing something wrong?
order = ShopifyAPI::Order.find(:all, params: { name: o_id, status: "any" })
if order[0].id != "" and !order[0].id.to_s.empty?
items = Array.new order[0].line_items.each do |item|
items.push({"id": item.id})
end
fulfill = ShopifyAPI::Fulfillment.new(order_id: order[0].id, line_items: items)
fulfill.tracking_numbers = [track.to_s]
puts fulfill
fulfill.save
order[0].save
end
ruby shopify fulfillment
ruby shopify fulfillment
edited Nov 7 at 21:08
phoet
17k33967
17k33967
asked Nov 7 at 18:21
Ian Brown
186
186
Quick side note, if you're using Ruby on Rails, or at least ActiveSupport, then you can changeorder[0].id != "" and !order[0].id.to_s.empty?
toorder[0].id.present?
– Nate
Nov 8 at 1:07
add a comment |
Quick side note, if you're using Ruby on Rails, or at least ActiveSupport, then you can changeorder[0].id != "" and !order[0].id.to_s.empty?
toorder[0].id.present?
– Nate
Nov 8 at 1:07
Quick side note, if you're using Ruby on Rails, or at least ActiveSupport, then you can change
order[0].id != "" and !order[0].id.to_s.empty?
to order[0].id.present?
– Nate
Nov 8 at 1:07
Quick side note, if you're using Ruby on Rails, or at least ActiveSupport, then you can change
order[0].id != "" and !order[0].id.to_s.empty?
to order[0].id.present?
– Nate
Nov 8 at 1:07
add a comment |
1 Answer
1
active
oldest
votes
up vote
1
down vote
accepted
Fulfillments are now requiring you to specify a location where the item is being fulfilled from. Check out the documentation concerning Locations and Inventory Items.
Once you have a location ID, you can create a fulfillment for an item from an order.
That was it...just missing that elusive location ID...
– Ian Brown
Nov 7 at 22:52
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
1
down vote
accepted
Fulfillments are now requiring you to specify a location where the item is being fulfilled from. Check out the documentation concerning Locations and Inventory Items.
Once you have a location ID, you can create a fulfillment for an item from an order.
That was it...just missing that elusive location ID...
– Ian Brown
Nov 7 at 22:52
add a comment |
up vote
1
down vote
accepted
Fulfillments are now requiring you to specify a location where the item is being fulfilled from. Check out the documentation concerning Locations and Inventory Items.
Once you have a location ID, you can create a fulfillment for an item from an order.
That was it...just missing that elusive location ID...
– Ian Brown
Nov 7 at 22:52
add a comment |
up vote
1
down vote
accepted
up vote
1
down vote
accepted
Fulfillments are now requiring you to specify a location where the item is being fulfilled from. Check out the documentation concerning Locations and Inventory Items.
Once you have a location ID, you can create a fulfillment for an item from an order.
Fulfillments are now requiring you to specify a location where the item is being fulfilled from. Check out the documentation concerning Locations and Inventory Items.
Once you have a location ID, you can create a fulfillment for an item from an order.
answered Nov 7 at 21:50
David Lazar
5,22631426
5,22631426
That was it...just missing that elusive location ID...
– Ian Brown
Nov 7 at 22:52
add a comment |
That was it...just missing that elusive location ID...
– Ian Brown
Nov 7 at 22:52
That was it...just missing that elusive location ID...
– Ian Brown
Nov 7 at 22:52
That was it...just missing that elusive location ID...
– Ian Brown
Nov 7 at 22:52
add a comment |
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53195509%2fshopify-api-ruby-gem-not-creating-fulfillment%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Quick side note, if you're using Ruby on Rails, or at least ActiveSupport, then you can change
order[0].id != "" and !order[0].id.to_s.empty?
toorder[0].id.present?
– Nate
Nov 8 at 1:07