Skip to content

kmelodi/EasyBimehLanding_Ruby

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Getting started

EasyBimehConnect

یک ساب برند از ایزی بیمه است که وظیفه ارائه خدمات

B2B و B2B2C

را برپایه وب سرویس و وایت لیبل بر عهده دارد. اگر اپلیکیشن و یا سایت غیر بیمه‌ای دارید و تمایل به فروش بیمه نامه دارید از امروز میتوانید با کمترین هزینه و کمترین زمان به زنجیره نوآوری در صنعت بیمه متصل شوید و تجارت جدیدی بسازید

به دلیل گستردگی پروژه و برای دسترسی بهتر، این پروژه به بخش های مختلف تقسیم شده است

و هر بخش در 10 پلتفرم مختلف، ارایه شده است

در این بخش، به وب سرویس های مربوط به صفحه ی لندینگ مرکز بیمه، دسترسی خواهید داشت که

اطلاعات هر پلتفرم را میتوانید بصورت تجمیعی در آدرس زیر مشاهده نمایید

https://www.apimatic.io/apidocs/easybimehlanding

و یا بصورت مجزا در آدرس های زیر قابل درسترس می باشند

1- Android: https://github.com/kmelodi/EasyBimehLanding_Android

2- .Net: https://github.com/kmelodi/EasyBimehLanding_.NET

3- Ios: https://github.com/kmelodi/EasyBimehLanding_IOS

4- Java: https://github.com/kmelodi/EasyBimehLanding_JAVA

5- Php: https://github.com/kmelodi/EasyBimehLanding_PHP

6- Python: https://github.com/kmelodi/EasyBimehLanding_Python

7- Ruby: https://github.com/kmelodi/EasyBimehLanding_Ruby

8- Angular: https://github.com/kmelodi/EasyBimehLanding_Angular

9- NodeJs: https://github.com/kmelodi/EasyBimehLanding_NodeJs

10- Go: https://github.com/kmelodi/EasyBimehLanding_Go

برای اطلاعات بیشتر به آدرس زیر مراجعه نمایید

https://easybimeh.com/ebconnect

How to Build

This client library is a Ruby gem which can be compiled and used in your Ruby and Ruby on Rails project. This library requires a few gems from the RubyGems repository.

  1. Open the command line interface or the terminal and navigate to the folder containing the source code.
  2. Run gem build easy_bimeh_landing.gemspec to build the gem.
  3. Once built, the gem can be installed on the current work environment using gem install easy_bimeh_landing-1.0.1.gem

Building Gem

How to Use

The following section explains how to use the EasyBimehLanding Ruby Gem in a new Rails project using RubyMine™. The basic workflow presented here is also applicable if you prefer using a different editor or IDE.

1. Starting a new project

Close any existing projects in RubyMine™ by selecting File -> Close Project. Next, click on Create New Project to create a new project from scratch.

Create a new project in RubyMine

Next, provide TestApp as the project name, choose Rails Application as the project type, and click OK.

Create a new Rails Application in RubyMine - step 1

In the next dialog make sure that correct Ruby SDK is being used (minimum 2.0.0) and click OK.

Create a new Rails Application in RubyMine - step 2

This will create a new Rails Application project with an existing set of files and folder.

2. Add reference of the gem

In order to use the EasyBimehLanding gem in the new project we must add a gem reference. Locate the Gemfile in the Project Explorer window under the TestApp project node. The file contains references to all gems being used in the project. Here, add the reference to the library gem by adding the following line: gem 'easy_bimeh_landing', '~> 1.0.1'

Add references of the Gemfile

3. Adding a new Rails Controller

Once the TestApp project is created, a folder named controllers will be visible in the Project Explorer under the following path: TestApp > app > controllers. Right click on this folder and select New -> Run Rails Generator....

Run Rails Generator on Controllers Folder

Selecting the said option will popup a small window where the generator names are displayed. Here, select the controller template.

Create a new Controller

