lib/moneta/api/service_methods.rb in moneta-api-1.0.4 vs lib/moneta/api/service_methods.rb in moneta-api-1.1.0
- old
+ new
@@ -137,17 +137,42 @@
# @return [Moneta::Api::Responses::VerifyTransactionResponse]
def verify_transaction(request)
call(__method__, request)
end
+ # @param [Moneta::Api::Requests::CreateProfileRequest]
+ # @return [Moneta::Api::Responses::CreateProfileResponse]
+ def create_profile(request)
+ call(__method__, request)
+ end
+
+ # @param [Moneta::Api::Requests::EditProfileRequest]
+ # @return [Moneta::Api::Responses::EditProfileResponse]
+ def edit_profile(request)
+ call(__method__, request)
+ end
+
+ # @param [Moneta::Api::Requests::CreateBankAccountRequest]
+ # @return [Moneta::Api::Responses::CreateBankAccountResponse]
+ def create_bank_account(request)
+ call(__method__, request)
+ end
+
+ # @param [Moneta::Api::Requests::EditBankAccountRequest]
+ # @return [Moneta::Api::Responses::EditBankAccountResponse]
+ def edit_bank_account(request)
+ call(__method__, request)
+ end
+
private
def call(method, request)
validate!(method, request)
response = client.call(method, {
message: request.respond_to?(:to_hash) ? request.to_hash : request
})
+
ResponseFactory.build(response)
end
def validate!(method, request)
expected_request_class = get_expected_request_class(method)