Class: SpreeCmCommissioner::Integrations::Larryta::Resources::BookingTransaction
- Inherits:
-
Base
- Object
- Base
- SpreeCmCommissioner::Integrations::Larryta::Resources::BookingTransaction
- Defined in:
- app/services/spree_cm_commissioner/integrations/larryta/resources/booking_transaction.rb
Overview
Represents a booking transaction from Larryta’s check_transaction API Contains comprehensive booking information including customer, pricing, and route details
Instance Attribute Summary collapse
-
#booking_by_account_name ⇒ Object
Booking by info.
-
#booking_by_contact_email ⇒ Object
Booking by info.
-
#booking_by_contact_name ⇒ Object
Booking by info.
-
#booking_by_contact_phone ⇒ Object
Booking by info.
-
#booking_by_user_branch ⇒ Object
Booking by info.
-
#booking_by_user_location ⇒ Object
Booking by info.
-
#booking_by_user_permission ⇒ Object
Booking by info.
-
#booking_code ⇒ Object
Returns the value of attribute booking_code.
-
#booking_date ⇒ Object
Returns the value of attribute booking_date.
-
#change_num ⇒ Object
Returns the value of attribute change_num.
-
#customer_country_code ⇒ Object
Customer info.
-
#customer_email ⇒ Object
Customer info.
-
#customer_full_name ⇒ Object
Customer info.
-
#customer_id ⇒ Object
Returns the value of attribute customer_id.
-
#customer_phone ⇒ Object
Customer info.
-
#customer_total_ending_point ⇒ Object
Customer info.
-
#departure_date ⇒ Object
Returns the value of attribute departure_date.
-
#dire_code ⇒ Object
Direction info.
-
#dire_remark ⇒ Object
Direction info.
-
#direction_id ⇒ Object
Returns the value of attribute direction_id.
-
#from_location_code ⇒ Object
Location info.
-
#from_location_id ⇒ Object
Location info.
-
#from_location_name ⇒ Object
Location info.
-
#from_location_name_kh ⇒ Object
Location info.
-
#msg ⇒ Object
Returns the value of attribute msg.
-
#pay_date ⇒ Object
Returns the value of attribute pay_date.
-
#payment_id ⇒ Object
Returns the value of attribute payment_id.
-
#payment_type ⇒ Object
Returns the value of attribute payment_type.
-
#release_account_name ⇒ Object
Release info.
-
#release_by ⇒ Object
Returns the value of attribute release_by.
-
#release_contact_email ⇒ Object
Release info.
-
#release_contact_name ⇒ Object
Release info.
-
#release_contact_phone ⇒ Object
Release info.
-
#release_user_branch ⇒ Object
Release info.
-
#release_user_location ⇒ Object
Release info.
-
#release_user_permission ⇒ Object
Release info.
-
#remark ⇒ Object
Returns the value of attribute remark.
-
#reseller_account_name ⇒ Object
Reseller info.
-
#reseller_by ⇒ Object
Returns the value of attribute reseller_by.
-
#reseller_contact_email ⇒ Object
Reseller info.
-
#reseller_contact_name ⇒ Object
Reseller info.
-
#reseller_contact_phone ⇒ Object
Reseller info.
-
#reseller_user_branch ⇒ Object
Reseller info.
-
#reseller_user_location ⇒ Object
Reseller info.
-
#reseller_user_permission ⇒ Object
Reseller info.
-
#seat_nums ⇒ Object
Returns the value of attribute seat_nums.
-
#session_token ⇒ Object
Returns the value of attribute session_token.
-
#status ⇒ Object
Returns the value of attribute status.
-
#to_location_code ⇒ Object
Returns the value of attribute to_location_code.
-
#to_location_id ⇒ Object
Returns the value of attribute to_location_id.
-
#to_location_name ⇒ Object
Returns the value of attribute to_location_name.
-
#to_location_name_kh ⇒ Object
Returns the value of attribute to_location_name_kh.
-
#total_amount ⇒ Object
Returns the value of attribute total_amount.
-
#total_bonus ⇒ Object
Returns the value of attribute total_bonus.
-
#total_commission ⇒ Object
Returns the value of attribute total_commission.
-
#total_discount ⇒ Object
Returns the value of attribute total_discount.
-
#total_fee_charge ⇒ Object
Returns the value of attribute total_fee_charge.
-
#total_net_price ⇒ Object
Returns the value of attribute total_net_price.
-
#total_seat ⇒ Object
Returns the value of attribute total_seat.
-
#travel_time ⇒ Object
Direction info.
-
#unit_price ⇒ Object
Returns the value of attribute unit_price.
Instance Method Summary collapse
-
#id ⇒ Object
Returns the booking ID.
-
#initialize(data) ⇒ BookingTransaction
constructor
rubocop:disable Lint/MissingSuper,Metrics/AbcSize,Metrics/MethodLength.
-
#pricing_summary ⇒ Object
Returns pricing summary.
-
#seat_numbers ⇒ Object
Returns the seat number as an array.
-
#success? ⇒ Boolean
Returns true if the transaction was successful.
-
#to_h ⇒ Object
Returns a hash representation.
Methods inherited from Base
Constructor Details
#initialize(data) ⇒ BookingTransaction
rubocop:disable Lint/MissingSuper,Metrics/AbcSize,Metrics/MethodLength
37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 |
# File 'app/services/spree_cm_commissioner/integrations/larryta/resources/booking_transaction.rb', line 37 def initialize(data) # rubocop:disable Lint/MissingSuper,Metrics/AbcSize,Metrics/MethodLength @session_token = data['session_token'] @booking_code = data['booking_code'] @unit_price = data['unit_price'] @payment_type = data['payment_type'] @customer_id = data['customer_id'] @payment_id = data['payment_id'] @direction_id = data['direction_id'] @booking_date = data['booking_date'] @departure_date = data['departure_date'] @pay_date = data['pay_date'] @remark = data['remark'] @change_num = data['change_num'] @seat_nums = data['seat_nums'] @total_seat = data['total_seat'] @total_amount = data['total_amount'] @total_discount = data['total_discount'] @total_commission = data['total_commission'] @total_bonus = data['total_bonus'] @total_net_price = data['total_net_price'] @total_fee_charge = data['total_fee_charge'] @reseller_by = data['reseller_by'] @release_by = data['release_by'] @status = data['status'] @msg = data['msg'] # Customer info customer = data['customer'] || {} @customer_full_name = customer['full_name'] @customer_phone = customer['phone'] @customer_email = customer['email'] @customer_country_code = customer['country_code'] @customer_total_ending_point = customer['total_ending_point'] # Booking by info booking_by = data['booking_by'] || {} @booking_by_account_name = booking_by['account_name'] @booking_by_user_branch = booking_by['user_branch'] @booking_by_contact_name = booking_by['contact_name'] @booking_by_contact_phone = booking_by['contact_phone'] @booking_by_contact_email = booking_by['contact_email'] @booking_by_user_permission = booking_by['user_permission'] @booking_by_user_location = booking_by['user_location'] # Reseller info reseller = data['reseller'] || {} @reseller_account_name = reseller['account_name'] @reseller_user_branch = reseller['user_branch'] @reseller_contact_name = reseller['contact_name'] @reseller_contact_phone = reseller['contact_phone'] @reseller_contact_email = reseller['contact_email'] @reseller_user_permission = reseller['user_permission'] @reseller_user_location = reseller['user_location'] # Release info release = data['release'] || {} @release_account_name = release['account_name'] @release_user_branch = release['user_branch'] @release_contact_name = release['contact_name'] @release_contact_phone = release['contact_phone'] @release_contact_email = release['contact_email'] @release_user_permission = release['user_permission'] @release_user_location = release['user_location'] # Direction info direction = data['direction'] || {} @travel_time = direction['travel_time'] @dire_code = direction['dire_code'] @dire_remark = direction['dire_remark'] # From location from_location = direction['from_location'] || {} @from_location_id = from_location['location_id'] @from_location_name = from_location['loca_name'] @from_location_name_kh = from_location['loca_name_kh'] @from_location_code = from_location['loca_code'] # To location to_location = direction['to_location'] || {} @to_location_id = to_location['location_id'] @to_location_name = to_location['loca_name'] @to_location_name_kh = to_location['loca_name_kh'] @to_location_code = to_location['loca_code'] end |
Instance Attribute Details
#booking_by_account_name ⇒ Object
Booking by info
17 18 19 |
# File 'app/services/spree_cm_commissioner/integrations/larryta/resources/booking_transaction.rb', line 17 def booking_by_account_name @booking_by_account_name end |
#booking_by_contact_email ⇒ Object
Booking by info
17 18 19 |
# File 'app/services/spree_cm_commissioner/integrations/larryta/resources/booking_transaction.rb', line 17 def booking_by_contact_email @booking_by_contact_email end |
#booking_by_contact_name ⇒ Object
Booking by info
17 18 19 |
# File 'app/services/spree_cm_commissioner/integrations/larryta/resources/booking_transaction.rb', line 17 def booking_by_contact_name @booking_by_contact_name end |
#booking_by_contact_phone ⇒ Object
Booking by info
17 18 19 |
# File 'app/services/spree_cm_commissioner/integrations/larryta/resources/booking_transaction.rb', line 17 def booking_by_contact_phone @booking_by_contact_phone end |
#booking_by_user_branch ⇒ Object
Booking by info
17 18 19 |
# File 'app/services/spree_cm_commissioner/integrations/larryta/resources/booking_transaction.rb', line 17 def booking_by_user_branch @booking_by_user_branch end |
#booking_by_user_location ⇒ Object
Booking by info
17 18 19 |
# File 'app/services/spree_cm_commissioner/integrations/larryta/resources/booking_transaction.rb', line 17 def booking_by_user_location @booking_by_user_location end |
#booking_by_user_permission ⇒ Object
Booking by info
17 18 19 |
# File 'app/services/spree_cm_commissioner/integrations/larryta/resources/booking_transaction.rb', line 17 def @booking_by_user_permission end |
#booking_code ⇒ Object
Returns the value of attribute booking_code.
7 8 9 |
# File 'app/services/spree_cm_commissioner/integrations/larryta/resources/booking_transaction.rb', line 7 def booking_code @booking_code end |
#booking_date ⇒ Object
Returns the value of attribute booking_date.
7 8 9 |
# File 'app/services/spree_cm_commissioner/integrations/larryta/resources/booking_transaction.rb', line 7 def booking_date @booking_date end |
#change_num ⇒ Object
Returns the value of attribute change_num.
7 8 9 |
# File 'app/services/spree_cm_commissioner/integrations/larryta/resources/booking_transaction.rb', line 7 def change_num @change_num end |
#customer_country_code ⇒ Object
Customer info
13 14 15 |
# File 'app/services/spree_cm_commissioner/integrations/larryta/resources/booking_transaction.rb', line 13 def customer_country_code @customer_country_code end |
#customer_email ⇒ Object
Customer info
13 14 15 |
# File 'app/services/spree_cm_commissioner/integrations/larryta/resources/booking_transaction.rb', line 13 def customer_email @customer_email end |
#customer_full_name ⇒ Object
Customer info
13 14 15 |
# File 'app/services/spree_cm_commissioner/integrations/larryta/resources/booking_transaction.rb', line 13 def customer_full_name @customer_full_name end |
#customer_id ⇒ Object
Returns the value of attribute customer_id.
7 8 9 |
# File 'app/services/spree_cm_commissioner/integrations/larryta/resources/booking_transaction.rb', line 7 def customer_id @customer_id end |
#customer_phone ⇒ Object
Customer info
13 14 15 |
# File 'app/services/spree_cm_commissioner/integrations/larryta/resources/booking_transaction.rb', line 13 def customer_phone @customer_phone end |
#customer_total_ending_point ⇒ Object
Customer info
13 14 15 |
# File 'app/services/spree_cm_commissioner/integrations/larryta/resources/booking_transaction.rb', line 13 def customer_total_ending_point @customer_total_ending_point end |
#departure_date ⇒ Object
Returns the value of attribute departure_date.
7 8 9 |
# File 'app/services/spree_cm_commissioner/integrations/larryta/resources/booking_transaction.rb', line 7 def departure_date @departure_date end |
#dire_code ⇒ Object
Direction info
32 33 34 |
# File 'app/services/spree_cm_commissioner/integrations/larryta/resources/booking_transaction.rb', line 32 def dire_code @dire_code end |
#dire_remark ⇒ Object
Direction info
32 33 34 |
# File 'app/services/spree_cm_commissioner/integrations/larryta/resources/booking_transaction.rb', line 32 def dire_remark @dire_remark end |
#direction_id ⇒ Object
Returns the value of attribute direction_id.
7 8 9 |
# File 'app/services/spree_cm_commissioner/integrations/larryta/resources/booking_transaction.rb', line 7 def direction_id @direction_id end |
#from_location_code ⇒ Object
Location info
35 36 37 |
# File 'app/services/spree_cm_commissioner/integrations/larryta/resources/booking_transaction.rb', line 35 def from_location_code @from_location_code end |
#from_location_id ⇒ Object
Location info
35 36 37 |
# File 'app/services/spree_cm_commissioner/integrations/larryta/resources/booking_transaction.rb', line 35 def from_location_id @from_location_id end |
#from_location_name ⇒ Object
Location info
35 36 37 |
# File 'app/services/spree_cm_commissioner/integrations/larryta/resources/booking_transaction.rb', line 35 def from_location_name @from_location_name end |
#from_location_name_kh ⇒ Object
Location info
35 36 37 |
# File 'app/services/spree_cm_commissioner/integrations/larryta/resources/booking_transaction.rb', line 35 def from_location_name_kh @from_location_name_kh end |
#msg ⇒ Object
Returns the value of attribute msg.
7 8 9 |
# File 'app/services/spree_cm_commissioner/integrations/larryta/resources/booking_transaction.rb', line 7 def msg @msg end |
#pay_date ⇒ Object
Returns the value of attribute pay_date.
7 8 9 |
# File 'app/services/spree_cm_commissioner/integrations/larryta/resources/booking_transaction.rb', line 7 def pay_date @pay_date end |
#payment_id ⇒ Object
Returns the value of attribute payment_id.
7 8 9 |
# File 'app/services/spree_cm_commissioner/integrations/larryta/resources/booking_transaction.rb', line 7 def payment_id @payment_id end |
#payment_type ⇒ Object
Returns the value of attribute payment_type.
7 8 9 |
# File 'app/services/spree_cm_commissioner/integrations/larryta/resources/booking_transaction.rb', line 7 def payment_type @payment_type end |
#release_account_name ⇒ Object
Release info
27 28 29 |
# File 'app/services/spree_cm_commissioner/integrations/larryta/resources/booking_transaction.rb', line 27 def release_account_name @release_account_name end |
#release_by ⇒ Object
Returns the value of attribute release_by.
7 8 9 |
# File 'app/services/spree_cm_commissioner/integrations/larryta/resources/booking_transaction.rb', line 7 def release_by @release_by end |
#release_contact_email ⇒ Object
Release info
27 28 29 |
# File 'app/services/spree_cm_commissioner/integrations/larryta/resources/booking_transaction.rb', line 27 def release_contact_email @release_contact_email end |
#release_contact_name ⇒ Object
Release info
27 28 29 |
# File 'app/services/spree_cm_commissioner/integrations/larryta/resources/booking_transaction.rb', line 27 def release_contact_name @release_contact_name end |
#release_contact_phone ⇒ Object
Release info
27 28 29 |
# File 'app/services/spree_cm_commissioner/integrations/larryta/resources/booking_transaction.rb', line 27 def release_contact_phone @release_contact_phone end |
#release_user_branch ⇒ Object
Release info
27 28 29 |
# File 'app/services/spree_cm_commissioner/integrations/larryta/resources/booking_transaction.rb', line 27 def release_user_branch @release_user_branch end |
#release_user_location ⇒ Object
Release info
27 28 29 |
# File 'app/services/spree_cm_commissioner/integrations/larryta/resources/booking_transaction.rb', line 27 def release_user_location @release_user_location end |
#release_user_permission ⇒ Object
Release info
27 28 29 |
# File 'app/services/spree_cm_commissioner/integrations/larryta/resources/booking_transaction.rb', line 27 def @release_user_permission end |
#remark ⇒ Object
Returns the value of attribute remark.
7 8 9 |
# File 'app/services/spree_cm_commissioner/integrations/larryta/resources/booking_transaction.rb', line 7 def remark @remark end |
#reseller_account_name ⇒ Object
Reseller info
22 23 24 |
# File 'app/services/spree_cm_commissioner/integrations/larryta/resources/booking_transaction.rb', line 22 def reseller_account_name @reseller_account_name end |
#reseller_by ⇒ Object
Returns the value of attribute reseller_by.
7 8 9 |
# File 'app/services/spree_cm_commissioner/integrations/larryta/resources/booking_transaction.rb', line 7 def reseller_by @reseller_by end |
#reseller_contact_email ⇒ Object
Reseller info
22 23 24 |
# File 'app/services/spree_cm_commissioner/integrations/larryta/resources/booking_transaction.rb', line 22 def reseller_contact_email @reseller_contact_email end |
#reseller_contact_name ⇒ Object
Reseller info
22 23 24 |
# File 'app/services/spree_cm_commissioner/integrations/larryta/resources/booking_transaction.rb', line 22 def reseller_contact_name @reseller_contact_name end |
#reseller_contact_phone ⇒ Object
Reseller info
22 23 24 |
# File 'app/services/spree_cm_commissioner/integrations/larryta/resources/booking_transaction.rb', line 22 def reseller_contact_phone @reseller_contact_phone end |
#reseller_user_branch ⇒ Object
Reseller info
22 23 24 |
# File 'app/services/spree_cm_commissioner/integrations/larryta/resources/booking_transaction.rb', line 22 def reseller_user_branch @reseller_user_branch end |
#reseller_user_location ⇒ Object
Reseller info
22 23 24 |
# File 'app/services/spree_cm_commissioner/integrations/larryta/resources/booking_transaction.rb', line 22 def reseller_user_location @reseller_user_location end |
#reseller_user_permission ⇒ Object
Reseller info
22 23 24 |
# File 'app/services/spree_cm_commissioner/integrations/larryta/resources/booking_transaction.rb', line 22 def @reseller_user_permission end |
#seat_nums ⇒ Object
Returns the value of attribute seat_nums.
7 8 9 |
# File 'app/services/spree_cm_commissioner/integrations/larryta/resources/booking_transaction.rb', line 7 def seat_nums @seat_nums end |
#session_token ⇒ Object
Returns the value of attribute session_token.
7 8 9 |
# File 'app/services/spree_cm_commissioner/integrations/larryta/resources/booking_transaction.rb', line 7 def session_token @session_token end |
#status ⇒ Object
Returns the value of attribute status.
7 8 9 |
# File 'app/services/spree_cm_commissioner/integrations/larryta/resources/booking_transaction.rb', line 7 def status @status end |
#to_location_code ⇒ Object
Returns the value of attribute to_location_code.
7 8 9 |
# File 'app/services/spree_cm_commissioner/integrations/larryta/resources/booking_transaction.rb', line 7 def to_location_code @to_location_code end |
#to_location_id ⇒ Object
Returns the value of attribute to_location_id.
7 8 9 |
# File 'app/services/spree_cm_commissioner/integrations/larryta/resources/booking_transaction.rb', line 7 def to_location_id @to_location_id end |
#to_location_name ⇒ Object
Returns the value of attribute to_location_name.
7 8 9 |
# File 'app/services/spree_cm_commissioner/integrations/larryta/resources/booking_transaction.rb', line 7 def to_location_name @to_location_name end |
#to_location_name_kh ⇒ Object
Returns the value of attribute to_location_name_kh.
7 8 9 |
# File 'app/services/spree_cm_commissioner/integrations/larryta/resources/booking_transaction.rb', line 7 def to_location_name_kh @to_location_name_kh end |
#total_amount ⇒ Object
Returns the value of attribute total_amount.
7 8 9 |
# File 'app/services/spree_cm_commissioner/integrations/larryta/resources/booking_transaction.rb', line 7 def total_amount @total_amount end |
#total_bonus ⇒ Object
Returns the value of attribute total_bonus.
7 8 9 |
# File 'app/services/spree_cm_commissioner/integrations/larryta/resources/booking_transaction.rb', line 7 def total_bonus @total_bonus end |
#total_commission ⇒ Object
Returns the value of attribute total_commission.
7 8 9 |
# File 'app/services/spree_cm_commissioner/integrations/larryta/resources/booking_transaction.rb', line 7 def total_commission @total_commission end |
#total_discount ⇒ Object
Returns the value of attribute total_discount.
7 8 9 |
# File 'app/services/spree_cm_commissioner/integrations/larryta/resources/booking_transaction.rb', line 7 def total_discount @total_discount end |
#total_fee_charge ⇒ Object
Returns the value of attribute total_fee_charge.
7 8 9 |
# File 'app/services/spree_cm_commissioner/integrations/larryta/resources/booking_transaction.rb', line 7 def total_fee_charge @total_fee_charge end |
#total_net_price ⇒ Object
Returns the value of attribute total_net_price.
7 8 9 |
# File 'app/services/spree_cm_commissioner/integrations/larryta/resources/booking_transaction.rb', line 7 def total_net_price @total_net_price end |
#total_seat ⇒ Object
Returns the value of attribute total_seat.
7 8 9 |
# File 'app/services/spree_cm_commissioner/integrations/larryta/resources/booking_transaction.rb', line 7 def total_seat @total_seat end |
#travel_time ⇒ Object
Direction info
32 33 34 |
# File 'app/services/spree_cm_commissioner/integrations/larryta/resources/booking_transaction.rb', line 32 def travel_time @travel_time end |
#unit_price ⇒ Object
Returns the value of attribute unit_price.
7 8 9 |
# File 'app/services/spree_cm_commissioner/integrations/larryta/resources/booking_transaction.rb', line 7 def unit_price @unit_price end |
Instance Method Details
#id ⇒ Object
Returns the booking ID
123 124 125 |
# File 'app/services/spree_cm_commissioner/integrations/larryta/resources/booking_transaction.rb', line 123 def id booking_code end |
#pricing_summary ⇒ Object
Returns pricing summary
138 139 140 141 142 143 144 145 146 147 |
# File 'app/services/spree_cm_commissioner/integrations/larryta/resources/booking_transaction.rb', line 138 def pricing_summary { unit_price: unit_price, total_amount: total_amount, total_discount: total_discount, total_commission: total_commission, total_net_price: total_net_price, currency: 'KHR' } end |
#seat_numbers ⇒ Object
Returns the seat number as an array
133 134 135 |
# File 'app/services/spree_cm_commissioner/integrations/larryta/resources/booking_transaction.rb', line 133 def seat_numbers seat_nums.to_s.split(',').map(&:strip) end |
#success? ⇒ Boolean
Returns true if the transaction was successful
128 129 130 |
# File 'app/services/spree_cm_commissioner/integrations/larryta/resources/booking_transaction.rb', line 128 def success? status == true end |
#to_h ⇒ Object
Returns a hash representation
150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 |
# File 'app/services/spree_cm_commissioner/integrations/larryta/resources/booking_transaction.rb', line 150 def to_h # rubocop:disable Metrics/AbcSize { id: id, session_token: session_token, booking_code: booking_code, unit_price: unit_price, payment_type: payment_type, customer_id: customer_id, payment_id: payment_id, direction_id: direction_id, booking_date: booking_date, departure_date: departure_date, pay_date: pay_date, remark: remark, seat_nums: seat_nums, seat_numbers: seat_numbers, total_seat: total_seat, total_amount: total_amount, total_discount: total_discount, total_commission: total_commission, total_bonus: total_bonus, total_net_price: total_net_price, total_fee_charge: total_fee_charge, reseller_by: reseller_by, release_by: release_by, status: status, success: success?, message: msg, pricing: pricing_summary, customer: { full_name: customer_full_name, phone: customer_phone, email: customer_email, country_code: customer_country_code, total_ending_point: customer_total_ending_point }, booking_by: { account_name: booking_by_account_name, user_branch: booking_by_user_branch, contact_name: booking_by_contact_name, contact_phone: booking_by_contact_phone, contact_email: booking_by_contact_email, user_permission: , user_location: booking_by_user_location }, reseller: { account_name: reseller_account_name, user_branch: reseller_user_branch, contact_name: reseller_contact_name, contact_phone: reseller_contact_phone, contact_email: reseller_contact_email, user_permission: , user_location: reseller_user_location }, release: { account_name: release_account_name, user_branch: release_user_branch, contact_name: release_contact_name, contact_phone: release_contact_phone, contact_email: release_contact_email, user_permission: , user_location: release_user_location }, direction: { direction_id: direction_id, from_location_id: from_location_id, to_location_id: to_location_id, travel_time: travel_time, dire_code: dire_code, dire_remark: dire_remark, from_location: { location_id: from_location_id, loca_name: from_location_name, loca_name_kh: from_location_name_kh, loca_code: from_location_code }, to_location: { location_id: to_location_id, loca_name: to_location_name, loca_name_kh: to_location_name_kh, loca_code: to_location_code } } } end |