Next, a popup window will ask you for a Controller name and included Actions. For controller name provide Hello and include an action named Index and click OK.

Add a new Controller

A new controller class anmed HelloController will be created in a file named hello_controller.rb containing a method named Index. In this method, add code for initialization and a sample for its usage.

Initialize the library

How to Test

You can test the generated SDK and the server with automatically generated test cases as follows:

  1. From terminal/cmd navigate to the root directory of the SDK.
  2. Invoke: bundle exec rake

Initialization

API client can be initialized as following.

client = EasyBimehLanding::EasyBimehLandingClient.new

The added initlization code can be debugged by putting a breakpoint in the Index method and running the project in debug mode by selecting Run -> Debug 'Development: TestApp'.

Debug the TestApp

Class Reference

List of Controllers

Class: FileManagerController

Get singleton instance

The singleton instance of the FileManagerController class can be accessed from the API Client.

fileManager_controller = client.file_manager

Method: upload

آپلود فایل در ایزی بیمه بعد از آپلود، ادرس فایل باید در api های بعدی ارسال شود.

def upload(sub_domain,
               x_api_key,
               file); end

Parameters

Parameter Tags Description
sub_domain Required دامنه یا زیر دامنه ی مرکز بیمه
x_api_key Required کلید اختصاصی ارتباط با سرور
file Required فایل ارسالی

Example Usage

sub_domain = 'hfz1'
x_api_key = 'd6dfd932-75d8-e911-811a-000c294ecf01'
file = 'file'

result = fileManager_controller.upload(sub_domain, x_api_key, file)

Back to List of Controllers

Class: LiabilityDoctorInsuranceController

Get singleton instance

The singleton instance of the LiabilityDoctorInsuranceController class can be accessed from the API Client.

liabilityDoctorInsurance_controller = client.liability_doctor_insurance

Method: get_liability_doctor_insurance

در یافت اطلاعات اولیه برای استعلام بیمه مسئولیت پزشکان

def get_liability_doctor_insurance(sub_domain,
                                       x_api_key); end

Parameters

Parameter Tags Description
sub_domain Required دامنه یا زیر دامنه ی مرکز بیمه
x_api_key Required کلید اختصاصی ارتباط با سرور

Example Usage

sub_domain = 'hfz1'
x_api_key = 'd6dfd932-75d8-e911-811a-000c294ecf01'

result = liabilityDoctorInsurance_controller.get_liability_doctor_insurance(sub_domain, x_api_key)

Method: get_medical_specialties

دریافت لیست تخصص های پزشکی

def get_medical_specialties(id,
                                x_api_key); end

Parameters

Parameter Tags Description
id Required نوع تخصص => ParamedicalExpertise => پیراپزشکی MedicalExpertise => پزشکی
x_api_key Required کلید اختصاصی ارتباط با سرور

Example Usage

id = 'ParamedicalExpertise'
x_api_key = 'd6dfd932-75d8-e911-811a-000c294ecf01'

result = liabilityDoctorInsurance_controller.get_medical_specialties(id, x_api_key)

Back to List of Controllers

Class: CarBodyController

Get singleton instance

The singleton instance of the CarBodyController class can be accessed from the API Client.

carBody_controller = client.car_body

Method: get_car_brand

دریافت برند خودرو

def get_car_brand(x_api_key); end

Parameters

Parameter Tags Description
x_api_key Required شناسه ی اختصاصی ارتباط با سرور

Example Usage

x_api_key = 'd6dfd932-75d8-e911-811a-000c294ecf01'

result = carBody_controller.get_car_brand(x_api_key)

Method: get_car_brand_tips

دریافت لیست تیپ خودرو

def get_car_brand_tips(car_brand_id,
                           x_api_key); end

Parameters

Parameter Tags Description
car_brand_id Required شناسه ی برند خودرو
x_api_key Required کلید اختصاصی ارتباط با سرور

Example Usage

