how to update date of birth through 'Update Passenger Name Record' Sabre API - sabre

Im not able to update DOB through update PNR sabre api call, could someone help me to resolve this issue?
`-ns2:SpecialReqDetails
-ns2:SpecialService
-ns2:SpecialServiceInfo
-ns2:SecureFlight
-<ns2:PersonName NameNumber="1.1" Gender="M" DateOfBirth="1984-05-15">
ns2:GivenNameTest name</ns2:GivenName>
ns2:Surnametestsurname</ns2:Surname>
</ns2:PersonName>
</ns2:SecureFlight>
-ns2:SecureFlight
-<ns2:PersonName NameNumber="2.1" Gender="M" DateOfBirth="1990-07-11">
ns2:GivenNameTest givenname</ns2:GivenName>
ns2:SurnametestSurname</ns2:Surname>
</ns2:PersonName>
</ns2:SecureFlight>
</ns2:SpecialServiceInfo>
</ns2:SpecialService>
</ns2:SpecialReqDetails>`

Related

Twilio causing error by giving Canadian number in phone number parameter

When i give a Pakistani phone number the code execute and send message successfully. But Whenever i give a Canadian or US phone number my WordPress causes error that says "The site is experiencing technical difficulties". I have no idea which type or what error is causing for this.
Here is my code:
require_once dirname(__FILE__).'/vendor/autoload.php';
$sid = "***************************";
$token = "****************************";
$twilio = new Twilio\Rest\Client($sid, $token);
$phone_number = $twilio->lookups->v1->phoneNumbers($phone)->fetch(array("countryCode" => "US"));
$msg = "This is test Message.";
$message = $twilio->messages
->create($phone_number, // to +16048080668
array(
"body" => $message,
"from" => "*********"
)
);
print($message->sid);
Note: I am using Trial version of Twilio API and Both numbers Pakistani and Canadian are verified using Twilio.
I forget to update that I found the solution.
I was missing the geo permission. One has to allow the geo permission of the country where they want to send SMS. The Geo permission option can be found in the Twilio dashboard settings page. I hope it will helpful for someone.

Are the XML APIs deprecated in Authorize.Net?

I heard that authorize.net has a new API. I use an API to manage recurring payments where I send XML requests of the form shown below (in PHP, i.e. $authnet_ etc . will be replaced by actual values). Is this deprecated?
<?xml version=\"1.0\" encoding=\"UTF-8\" ?>
<ARBCreateSubscriptionRequest xmlns= \"AnetApi/xml/v1/schema/AnetApiSchema.xsd\">
<merchantAuthentication>
<name>$authnet_loginname</name>
<transactionKey>$authnet_transactionkey</transactionKey>
</merchantAuthentication>
<subscription>
<name>{$name}</name>
<paymentSchedule>
<interval>
<length>$length</length>
<unit>$unit</unit>
</interval>
<startDate>$startDate</startDate>
<totalOccurrences>$totalOccurrences</totalOccurrences>
</paymentSchedule>
<amount>$intern_amount</amount>
<payment>
<creditCard>
<cardNumber>$x_card_number</cardNumber>
<expirationDate>$expirationDate</expirationDate>
</creditCard>
</payment>
<order>
<invoiceNumber>$action_id</invoiceNumber>
<description>$description</description>
</order>
<customer>
<email>$x_email</email>
<phoneNumber> $x_phone </phoneNumber>
</customer>
<billTo>
<firstName>$intern_first_name</firstName>
<lastName>$intern_last_name</lastName>
<address>$intern_address</address>
<city>$intern_city</city>
<state>$intern_state</state>
<zip>$intern_zip</zip>
<country>$intern_country</country>
</billTo>
<shipTo>
<firstName>$intern_ship_to_first_name</firstName>
<lastName>$intern_ship_to_last_name</lastName>
<address>$intern_ship_to_address</address>
<city>$intern_ship_to_city</city>
<state>$intern_ship_to_state</state>
<zip>$intern_ship_to_zip</zip>
<country>$intern_ship_to_country</country>
</shipTo>
</subscription>
</ARBCreateSubscriptionRequest>
Authorize.Net did not deprecate XML formatted API requests. They work in parallel with the newer JSON format.
They still list it on their API Reference and documentation.

How to get service price in GetReservationRS

