Skip to content

Commit a0502de

Browse files
committed
WIP
1 parent 96ba48b commit a0502de

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

lib/cgrates/client.rb

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -131,34 +131,34 @@ def get_tp_rating_profile(tp_id:, load_id:, tenant:, category:, subject:)
131131
)
132132
end
133133

134-
def set_account(account_id:, tenant: nil, **)
134+
def set_account(account:, tenant: nil, **)
135135
api_request(
136136
"APIerSv2.SetAccount",
137137
{
138138
"Tenant" => tenant,
139-
"Account" => account_id,
139+
"Account" => account,
140140
**
141141
}
142142
)
143143
end
144144

145-
def get_account(account_id:, tenant: nil, **)
145+
def get_account(account:, tenant: nil, **)
146146
api_request(
147147
"APIerSv2.GetAccount",
148148
{
149149
"Tenant" => tenant,
150-
"Account" => account_id,
150+
"Account" => account,
151151
**
152152
}
153153
)
154154
end
155155

156-
def remove_account(account_id:, tenant: nil, **)
156+
def remove_account(account:, tenant: nil, **)
157157
api_request(
158158
"APIerSv1.RemoveAccount",
159159
{
160160
"Tenant" => tenant,
161-
"Account" => account_id,
161+
"Account" => account,
162162
**
163163
}
164164
)

spec/cgrates/client_spec.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,7 @@ module CGRateS
328328
client = build_client
329329

330330
stub_api_request(result: "OK")
331-
response = client.set_account(account_id: "sample-account-sid", tenant: "cgrates.org")
331+
response = client.set_account(account: "sample-account-sid", tenant: "cgrates.org")
332332

333333
expect(response).to have_attributes(result: "OK")
334334
expect(WebMock).to have_requested_api_method("APIerSv2.SetAccount")
@@ -347,7 +347,7 @@ module CGRateS
347347

348348
response = client.get_account(
349349
tenant: "cgrates.org",
350-
account_id: "sample-account-sid"
350+
account: "sample-account-sid"
351351
)
352352

353353
expect(response).to have_attributes(
@@ -359,7 +359,7 @@ module CGRateS
359359

360360
stub_api_request(result: "OK")
361361
response = client.remove_account(
362-
account_id: "sample-account-sid",
362+
account: "sample-account-sid",
363363
tenant: "cgrates.org"
364364
)
365365

0 commit comments

Comments
 (0)