car_brand_id = 190
x_api_key = 'd6dfd932-75d8-e911-811a-000c294ecf01'

result = carBody_controller.get_car_brand_tips(car_brand_id, x_api_key)

Method: get_has_plan

آیا این نوع بیمه نامه، طرح بیمه ای دارد؟

def get_has_plan(sub_domain,
                     insurance_policy_type,
                     x_api_key); end

Parameters

Parameter Tags Description
sub_domain Required دامنه یا زیر دامنه ی مرکز بیمه
insurance_policy_type Required شناسه ی نوع بیمه نامه => بیمه بدنه=2
x_api_key Required کلید اختصاصی ارتباط با سرور

Example Usage

sub_domain = 'hfz1'
insurance_policy_type = 2
x_api_key = 'd6dfd932-75d8-e911-811a-000c294ecf01'

result = carBody_controller.get_has_plan(sub_domain, insurance_policy_type, x_api_key)

Back to List of Controllers

Class: ElectronicEquipmentInsuranceController

Get singleton instance

The singleton instance of the ElectronicEquipmentInsuranceController class can be accessed from the API Client.

electronicEquipmentInsurance_controller = client.electronic_equipment_insurance

Method: get_electronic_equipment_insurance

دریافت اطلاعات اولیه استعلام بیمه نامه ی تجهیزات الکترونیک

def get_electronic_equipment_insurance(sub_domain,
                                           x_api_key); end

Parameters

Parameter Tags Description
sub_domain Required دامنه یا زیر دامنه ی مرکز بیمه
x_api_key Required کلید اختصاصی ارتباط با سرور

Example Usage

sub_domain = 'subDomain'
x_api_key = 'x-api-key'

result = electronicEquipmentInsurance_controller.get_electronic_equipment_insurance(sub_domain, x_api_key)

Method: get_device_brand_types

دریافت لیست نوع برند دستگاه

def get_device_brand_types(device_group,
                               device_type_id,
                               x_api_key); end

Parameters

Parameter Tags Description
device_group Required شناسه ی گروه دستگاه
device_type_id Required شناسه ی نوع دستگاه
x_api_key Required کلید اختصاصی ارتباط با سرور

Example Usage

device_group = 1
device_type_id = 1
x_api_key = 'd6dfd932-75d8-e911-811a-000c294ecf01'

result = electronicEquipmentInsurance_controller.get_device_brand_types(device_group, device_type_id, x_api_key)

Method: get_divice_franchisee

دریافت لیست فرانشیر استعلام بیمه نامه ی تجهیزات الکترونیک

def get_divice_franchisee(device_model_id,
                              x_api_key); end

Parameters

Parameter Tags Description
device_model_id Required شناسه ی مدل دستگاه
x_api_key Required کلید اختصاصی ارتباط با سرور

Example Usage

device_model_id = 1340
x_api_key = 'd6dfd932-75d8-e911-811a-000c294ecf01'

result = electronicEquipmentInsurance_controller.get_divice_franchisee(device_model_id, x_api_key)

Back to List of Controllers

Class: OtherInsuranceTypesController

Get singleton instance

The singleton instance of the OtherInsuranceTypesController class can be accessed from the API Client.

otherInsuranceTypes_controller = client.other_insurance_types

Method: get_other_insurance_types

دریافت لیست سایر بیمه نامه ها

def get_other_insurance_types(sub_domain,
                                  x_api_key); end

Parameters

Parameter Tags Description
sub_domain Required دامنه یا زیر دامنه ی مرکز بیمه
x_api_key Required کلید اختصاصی ارتباط با سرور

Example Usage

sub_domain = 'hfz1'
x_api_key = 'd6dfd932-75d8-e911-811a-000c294ecf01'

result = otherInsuranceTypes_controller.get_other_insurance_types(sub_domain, x_api_key)

Method: get_send_sms_token

ارسال توکن تایید شماره تماس، برای احراز هویت کاربر