I have booked a valid available service through Sabre PassengerDetailsRS and booking was successful. But in the GetReservationRS, price of the service is missing. How can we get that price. My GetReservationRQ was as below
<?xml version="1.0" encoding="UTF-8"?>
<ns7:GetReservationRQ xmlns:ns7="http://webservices.sabre.com/pnrbuilder/v1_19" Version="1.19.0">
<ns7:Locator>*pnr_number</ns7:Locator>
<ns7:RequestType>Stateful</ns7:RequestType>
<ns7:ReturnOptions PriceQuoteServiceVersion="3.2.0">
<ns7:SubjectAreas>
<ns7:SubjectArea>PRICE_QUOTE</ns7:SubjectArea>
</ns7:SubjectAreas>
<ns7:ViewName>Full</ns7:ViewName>
<ns7:ResponseFormat>STL</ns7:ResponseFormat>
</ns7:ReturnOptions>
</ns7:GetReservationRQ>
</soapenv:Body>
And in the response, that service is present which I booked in the booking step. But there is no pricing reference for that service, only the flight total price is present which is service excluded price
...
/SPORTING FIREARMS
WEAP BA NN1 LHRZRH0720N11AUG/SPORTING FIREARMS
I
BA
110.59
2019-06-16T13:03:00
. . .
How can I get the price of ode="WEAP" (<or114:FreeText>/SPORTING FIREARMS</or114:FreeText>)
you have to add ReturnOptions->SubjectArea->PRICE_QUOTE in GetReservationRQ
e.g:
<ReturnOptions PriceQuoteServiceVersion="3.2.0">
<SubjectAreas>
<SubjectArea>PRICE_QUOTE</SubjectArea>
</SubjectAreas>
</ReturnOptions>
for more details please have a look at below URL (Sabre Documentation)
`https://beta.developer.sabre.com/docs/soap_apis/management/itinerary`/Retrieve_Itinerary
I use GetPriceQuoteRQ after GetReservationRQ.
https://beta.developer.sabre.com/docs/soap_apis/air/fulfill/manage_price_quote_details
As this is an upsell for most airlines it falls under ancillary services - therefore to price them you should use: GetAncillaryOffersRQ

How do I access to Google Calendar through CalDAV API?

I'm trying to access to Google Calendar through CalDAV API with Google's API library for Ruby (I use service accounts as the application type).
I've written following code, but this doesn't work when the HTTP method is PUT or POST and outputs an error "HTTP method not allowed" with the status code 405. However, it works correctly when the method is GET or DELETE.
require 'google/api_client'
client = Google::APIClient.new(
application_name: 'test',
application_version: '1.0.0'
)
calendar_id = 'CALENDER_ID'
BASE_URL = "https://apidata.googleusercontent.com/caldav/v2/#{calendar_id}/events/"
key = Google::APIClient::KeyUtils.load_from_pkcs12('P12_FILE', 'notasecret')
client.authorization = Signet::OAuth2::Client.new(
token_credential_uri: 'https://www.googleapis.com/oauth2/v3/token',
audience: 'https://www.googleapis.com/oauth2/v3/token',
scope: 'https://www.googleapis.com/auth/calendar',
issuer: 'foobar#developer.gserviceaccount.com',
signing_key: key)
client.authorization.fetch_access_token!
body = <<EOS
BEGIN:VCALENDAR
VERSION:2.0
PRODID:test
CALSCALE:GREGORIAN
METHOD:PUBLISH
X-WR-CALNAME:CAMPHOR- Schedule 201503
BEGIN:VTIMEZONE
TZID:Asia/Tokyo
BEGIN:STANDARD
DTSTART:19700101T000000
TZOFFSETFROM:+0900
TZOFFSETTO:+0900
TZNAME:JST
END:STANDARD
END:VTIMEZONE
BEGIN:VEVENT
DTSTAMP:20150224T080050Z
UID:4807869c-ba02-48cc-aed5-0e0f5ff19022
DTSTART:20150331T150000
DTEND:20150331T200000
DESCRIPTION:
SUMMARY:DEST 2015-03-31 15:00:00 +0900 2015-03-31 20:00:00 +0900
END:VEVENT
END:VCALENDAR
EOS
request = Google::APIClient::Request.new(
uri: BASE_URL,
body: body,
http_method: :post,
headers: {
'Content-Type' => 'application/xml; charset=utf-8'
}
)
result = client.execute(request)
puts result.response.status
puts result.response.env
Could you tell me how should I fix this code to be able to use the all methods?
The initial problem is you can't PUT to the collection resource like that in CalDAV. See section 5.3.2 of the spec for more details. In other words, the URL should be something like ".../events/somerandomeventid.ics"
That said, you're headed down a bad path here.
The API client you're using isn't meant to be used with CalDAV.
Unless you have a good reason to use CalDAV, don't. Use the calendar API.
Calendar isn't meant to be used with non-user accounts like that. Sure, it might work, but it's not in the spirit of the product/API.

What module is this email coming from?

Today the webmaster email account received this email:
From: notification#mysite.com [mailto:notification#mysite.com]
Sent: Friday, January 09, 2015 6:27 AM
To: webmaster#mysite.com
Subject: New issue created
*New issue created :* %title
Description :
%body
nodeurl :
%node_url
In my database I found this in the actions table:
aid type callback parameters description
1 system system_send_email_action a:3:{s:9:"recipient";s:28:"webmaster#mysite.com";s:7:"subject";s:17:"New issue created";s:7:"message";s:119:"<strong>New issue created :</strong> %title
<br/>
Description :
<br/>
%body
<br/>
nodeurl :
<br/>
%node_url";} Send e-mail to admins
On /admin/build/trigger/user, there is a trigger called “Trigger: After a user account has been created” with an action: “Send e-mail to admins”. On the actions page for this (admin/settings/actions/configure/1) , you will see the information that gets sent in an email

Resources