How to retrive the transfer order details, with the sales order number in Sterling OMS? - ibm-sterling

I've a requirement where in, I need to get all the transfer orders, that has been associated with the sales order.
Is there any api / attribute in getOrderDetails API that has transfer order number or TransferOrderHeaderKey ?
In the input, I've both sales order number and orderHeaderKey.

You should be able to use getOrderList call with a combination of documentType for Transfer Order and Derived_from_chained_order_header_key

Using below input you would be able to get all the transfer orders by invoking getOrderList api
<Order DocumentType="0006">
<OrderLine ChainedFromOrderHeaderKey="<SalesOrderHeaderKey>"/>
</Order>

Related

Woocommerce REST API - filter orders by number or date

I want to retrieve an order by its number (not order ID) or by a date.
Earlier I've tried to retrieve (with Postman) an order by its order_id, status or order_key - and it worked:
https://example.com/wp-json/wc/v1/orders?status=completed&consumer_key=ck_...&consumer_secret=cs_...
With the example above, it works correctly.
However, when I'm trying to use number, all of the orders are listed:
https://example.com/wp-json/wc/v1/orders?number=123&consumer_key=ck_...&consumer_secret=cs_...
I've tried also filter[number], the result is the same (all orders are listed):
https://example.com/wp-json/wc/v1/orders?filter[number]=123&consumer_key=ck_...&consumer_secret=cs_...
Question: Could you please explain how can I get order by order number (or a date) using Woocommerce REST API?
As per my understanding, you need to display orders in an ASC or DESC order based on the order number.
you can use orderby and order query string parameter like this to get the order by date https://localhost/wp-test/wp-json/wc/v3/orders?&orderby=date&order=asc&consumer_key=ck_b9f70548c7b676&consumer_secret=cs_10acfa5ab943eb6a0e
Generally order by date will provide you the result of an order by number too because the order placed on the latest date will have the latest order id as per WordPress until you modify from the admin side and vice-versa
Please let me know if I can help you further..

Is it possible to group segments in Retrieve PNR response?

I'm currently retrieving a PNR information using the Retrieve PNR API. For display, i need to group the flights by legs. However, the flight returned in the view i'm using (DefaultWithPq) are simply returned as a single sequence of segments :
<stl18:Segments>
<stl18:Segment sequence="1" id="8">
...
<stl18:Segment sequence="2" id="9">
...
<stl18:Segment sequence="3" id="10">
...
<stl18:Segment sequence="4" id="11">
...
</stl18:Segments>
How is it possible from those sequence (without calculating with departure times destinations etc.) to know which ones are in the departure leg and which ones are in the return leg ?
thank you
Unfortunately this would be have to be done by your application's logic, as the service does not return that information. You can use dates and marriage indicators but there is no element to show which one is the inbound or outbound flight. Usually customers obtain this with shopping services like BFM.

Get complete data of a transaction in Stripe

How can I get the complete information of transaction in Stripe?
For the fields which I filled at the Charge::create(), I want to get all the details: number,cvc,exp_month,exp_year ect.
I can get amount and id by using this server call
BalanceTransaction::retrieve($data['transactionID']);
Thanks.
You can use
charge:retrive("ch_%yourid");
you give you complete charge data , but give you last 4 digits of card number only.

Sabre: How to pass Frequent Flyer Number in PNR

I would like to know how to pass Frequent Flyer's number in case 2 different Airlines.
Do I need to pass Airline wise i.e Segment wise, or can I pass for Marketing Airline.
For Instance:
Say Marketing Airline is "9W" and Suppose 2 connecting Airlines are "9W" and "AI", so in this case, will it be ok if I just pass for "9W" (Marketing Airline) ?
I think passing MarketingAirline in ProgramID should be OK.
according to Sabre documentation, you can pass frequent flyer number using PassengerDetailsRQ when creating PNR with this XML element:
<CustLoyalty MembershipID="155P9B76" NameNumber="1.1" ProgramID="XX"
SegmentNumber="1" TravelingCarrierCode="YY"/>
The thing you have to know that you can't combine SegmentNumber element with TravellingCarrierCode. In your case, you have two different airlines to ticket but you want pass the frequent flyer number to only one of these, then you can do:
<CustLoyalty MembershipID="155P9B76" NameNumber="1.1" ProgramID="XX" TravelingCarrierCode="XX"/>
ProgramID is the airline that you want to pass the frequent flyer number, TravellingCarrierCode can be same or different (due to operating / marketing airline differentiation). NameNumber stands for passenger I guess, I didn't have exact information for that so I don't want to give you wrong information about that attribute.
The schema you should follow in request is:
PassengerDetailsRQ --> TravelItineraryAddInfoRQ --> CustomerInfo --> CustLoyalty
Regards.

How to set custom order total in woocommerce?

I currently have 6 items in cart, which cost £456. I'm trying to implement a custom payment system, so the customer can pay some now and some later. So i want the cost to be £400.
The only function i've found is set_total in WC_Abstract_Order but to use WC_Abstract Order you need the order id and the order hasn't been placed yet for an id to be generated.
Any idea how to solve?

Resources