def get_send_sms_token(mobile,
                           insurance_centre_sub_domain,
                           x_api_key); end

Parameters

Parameter Tags Description
mobile Required شماره موبایل
insurance_centre_sub_domain Required دامنه یا زیردامنه ی مرکز بیمه
x_api_key Required کلید اختصاصی ارتباط با سرور

Example Usage

mobile = '09018318086'
insurance_centre_sub_domain = 'hfz1'
x_api_key = 'd6dfd932-75d8-e911-811a-000c294ecf01'

result = otherInsuranceTypes_controller.get_send_sms_token(mobile, insurance_centre_sub_domain, x_api_key)

Method: get_verify_sms_token

تایید توکن پیامک شده به کاربر، برای احراز هویت

def get_verify_sms_token(mobile,
                             token,
                             insurance_centre_sub_domain,
                             alias_name,
                             resource,
                             x_api_key); end

Parameters

Parameter Tags Description
mobile Required شماره موبایل
token Required توکن دریافتی کاربر از پیامک
insurance_centre_sub_domain Required دامنه یا زیر دامنه ی اختصاصی مرکز بیمه
alias_name Required نام و نام خانوادگی کاربر
resource Required دامنه ی درخواست دهنده
x_api_key Required کلید اختصاصی ارتباط با سرور

Example Usage

mobile = '09018318086'
token = 27763
insurance_centre_sub_domain = 'hfz1'
alias_name = 'علی موسوی'
resource = 'https://hfz1.easybimeh.com'
x_api_key = 'd6dfd932-75d8-e911-811a-000c294ecf01'

result = otherInsuranceTypes_controller.get_verify_sms_token(mobile, token, insurance_centre_sub_domain, alias_name, resource, x_api_key)

Errors

Error Code Error Description
400 Bad Request

Back to List of Controllers

Class: ThirdPartyInsuranceController

Get singleton instance

The singleton instance of the ThirdPartyInsuranceController class can be accessed from the API Client.

thirdPartyInsurance_controller = client.third_party_insurance

Method: get_car_brands

دریافت لیست برند خودرو ها

def get_car_brands(car_type_group,
                       x_api_key); end

Parameters

Parameter Tags Description
car_type_group Required شناسه ی گروه خودرو
x_api_key Required کلید اختصاصی ارتباط با سرور

Example Usage

car_type_group = 1
x_api_key = 'd6dfd932-75d8-e911-811a-000c294ecf01'

result = thirdPartyInsurance_controller.get_car_brands(car_type_group, x_api_key)

Method: get_risk_level

دریافت لیست تخفیف های بیمه

def get_risk_level(insurance_policy_type,
                       x_api_key); end

Parameters

Parameter Tags Description
insurance_policy_type Required شناسه ی نوع بیمه نامه
x_api_key Required کلید اختصاصی ارتباط با سرور

Example Usage

insurance_policy_type = 0
x_api_key = 'd6dfd932-75d8-e911-811a-000c294ecf01'

result = thirdPartyInsurance_controller.get_risk_level(insurance_policy_type, x_api_key)

Method: get_car_brand_tips

دریافت لیست تیپ خودرو

def get_car_brand_tips(car_brand_id,
                           x_api_key); end

Parameters

Parameter Tags Description
car_brand_id Required شناسه ی برند خودرو
x_api_key Required کلید اختصاصی ارتباط با سرور

Example Usage

car_brand_id = 190
x_api_key = 'd6dfd932-75d8-e911-811a-000c294ecf01'

result = thirdPartyInsurance_controller.get_car_brand_tips(car_brand_id, x_api_key)

Method: get_car_uses

دریافت لیست نوع کاربری خودرو

def get_car_uses(car_type_id,
                     x_api_key); end

Parameters

Parameter Tags Description
car_type_id Required شناسه ی نوع خودرو
x_api_key Required کلید اختصاصی ارتباط با سرور

Example Usage

