gsa_client/
lib.rs

1
2#[macro_use]
3extern crate jsonrpc_client_core;
4use serde::{Serialize, Deserialize};
5
6extern crate serde_json;
7
8pub type UserRole = String;
9pub type Email = String;
10pub type UserFirst = String;
11pub type UserLast = String;
12pub type UserStreet = String;
13pub type UserState = String;
14pub type UserZipcode = String;
15pub type UserCountry = String;
16pub type UserPhone = String;
17pub type UserCompany = String;
18pub type ResetPIN = f64;
19pub type Password = String;
20pub type JWTtoken = String;
21pub type SubType = String;
22pub type SubCost = String;
23pub type SubFreq = String;
24pub type SubStart = String;
25pub type SubRenew = String;
26pub type SellerID = String;
27pub type EmployeeID = String;
28pub type DeviceESN = String;
29pub type Columns = Vec<serde_json::Value>;
30pub type Columndata = Vec<serde_json::Value>;
31pub type DeviceType = String;
32pub type Simiccid = String;
33pub type AnetProfileId = String;
34pub type CcNumber = String;
35pub type CcExp = String;
36pub type CcCVC = String;
37pub type PaymentProfileId = String;
38pub type StringDoaGddGA = String;
39
40jsonrpc_client!(pub struct GSAAPI {
41  pub fn createUser(&mut self, userRole: UserRole, email: Email, userFirst: UserFirst, userLast: UserLast, userStreet: UserStreet, userCity: UserStreet, userState: UserState, userZipcode: UserZipcode, userCountry: UserCountry, userPhone: UserPhone, userCompany: UserCompany) -> RpcRequest<StringDoaGddGA>;
42pub fn createPassResetPin(&mut self, email: Email) -> RpcRequest<StringDoaGddGA>;
43pub fn setNewPassword(&mut self, email: Email, resetPIN: ResetPIN, password: Password) -> RpcRequest<StringDoaGddGA>;
44pub fn adminLogin(&mut self, email: Email, password: Password) -> RpcRequest<StringDoaGddGA>;
45pub fn getUsers(&mut self, JWTtoken: JWTtoken, email: Email) -> RpcRequest<StringDoaGddGA>;
46pub fn getSubscriptions(&mut self, JWTtoken: JWTtoken, email: Email) -> RpcRequest<StringDoaGddGA>;
47pub fn addSubscription(&mut self, JWTtoken: JWTtoken, email: Email, subType: SubType, subCost: SubCost, subFreq: SubFreq, subStart: SubStart, subRenew: SubRenew, sellerID: SellerID, employeeID: EmployeeID, deviceESN: DeviceESN) -> RpcRequest<StringDoaGddGA>;
48pub fn updateSubscriptionInfo(&mut self, JWTtoken: JWTtoken, email: Email, deviceESN: DeviceESN, columns: Columns, columndata: Columndata) -> RpcRequest<StringDoaGddGA>;
49pub fn addDevice(&mut self, JWTtoken: JWTtoken, email: Email, deviceESN: DeviceESN, deviceType: DeviceType, simiccid: Simiccid) -> RpcRequest<StringDoaGddGA>;
50pub fn getDevices(&mut self, JWTtoken: JWTtoken, email: Email) -> RpcRequest<StringDoaGddGA>;
51pub fn updateDeviceInfo(&mut self, JWTtoken: JWTtoken, email: Email, deviceESN: DeviceESN, columns: Columns, columndata: Columndata) -> RpcRequest<StringDoaGddGA>;
52pub fn podGetUsers(&mut self, JWTtoken: JWTtoken, email: Email) -> RpcRequest<StringDoaGddGA>;
53pub fn podGetSimInfo(&mut self, JWTtoken: JWTtoken, email: Email, simiccid: Simiccid) -> RpcRequest<StringDoaGddGA>;
54pub fn podTurnOnSim(&mut self, JWTtoken: JWTtoken, email: Email, simiccid: Simiccid) -> RpcRequest<StringDoaGddGA>;
55pub fn podSuspendSim(&mut self, JWTtoken: JWTtoken, email: Email, simiccid: Simiccid) -> RpcRequest<StringDoaGddGA>;
56pub fn podUnsuspendSim(&mut self, JWTtoken: JWTtoken, email: Email, simiccid: Simiccid) -> RpcRequest<StringDoaGddGA>;
57pub fn pulsGetDevice(&mut self, JWTtoken: JWTtoken, email: Email, deviceESN: DeviceESN) -> RpcRequest<StringDoaGddGA>;
58pub fn pulsChangeDeviceGroup(&mut self, JWTtoken: JWTtoken, email: Email, deviceESN: DeviceESN) -> RpcRequest<StringDoaGddGA>;
59pub fn authGetCustomerProfile(&mut self, JWTtoken: JWTtoken, email: Email, anetProfileId: AnetProfileId) -> RpcRequest<StringDoaGddGA>;
60pub fn createCustomerPaymentProfile(&mut self, JWTtoken: JWTtoken, email: Email, anetProfileId: AnetProfileId, userFirst: UserFirst, userLast: UserLast, userStreet: UserStreet, userCity: UserStreet, userState: UserState, userZipcode: UserZipcode, userCountry: UserCountry, userPhone: UserPhone, ccNumber: CcNumber, ccExp: CcExp, ccCVC: CcCVC) -> RpcRequest<StringDoaGddGA>;
61pub fn deleteCustomerPaymentProfile(&mut self, JWTtoken: JWTtoken, email: Email, anetProfileId: AnetProfileId, paymentProfileId: PaymentProfileId) -> RpcRequest<StringDoaGddGA>;
62});