- create ExternalServiceHost(also available on operation/en/external_service_hosts/new):
ExternalServiceHost.new(
host_type: ExternalServiceHost.host_types[:test],
url: "http://127.0.0.1:1995/?wsdl",
verification_attributes: {"tns:licenseCode"=>"CODE"},
service_type: ExternalServiceHost.service_types[:sdm],
enabled: true,
name: "CHOOSE UNIQ NAME"
).save
- link restaurants to hosts from
operation/en/external_service_hosts/XXX
- get(fetch) cities and districts form SDM:
rake sdm_sdk:get_locations
- link HS cities to SDM host's cities from operation:
operation/en/countries/1
- link HS locals to SDM host's districts from operation:
operation/en/cities/XXX
- create ExternalServiceData for restaurants:
the_RESTAURANT.create_external_service_data(
external_attributes: {"concept_id" => 1},
external_service_host_id: the_RESTAURANT.external_service_host_id
)
- get(fetch) stores from SDM:
- link HS branches to SDM host's stores from operation:
operation/en/restaurants/XXX
- sync branch's menu from operation:
operation/en/branches/XXX/menu
- choose the variables for syncing menu carefully:
conceptID
, menuTemplateId
and menuID
- some flags must be set for sdm service:
Rails.application.secrets.sdm_national_id