car_type_id = 103
x_api_key = 'd6dfd932-75d8-e911-811a-000c294ecf01'

result = thirdPartyInsurance_controller.get_car_uses(car_type_id, x_api_key)

Method: get_has_plan

آیا این نوع بیمه نامه، طرح بیمه ای دارد؟

def get_has_plan(sub_domain,
                     insurance_policy_type,
                     x_api_key); end

Parameters

Parameter Tags Description
sub_domain Required دامنه یا زیر دامنه ی مرکز بیمه
insurance_policy_type Required شناسه ی نوع بیمه
x_api_key Required کلید اختصاصی ارتباط با سرور

Example Usage

sub_domain = 'hfz1'
insurance_policy_type = 0
x_api_key = 'd6dfd932-75d8-e911-811a-000c294ecf01'

result = thirdPartyInsurance_controller.get_has_plan(sub_domain, insurance_policy_type, x_api_key)

Back to List of Controllers

Class: MotorcycleInsuranceController

Get singleton instance

The singleton instance of the MotorcycleInsuranceController class can be accessed from the API Client.

motorcycleInsurance_controller = client.motorcycle_insurance

Method: get_car_brands

دریافت لیست برند موتور سیکلت

def get_car_brands(car_type_group,
                       x_api_key); end

Parameters

Parameter Tags Description
car_type_group Required شناسه ی گروه خودرویی، موتور سیکلت =>0
x_api_key Required کلید اختصاصی ارتباط با سرور

Example Usage

car_type_group = 0
x_api_key = 'd6dfd932-75d8-e911-811a-000c294ecf01'

result = motorcycleInsurance_controller.get_car_brands(car_type_group, x_api_key)

Method: get_car_brand_tips

دریافت لیست تیپ موتور سیکلت

def get_car_brand_tips(car_brand_id,
                           x_api_key); end

Parameters

Parameter Tags Description
car_brand_id Required شناسه ی برند موتور سیکلت
x_api_key Required کلید اختصاصی ارتباط با سرور

Example Usage

car_brand_id = 472
x_api_key = 'd6dfd932-75d8-e911-811a-000c294ecf01'

result = motorcycleInsurance_controller.get_car_brand_tips(car_brand_id, x_api_key)

Method: get_has_plan

آیا این نوع بیمه نامه، طرح بیمه ای دارد؟

def get_has_plan(sub_domain,
                     insurance_policy_type,
                     x_api_key); end

Parameters

Parameter Tags Description
sub_domain Required دامنه یا زیر دامنه ی مرکز بیمه
insurance_policy_type Required شناسه ی نوع بیمه نامه
x_api_key Required کلید اختصاصی ارتباط با سرور

Example Usage

sub_domain = 'hfz1'
insurance_policy_type = 7
x_api_key = 'd6dfd932-75d8-e911-811a-000c294ecf01'

result = motorcycleInsurance_controller.get_has_plan(sub_domain, insurance_policy_type, x_api_key)

Back to List of Controllers

Class: FireInsuranceController

Get singleton instance

The singleton instance of the FireInsuranceController class can be accessed from the API Client.

fireInsurance_controller = client.fire_insurance

Method: get_fire_insurance

دریافت اطلاعات پایه بیمه ی آتش سوزی

def get_fire_insurance(sub_domain,
                           insurance_policy_id,
                           x_api_key); end

Parameters

Parameter Tags Description
sub_domain Required دامنه یا زیر دامنه ی مرکز بیمه
insurance_policy_id Required شناسه ی بیمه نامه
x_api_key Required کلید اختصاصی ارتباط با سرور

Example Usage

sub_domain = 'hfz1'
insurance_policy_id = 0
x_api_key = 'd6dfd932-75d8-e911-811a-000c294ecf01'

result = fireInsurance_controller.get_fire_insurance(sub_domain, insurance_policy_id, x_api_key)

Back to List of Controllers

Class: EarthquakeInsuranceController

Get singleton instance

