Class: YourMembership::Convert
- Defined in:
- lib/your_membership/convert.rb
Overview
YourMembership Convert Namespace
Class Method Summary collapse
-
.ToEasternTime(session, localTime, localGMTBias) ⇒ Hash
Converts the given local time to current Eastern Time, factoring in adjustments for Daylight Savings Time.
Methods inherited from Base
build_XML_request, new_call_id, post, response_to_array, response_to_array_of_hashes, response_valid?, response_ym_error?
Class Method Details
.ToEasternTime(session, localTime, localGMTBias) ⇒ Hash
Note:
This is probably not necessary as Ruby will happily convert dates.
Converts the given local time to current Eastern Time, factoring in adjustments for Daylight Savings Time.
12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/your_membership/convert.rb', line 12 def self.ToEasternTime(session, localTime, localGMTBias) # rubocop:disable Style/MethodName = {} [:LocalTime] = format_date_string localTime [:LocalGmtBias] = localGMTBias response = post('/', :body => build_XML_request('Convert.ToEasternTime', session, )) if response_valid? response response['YourMembership_Response']['Convert.ToEasternTime'] end end |