Skip to content

Commit

Permalink
validate LatestOutBox
Browse files Browse the repository at this point in the history
  • Loading branch information
mm580486 committed Apr 30, 2016
1 parent bb9d7b2 commit 8f7e086
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
/.bundle/
/.yardoc
/.DS_Store
/.idea/
/Gemfile.lock
/_yardoc/
/coverage/
Expand Down
4 changes: 1 addition & 3 deletions lib/kave/response.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,17 +36,15 @@ def perform_validation
class ResponseLatestOutBox

attr_reader :response, :select

def validate(response = nil,send_latest_by)
@response = response
@send_simple_by=send_latest_by
perform_validation
return self
end


private
def perform_validation
raise ArgumentError, 'not a valid response' if @response.nil?
body =@response[:selectlatest_by_apikey_response]
@select = body[:selectlatest_by_apikey_result][:api_select]
end
Expand Down
2 changes: 1 addition & 1 deletion lib/kave/send_request.rb
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def call
else
:selectlatest_by_login_info
end

@pagesize=if @pagesize < 2;2;else;@pagesize;end
response = @wsdl.call :selectlatest_by_apikey, message: {
'apikey' =>Kave.configuration.api_key,
'pagesize'=>@pagesize.to_i,
Expand Down

0 comments on commit 8f7e086

Please sign in to comment.