The singleton instance of the EarthquakeInsuranceController class can be accessed from the API Client.

earthquakeInsurance_controller = client.earthquake_insurance

Method: get_earthquake

دریافت اطلاعات پایه ی بیمه ی زلزله

def get_earthquake(sub_domain,
                       insurance_policy_id,
                       insurance_policy_type,
                       x_api_key); end

Parameters

Parameter Tags Description
sub_domain Required دامنه یا زیر دامنه ی مرکز بیمه
insurance_policy_id Required شناسه ی بیمه نامه
insurance_policy_type Required شناسه ی نوع بیمه نامه
x_api_key Required کلید اختصاصی ارتباط با سرور

Example Usage

sub_domain = 'hfz1'
insurance_policy_id = 0
insurance_policy_type = 6
x_api_key = 'd6dfd932-75d8-e911-811a-000c294ecf01'

result = earthquakeInsurance_controller.get_earthquake(sub_domain, insurance_policy_id, insurance_policy_type, x_api_key)

Back to List of Controllers

Class: TravelInsuranceController

Get singleton instance

The singleton instance of the TravelInsuranceController class can be accessed from the API Client.

travelInsurance_controller = client.travel_insurance

Method: get_travel_insurance

TODO: Add Description

def get_travel_insurance(sub_domain,
                             insurance_policy_id,
                             x_api_key); end

Parameters

Parameter Tags Description
sub_domain Required دامنه یا زیر دامنه ی مرکز بیمه
insurance_policy_id Required شناسه ی بیمه نامه
x_api_key Required کلید اختصاصی ارتباط با سرور

Example Usage

sub_domain = 'hfz1'
insurance_policy_id = 0
x_api_key = 'd6dfd932-75d8-e911-811a-000c294ecf01'

result = travelInsurance_controller.get_travel_insurance(sub_domain, insurance_policy_id, x_api_key)

Back to List of Controllers

Class: ElevatorInsuranceController

Get singleton instance

The singleton instance of the ElevatorInsuranceController class can be accessed from the API Client.

elevatorInsurance_controller = client.elevator_insurance

Method: get_elevator_insurance

دریافت اطلاعات پایه ی بیمه نامه ی آسانسور

def get_elevator_insurance(sub_domain,
                               insurance_policy_id,
                               x_api_key); end

Parameters

Parameter Tags Description
sub_domain Required دامنه یا زیر دامنه ی مرکز بیمه
insurance_policy_id Required شناسه ی بیمه نامه
x_api_key Required کلید اختصاصی ارتباط با سرور

Example Usage

sub_domain = 'hfz1'
insurance_policy_id = 0
x_api_key = 'd6dfd932-75d8-e911-811a-000c294ecf01'

result = elevatorInsurance_controller.get_elevator_insurance(sub_domain, insurance_policy_id, x_api_key)

Back to List of Controllers

Class: MainController

Get singleton instance

The singleton instance of the MainController class can be accessed from the API Client.

main_controller = client.main

Method: get_portal_landing_page

در یافت اطلاعات لندینگ مراکز بیمه

def get_portal_landing_page(id,
                                x_api_key); end

Parameters

Parameter Tags Description
id Required دامنه یا زیر دامنه ی مرکز بیمه
x_api_key Required کلید اختصاصی ارتباط با سرور

Example Usage

id = 'hfz1'
x_api_key = 'd6dfd932-75d8-e911-811a-000c294ecf01'

result = main_controller.get_portal_landing_page(id, x_api_key)

Method: get_insurance_centre_policy_types

دریافت لیست بیمه ی های ارائه شده توسط مرکز بیمه

def get_insurance_centre_policy_types(sub_domain,
                                          x_api_key); end

Parameters

Parameter Tags Description
sub_domain Required دامنه یا زیر دامنه ی مرکز بیمه
x_api_key Required کلید اختصاصی ارتباط با سرور

Example Usage

sub_domain = 'hfz1'
x_api_key = 'd6dfd932-75d8-e911-811a-000c294ecf01'

result = main_controller.get_insurance_centre_policy_types(sub_domain, x_api_key)

Back to List of Controllers

Class: ComboDataController

Get singleton instance

The singleton instance of the ComboDataController class can be accessed from the API Client.

comboData_controller = client.combo_data

Method: get_damage_type

دریافت لیست نوع خسارت

def get_damage_type(x_api_key); end

Parameters

Parameter Tags Description
x_api_key Required کلید اختصاصی ارتباط با سرور

Example Usage

x_api_key = 'd6dfd932-75d8-e911-811a-000c294ecf01'

result = comboData_controller.get_damage_type(x_api_key)

Method: get_insurance_types

دریافت لیست نوع بیمه نامه

def get_insurance_types(sub_domain,
                            issue_insurance,
                            x_api_key); end

Parameters

Parameter Tags Description
sub_domain Required دامنه یا زیر دامنه ی مرکز بیمه
issue_insurance Required دریافت بیمه نامه های قابل صدور
x_api_key Required کلید اختصاصی ارتباط با سرور

Example Usage

sub_domain = 'hfz1'
issue_insurance = false
x_api_key = 'd6dfd932-75d8-e911-811a-000c294ecf01'

result = comboData_controller.get_insurance_types(sub_domain, issue_insurance, x_api_key)

Method: get_insurance_companies

دریافت لیست شرکت های بیمه

def get_insurance_companies(sub_domain,
                                insurance_type_id,
                                x_api_key); end

Parameters

Parameter Tags Description
sub_domain Required دامنه یا زیر دامنه ی مرکز بیمه
insurance_type_id Required شناسه ی نوع بیمه نامه
x_api_key Required کلید اختصاصی ارتباط با سرور

Example Usage

sub_domain = 'hfz1'
insurance_type_id = 1
x_api_key = 'd6dfd932-75d8-e911-811a-000c294ecf01'

result = comboData_controller.get_insurance_companies(sub_domain, insurance_type_id, x_api_key)

Back to List of Controllers

Class: TrackingDamageController

Get singleton instance

The singleton instance of the TrackingDamageController class can be accessed from the API Client.

trackingDamage_controller = client.tracking_damage

Method: get_tracking_code

استعلام وضعیت خسارت

def get_tracking_code(tracking_code,
                          x_api_key); end

Parameters

Parameter Tags Description
tracking_code Required کد پیگیری خسارت
x_api_key Required کلید اختصاصی ارتباط با سرور

Example Usage

tracking_code = '/{TrackingCode}'
x_api_key = 'd6dfd932-75d8-e911-811a-000c294ecf01'

result = trackingDamage_controller.get_tracking_code(tracking_code, x_api_key)

Errors

Error Code Error Description
400 Bad Request

Method: create_tracking_damage

ثبت خسارت بیمه

def create_tracking_damage(body,
                               x_api_key,
                               content_type); end

Parameters

Parameter Tags Description
body Required اطلاعات خسارت
x_api_key Required کلید اختصاصی ارتباط با سرور
content_type Required TODO: Add a parameter description

Example Usage

body_value = "{\r\n  \"personalityType\": 0,\r\n  \"trackingDamageStatus\": [\r\n    {\r\n      \"trackingDamageFile\": [\r\n        {\r\n          \"id\": 162747,\r\n          \"url\": \"https://media.easybimeh.com//Easybimeh/FileManager/InsuranceCentre/hfz1/637089119345134776.jpeg\",\r\n          \"title\": \"کارت شناسایی\"\r\n        }\r\n      ]\r\n    }\r\n  ],\r\n  \"description\": \"بدنه ی خودرو خسارت دیده\",\r\n  \"insuranceTypeId\": 1,\r\n  \"insuranceCompanyId\": 34,\r\n  \"insurancePolicyNumber\": \"123456\",\r\n  \"damageType\": \"مالی\",\r\n  \"name\": \"کاظم\",\r\n  \"nationalCode\": \"3080118383\",\r\n  \"mobile\": \"09018318086\",\r\n  \"insuredProfile\": \"پژو 405\",\r\n  \"subDomain\": \"hfz1\"\r\n}";
body = JSON.parse(body_value);
x_api_key = 'd6dfd932-75d8-e911-811a-000c294ecf01'
content_type = 'application/json'

result = trackingDamage_controller.create_tracking_damage(body, x_api_key, content_type)

Method: get_status_status_collections

دریافت لیست وضعیت های خسارت

def get_status_status_collections(status_type,
                                      x_api_key); end

Parameters

Parameter Tags Description
status_type Required نوع وضعیت ها ی خسارت => 0
x_api_key Required کلید اختصاصی ارتباط با سرور

Example Usage

status_type = 0
x_api_key = 'd6dfd932-75d8-e911-811a-000c294ecf01'

result = trackingDamage_controller.get_status_status_collections(status_type, x_api_key)

Method: get_status

دریافت اطلاعات وضعیت

def get_status(entity_id,
                   x_api_key); end

Parameters

Parameter Tags Description
entity_id Required شناسه ی وضعیت
x_api_key Required کلید اختصاصی ارتباط با سرور

Example Usage

entity_id = 1129
x_api_key = 'd6dfd932-75d8-e911-811a-000c294ecf01'

result = trackingDamage_controller.get_status(entity_id, x_api_key)

Back to List of Controllers

Class: FooterController

Get singleton instance

The singleton instance of the FooterController class can be accessed from the API Client.

footer_controller = client.footer

Method: get_portal_landing_contact_about

دریافت اطلاعات درباره ی ما

def get_portal_landing_contact_about(x_api_key); end

Parameters

Parameter Tags Description
x_api_key Required TODO: Add a parameter description

Example Usage

x_api_key = 'd6dfd932-75d8-e911-811a-000c294ecf01'

result = footer_controller.get_portal_landing_contact_about(x_api_key)

Method: get_faq_insurance_centre

دریافت لیست سوالات متداول

def get_faq_insurance_centre(x_api_key); end

Parameters

Parameter Tags Description
x_api_key Required کلید اختصاصی ارتباط با سرور

Example Usage

x_api_key = 'd6dfd932-75d8-e911-811a-000c294ecf01'

result = footer_controller.get_faq_insurance_centre(x_api_key)

Method: get_insurance_policy_tracking

پیگیری وضعیت بیمه نامه

def get_insurance_policy_tracking(tracking_code,
                                      national_code,
                                      x_api_key); end

Parameters

Parameter Tags Description
tracking_code Required شماره ی پیگیری بیمه نامه
national_code Required کد ملی کاربر
x_api_key Required کلید اختصاصی ارتباط با سرور

Example Usage

tracking_code = 213981083
national_code = 3080115309
x_api_key = 'd6dfd932-75d8-e911-811a-000c294ecf01'

result = footer_controller.get_insurance_policy_tracking(tracking_code, national_code, x_api_key)

Errors

Error Code Error Description
500 Internal Server Error

Back to List of Controllers

Class: InsurancePolicyPlanController

Get singleton instance

The singleton instance of the InsurancePolicyPlanController class can be accessed from the API Client.

insurancePolicyPlan_controller = client.insurance_policy_plan

Method: get_special_plan

دریافت لیست طرح های بیمه ای

def get_special_plan(sub_domain,
                         x_api_key); end

Parameters

Parameter Tags Description
sub_domain Required دامنه یا زیر دامنه ی مرکز بیمه
x_api_key Required کلید اختصاصی ارتباط با سرور

Example Usage

sub_domain = 'hfz1'
x_api_key = 'd6dfd932-75d8-e911-811a-000c294ecf01'

result = insurancePolicyPlan_controller.get_special_plan(sub_domain, x_api_key)

Back to List of Controllers

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages