betfair_api_ng_rails 0.0.8 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +6 -28
- data/Rakefile +10 -1
- data/betfair_api_ng_rails.gemspec +3 -0
- data/lib/betfair_api_ng_rails.rb +92 -73
- data/lib/betfair_api_ng_rails/api/concerns/errorable.rb +19 -0
- data/lib/betfair_api_ng_rails/api/config.rb +27 -0
- data/lib/betfair_api_ng_rails/api/connection.rb +34 -0
- data/lib/betfair_api_ng_rails/api/connection_ext/formatting.rb +34 -0
- data/lib/betfair_api_ng_rails/api/connection_ext/parsing.rb +29 -0
- data/lib/betfair_api_ng_rails/api/constants.rb +51 -0
- data/lib/betfair_api_ng_rails/api/data/attributes.rb +50 -0
- data/lib/betfair_api_ng_rails/api/data/base.rb +16 -0
- data/lib/betfair_api_ng_rails/api/data/competition.rb +20 -0
- data/lib/betfair_api_ng_rails/api/data/competition_result.rb +21 -0
- data/lib/betfair_api_ng_rails/api/data/concerns/hashable.rb +29 -0
- data/lib/betfair_api_ng_rails/api/data/constants.rb +11 -0
- data/lib/betfair_api_ng_rails/api/data/country_code_result.rb +19 -0
- data/lib/betfair_api_ng_rails/api/data/event.rb +20 -0
- data/lib/betfair_api_ng_rails/api/data/event_result.rb +19 -0
- data/lib/betfair_api_ng_rails/api/data/event_type.rb +20 -0
- data/lib/betfair_api_ng_rails/api/data/event_type_result.rb +19 -0
- data/lib/betfair_api_ng_rails/api/data/market_filter.rb +16 -0
- data/lib/betfair_api_ng_rails/api/data/market_type_result.rb +19 -0
- data/lib/betfair_api_ng_rails/api/data/time_range.rb +20 -0
- data/lib/betfair_api_ng_rails/api/data/time_range_result.rb +19 -0
- data/lib/betfair_api_ng_rails/api/data/venue_result.rb +19 -0
- data/lib/betfair_api_ng_rails/api/enums/bet_status.rb +15 -0
- data/lib/betfair_api_ng_rails/api/enums/concerns/enumable.rb +15 -0
- data/lib/betfair_api_ng_rails/api/enums/execution_report_error_code.rb +28 -0
- data/lib/betfair_api_ng_rails/api/enums/execution_report_status.rb +15 -0
- data/lib/betfair_api_ng_rails/api/enums/group_by.rb +17 -0
- data/lib/betfair_api_ng_rails/api/enums/instruction_report_error_code.rb +31 -0
- data/lib/betfair_api_ng_rails/api/enums/instruction_report_status.rb +14 -0
- data/lib/betfair_api_ng_rails/api/enums/market_betting_type.rb +17 -0
- data/lib/betfair_api_ng_rails/api/enums/market_projection.rb +18 -0
- data/lib/betfair_api_ng_rails/api/enums/market_sort.rb +17 -0
- data/lib/betfair_api_ng_rails/api/enums/market_status.rb +15 -0
- data/lib/betfair_api_ng_rails/api/enums/match_projection.rb +14 -0
- data/lib/betfair_api_ng_rails/api/enums/order_by.rb +14 -0
- data/lib/betfair_api_ng_rails/api/enums/order_projection.rb +14 -0
- data/lib/betfair_api_ng_rails/api/enums/order_status.rb +13 -0
- data/lib/betfair_api_ng_rails/api/enums/order_type.rb +14 -0
- data/lib/betfair_api_ng_rails/api/enums/persistence_type.rb +14 -0
- data/lib/betfair_api_ng_rails/api/enums/price_data.rb +16 -0
- data/lib/betfair_api_ng_rails/api/enums/rollup_model.rb +15 -0
- data/lib/betfair_api_ng_rails/api/enums/runner_status.rb +17 -0
- data/lib/betfair_api_ng_rails/api/enums/side.rb +13 -0
- data/lib/betfair_api_ng_rails/api/enums/sort_dir.rb +13 -0
- data/lib/betfair_api_ng_rails/api/enums/time_granularity.rb +14 -0
- data/lib/betfair_api_ng_rails/api/formatter_factory.rb +1 -1
- data/lib/betfair_api_ng_rails/api/formatters/js_tree_formatter.rb +38 -0
- data/lib/betfair_api_ng_rails/api/hashalator.rb +39 -0
- data/lib/betfair_api_ng_rails/api/helper.rb +29 -0
- data/lib/betfair_api_ng_rails/api/http/factory.rb +41 -0
- data/lib/betfair_api_ng_rails/api/http/helpers/information_response.rb +35 -0
- data/lib/betfair_api_ng_rails/api/http/helpers/keep_alive_response.rb +32 -0
- data/lib/betfair_api_ng_rails/api/http/helpers/session_response.rb +36 -0
- data/lib/betfair_api_ng_rails/api/http/requester.rb +75 -0
- data/lib/betfair_api_ng_rails/api/http/responser.rb +47 -0
- data/lib/betfair_api_ng_rails/api/parsers/base.rb +31 -0
- data/lib/betfair_api_ng_rails/api/parsers/list_competitions.rb +15 -0
- data/lib/betfair_api_ng_rails/api/parsers/list_countries.rb +15 -0
- data/lib/betfair_api_ng_rails/api/parsers/list_event_types.rb +15 -0
- data/lib/betfair_api_ng_rails/api/parsers/list_events.rb +15 -0
- data/lib/betfair_api_ng_rails/api/parsers/list_market_types.rb +15 -0
- data/lib/betfair_api_ng_rails/api/parsers/list_time_ranges.rb +15 -0
- data/lib/betfair_api_ng_rails/api/parsers/list_venues.rb +15 -0
- data/lib/betfair_api_ng_rails/api/provider.rb +38 -0
- data/lib/betfair_api_ng_rails/api/request_methods.rb +33 -0
- data/lib/betfair_api_ng_rails/api/session_manager.rb +54 -0
- data/lib/betfair_api_ng_rails/errors.rb +6 -0
- data/lib/betfair_api_ng_rails/railtie.rb +7 -0
- data/lib/betfair_api_ng_rails/version.rb +1 -1
- data/lib/generators/betfair_api_ng_rails/install/templates/betfair_api_ng_rails.rb +11 -9
- data/lib/generators/betfair_api_ng_rails/install/templates/betfair_api_ng_rails.yml +2 -0
- data/spec/betfair_api_ng_rails/api/connection_spec.rb +74 -0
- data/spec/betfair_api_ng_rails/api/data/concerns/hashable_spec.rb +81 -0
- data/spec/betfair_api_ng_rails/api/formatters/js_tree_formatter_spec.rb +70 -0
- data/spec/betfair_api_ng_rails/api/hashalator_spec.rb +146 -0
- data/spec/betfair_api_ng_rails/api/provider_spec.rb +91 -0
- data/spec/betfair_api_ng_rails/api/request_methods_spec.rb +60 -0
- data/spec/betfair_api_ng_rails/api/session_manager_spec.rb +59 -0
- data/spec/betfair_api_ng_rails/integration/list_competitions_spec.rb +18 -0
- data/spec/betfair_api_ng_rails/integration/list_countries_spec.rb +18 -0
- data/spec/betfair_api_ng_rails/integration/list_event_types_spec.rb +18 -0
- data/spec/betfair_api_ng_rails/integration/list_events_spec.rb +18 -0
- data/spec/betfair_api_ng_rails/integration/list_market_types_spec.rb +18 -0
- data/spec/betfair_api_ng_rails/integration/list_time_ranges_spec.rb +18 -0
- data/spec/betfair_api_ng_rails/integration/list_venues_spec.rb +18 -0
- data/spec/spec_helper.rb +16 -0
- data/spec/support/shared_examples/request_method.rb +18 -0
- data/spec/support/shared_examples/simple_list_filtering_request.rb +51 -0
- metadata +156 -66
- data/lib/betfair_api_ng_rails/api/base_provider.rb +0 -15
- data/lib/betfair_api_ng_rails/api/bf/concerns/errorable.rb +0 -21
- data/lib/betfair_api_ng_rails/api/bf/config.rb +0 -27
- data/lib/betfair_api_ng_rails/api/bf/constants.rb +0 -37
- data/lib/betfair_api_ng_rails/api/bf/data/attributes.rb +0 -52
- data/lib/betfair_api_ng_rails/api/bf/data/base.rb +0 -17
- data/lib/betfair_api_ng_rails/api/bf/data/competition.rb +0 -26
- data/lib/betfair_api_ng_rails/api/bf/data/competition_result.rb +0 -23
- data/lib/betfair_api_ng_rails/api/bf/data/concerns/hashable.rb +0 -40
- data/lib/betfair_api_ng_rails/api/bf/data/concerns/querable.rb +0 -46
- data/lib/betfair_api_ng_rails/api/bf/data/constants.rb +0 -13
- data/lib/betfair_api_ng_rails/api/bf/data/event.rb +0 -26
- data/lib/betfair_api_ng_rails/api/bf/data/event_result.rb +0 -21
- data/lib/betfair_api_ng_rails/api/bf/data/event_type.rb +0 -26
- data/lib/betfair_api_ng_rails/api/bf/data/event_type_result.rb +0 -21
- data/lib/betfair_api_ng_rails/api/bf/data/market_filter.rb +0 -19
- data/lib/betfair_api_ng_rails/api/bf/data/time_range.rb +0 -18
- data/lib/betfair_api_ng_rails/api/bf/data/time_range_result.rb +0 -21
- data/lib/betfair_api_ng_rails/api/bf/enums/bet_status.rb +0 -17
- data/lib/betfair_api_ng_rails/api/bf/enums/concerns/enumable.rb +0 -17
- data/lib/betfair_api_ng_rails/api/bf/enums/execution_report_error_code.rb +0 -30
- data/lib/betfair_api_ng_rails/api/bf/enums/execution_report_status.rb +0 -17
- data/lib/betfair_api_ng_rails/api/bf/enums/group_by.rb +0 -19
- data/lib/betfair_api_ng_rails/api/bf/enums/instruction_report_error_code.rb +0 -33
- data/lib/betfair_api_ng_rails/api/bf/enums/instruction_report_status.rb +0 -16
- data/lib/betfair_api_ng_rails/api/bf/enums/market_betting_type.rb +0 -19
- data/lib/betfair_api_ng_rails/api/bf/enums/market_projection.rb +0 -20
- data/lib/betfair_api_ng_rails/api/bf/enums/market_sort.rb +0 -19
- data/lib/betfair_api_ng_rails/api/bf/enums/market_status.rb +0 -17
- data/lib/betfair_api_ng_rails/api/bf/enums/match_projection.rb +0 -16
- data/lib/betfair_api_ng_rails/api/bf/enums/order_by.rb +0 -16
- data/lib/betfair_api_ng_rails/api/bf/enums/order_projection.rb +0 -16
- data/lib/betfair_api_ng_rails/api/bf/enums/order_status.rb +0 -15
- data/lib/betfair_api_ng_rails/api/bf/enums/order_type.rb +0 -16
- data/lib/betfair_api_ng_rails/api/bf/enums/persistence_type.rb +0 -16
- data/lib/betfair_api_ng_rails/api/bf/enums/price_data.rb +0 -18
- data/lib/betfair_api_ng_rails/api/bf/enums/rollup_model.rb +0 -17
- data/lib/betfair_api_ng_rails/api/bf/enums/runner_status.rb +0 -19
- data/lib/betfair_api_ng_rails/api/bf/enums/side.rb +0 -15
- data/lib/betfair_api_ng_rails/api/bf/enums/sort_dir.rb +0 -15
- data/lib/betfair_api_ng_rails/api/bf/enums/time_granularity.rb +0 -16
- data/lib/betfair_api_ng_rails/api/bf/formatters/js_tree_formatter.rb +0 -30
- data/lib/betfair_api_ng_rails/api/bf/helper.rb +0 -33
- data/lib/betfair_api_ng_rails/api/bf/http/factory.rb +0 -37
- data/lib/betfair_api_ng_rails/api/bf/http/requester.rb +0 -69
- data/lib/betfair_api_ng_rails/api/bf/http/responser.rb +0 -58
- data/lib/betfair_api_ng_rails/api/bf/orm/parsers/base.rb +0 -33
- data/lib/betfair_api_ng_rails/api/bf/orm/parsers/list_competitions.rb +0 -19
- data/lib/betfair_api_ng_rails/api/bf/orm/parsers/list_event_types.rb +0 -19
- data/lib/betfair_api_ng_rails/api/bf/orm/parsers/list_events.rb +0 -19
- data/lib/betfair_api_ng_rails/api/bf/orm/requester.rb +0 -52
- data/lib/betfair_api_ng_rails/api/bf/provider.rb +0 -38
- data/lib/betfair_api_ng_rails/api/bf/session_manager.rb +0 -46
@@ -0,0 +1,50 @@
|
|
1
|
+
module BetfairApiNgRails
|
2
|
+
module Api
|
3
|
+
module Data
|
4
|
+
module Attributes
|
5
|
+
|
6
|
+
MARKET_FILTER_ATTRS = [
|
7
|
+
:text_query,
|
8
|
+
:exchange_ids,
|
9
|
+
:event_type_ids,
|
10
|
+
:event_ids,
|
11
|
+
:competition_ids,
|
12
|
+
:venues,
|
13
|
+
:bsp_only,
|
14
|
+
:turn_in_play_enabled,
|
15
|
+
:in_play_only,
|
16
|
+
:market_betting_types,
|
17
|
+
:market_countries,
|
18
|
+
:market_type_codes,
|
19
|
+
:market_start_time,
|
20
|
+
:with_orders
|
21
|
+
]
|
22
|
+
|
23
|
+
COMPETITION_ATTRS = [
|
24
|
+
:id,
|
25
|
+
:name
|
26
|
+
]
|
27
|
+
|
28
|
+
EVENT_TYPE_ATTRS = [
|
29
|
+
:id,
|
30
|
+
:name
|
31
|
+
]
|
32
|
+
|
33
|
+
EVENT_ATTRS = [
|
34
|
+
:id,
|
35
|
+
:name,
|
36
|
+
:timezone,
|
37
|
+
:country_code,
|
38
|
+
:venue,
|
39
|
+
:open_date
|
40
|
+
]
|
41
|
+
|
42
|
+
TIME_RANGE_ATTRS = [
|
43
|
+
:from,
|
44
|
+
:to
|
45
|
+
]
|
46
|
+
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
require 'active_support/inflector'
|
2
|
+
|
3
|
+
module BetfairApiNgRails
|
4
|
+
module Api
|
5
|
+
module Data
|
6
|
+
class Base
|
7
|
+
include Api::Data::Attributes
|
8
|
+
|
9
|
+
def initialize(args = {})
|
10
|
+
args.each { |attribute, value| self.send("#{attribute}=", value) }
|
11
|
+
end
|
12
|
+
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
module BetfairApiNgRails
|
2
|
+
module Api
|
3
|
+
module Data
|
4
|
+
class Competition < Api::Data::Base
|
5
|
+
include Api::Data::Concerns::Hashable
|
6
|
+
|
7
|
+
attr_accessor *COMPETITION_ATTRS
|
8
|
+
|
9
|
+
def self.from_json(json_row)
|
10
|
+
new COMPETITION_ATTRS.inject({}) { |h, a| h[a] = json_row[a.to_s.camelize(:lower)]; h }
|
11
|
+
end
|
12
|
+
|
13
|
+
def self.to_hash_attrs
|
14
|
+
COMPETITION_ATTRS
|
15
|
+
end
|
16
|
+
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
module BetfairApiNgRails
|
2
|
+
module Api
|
3
|
+
module Data
|
4
|
+
class CompetitionResult < Api::Data::Base
|
5
|
+
|
6
|
+
attr_accessor :market_count,
|
7
|
+
:competition_region,
|
8
|
+
:competition
|
9
|
+
|
10
|
+
def self.from_json(json_row)
|
11
|
+
new(
|
12
|
+
competition: Api::Data::Competition.from_json(json_row['competition']),
|
13
|
+
market_count: json_row['marketCount'],
|
14
|
+
competition_region: json_row['competitionRegion']
|
15
|
+
)
|
16
|
+
end
|
17
|
+
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
@@ -0,0 +1,29 @@
|
|
1
|
+
module BetfairApiNgRails
|
2
|
+
module Api
|
3
|
+
module Data
|
4
|
+
module Concerns
|
5
|
+
module Hashable
|
6
|
+
include BetfairApiNgRails::Api::Data::Constants
|
7
|
+
|
8
|
+
def to_hash
|
9
|
+
BetfairApiNgRails::Api::Hashalator.new(attributes_hash).to_hash
|
10
|
+
end
|
11
|
+
|
12
|
+
private
|
13
|
+
|
14
|
+
def attributes_hash
|
15
|
+
self.class.to_hash_attrs.each_with_object({}) do |a, h|
|
16
|
+
val = get_attr_value(a)
|
17
|
+
h[a] = val unless val.nil?
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
21
|
+
def get_attr_value(attrib)
|
22
|
+
self.send attrib
|
23
|
+
end
|
24
|
+
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
module BetfairApiNgRails
|
2
|
+
module Api
|
3
|
+
module Data
|
4
|
+
class CountryCodeResult < Api::Data::Base
|
5
|
+
|
6
|
+
attr_accessor :market_count,
|
7
|
+
:country_code
|
8
|
+
|
9
|
+
def self.from_json(json_row)
|
10
|
+
new(
|
11
|
+
country_code: json_row['countryCode'],
|
12
|
+
market_count: json_row['marketCount']
|
13
|
+
)
|
14
|
+
end
|
15
|
+
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
module BetfairApiNgRails
|
2
|
+
module Api
|
3
|
+
module Data
|
4
|
+
class Event < Api::Data::Base
|
5
|
+
include Api::Data::Concerns::Hashable
|
6
|
+
|
7
|
+
attr_accessor *EVENT_ATTRS
|
8
|
+
|
9
|
+
def self.from_json(json_row)
|
10
|
+
new EVENT_ATTRS.inject({}) { |h, a| h[a] = json_row[a.to_s.camelize(:lower)]; h }
|
11
|
+
end
|
12
|
+
|
13
|
+
def self.to_hash_attrs
|
14
|
+
EVENT_ATTRS
|
15
|
+
end
|
16
|
+
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
module BetfairApiNgRails
|
2
|
+
module Api
|
3
|
+
module Data
|
4
|
+
class EventResult < Api::Data::Base
|
5
|
+
|
6
|
+
attr_accessor :market_count,
|
7
|
+
:event
|
8
|
+
|
9
|
+
def self.from_json(json_row)
|
10
|
+
new(
|
11
|
+
event: Api::Data::Event.from_json(json_row['event']),
|
12
|
+
market_count: json_row['marketCount']
|
13
|
+
)
|
14
|
+
end
|
15
|
+
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
module BetfairApiNgRails
|
2
|
+
module Api
|
3
|
+
module Data
|
4
|
+
class EventType < Api::Data::Base
|
5
|
+
include Api::Data::Concerns::Hashable
|
6
|
+
|
7
|
+
attr_accessor *EVENT_TYPE_ATTRS
|
8
|
+
|
9
|
+
def self.from_json(json_row)
|
10
|
+
new EVENT_TYPE_ATTRS.inject({}) { |h, a| h[a] = json_row[a.to_s.camelize(:lower)]; h }
|
11
|
+
end
|
12
|
+
|
13
|
+
def self.to_hash_attrs
|
14
|
+
EVENT_TYPE_ATTRS
|
15
|
+
end
|
16
|
+
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
module BetfairApiNgRails
|
2
|
+
module Api
|
3
|
+
module Data
|
4
|
+
class EventTypeResult < Api::Data::Base
|
5
|
+
|
6
|
+
attr_accessor :market_count,
|
7
|
+
:event_type
|
8
|
+
|
9
|
+
def self.from_json(json_row)
|
10
|
+
new(
|
11
|
+
event_type: Api::Data::EventType.from_json(json_row['eventType']),
|
12
|
+
market_count: json_row['marketCount']
|
13
|
+
)
|
14
|
+
end
|
15
|
+
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
module BetfairApiNgRails
|
2
|
+
module Api
|
3
|
+
module Data
|
4
|
+
class MarketFilter < Api::Data::Base
|
5
|
+
include Api::Data::Concerns::Hashable
|
6
|
+
|
7
|
+
attr_accessor *MARKET_FILTER_ATTRS
|
8
|
+
|
9
|
+
def self.to_hash_attrs
|
10
|
+
MARKET_FILTER_ATTRS
|
11
|
+
end
|
12
|
+
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
module BetfairApiNgRails
|
2
|
+
module Api
|
3
|
+
module Data
|
4
|
+
class MarketTypeResult < Api::Data::Base
|
5
|
+
|
6
|
+
attr_accessor :market_count,
|
7
|
+
:market_type
|
8
|
+
|
9
|
+
def self.from_json(json_row)
|
10
|
+
new(
|
11
|
+
market_type: json_row['marketType'],
|
12
|
+
market_count: json_row['marketCount']
|
13
|
+
)
|
14
|
+
end
|
15
|
+
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
module BetfairApiNgRails
|
2
|
+
module Api
|
3
|
+
module Data
|
4
|
+
class TimeRange < Api::Data::Base
|
5
|
+
include Api::Data::Concerns::Hashable
|
6
|
+
|
7
|
+
attr_accessor *TIME_RANGE_ATTRS
|
8
|
+
|
9
|
+
def self.from_json(json_row)
|
10
|
+
new TIME_RANGE_ATTRS.inject({}) { |h, a| h[a] = json_row[a.to_s.camelize(:lower)]; h }
|
11
|
+
end
|
12
|
+
|
13
|
+
def self.to_hash_attrs
|
14
|
+
TIME_RANGE_ATTRS
|
15
|
+
end
|
16
|
+
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
module BetfairApiNgRails
|
2
|
+
module Api
|
3
|
+
module Data
|
4
|
+
class TimeRangeResult < Api::Data::Base
|
5
|
+
|
6
|
+
attr_accessor :time_range,
|
7
|
+
:market_count
|
8
|
+
|
9
|
+
def self.from_json(json_row)
|
10
|
+
new(
|
11
|
+
time_range: Api::Data::TimeRange.from_json(json_row['timeRange']),
|
12
|
+
market_count: json_row['marketCount'],
|
13
|
+
)
|
14
|
+
end
|
15
|
+
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
module BetfairApiNgRails
|
2
|
+
module Api
|
3
|
+
module Data
|
4
|
+
class VenueResult < Api::Data::Base
|
5
|
+
|
6
|
+
attr_accessor :market_count,
|
7
|
+
:venue
|
8
|
+
|
9
|
+
def self.from_json(json_row)
|
10
|
+
new(
|
11
|
+
venue: json_row['venue'],
|
12
|
+
market_count: json_row['marketCount']
|
13
|
+
)
|
14
|
+
end
|
15
|
+
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
@@ -0,0 +1,28 @@
|
|
1
|
+
module BetfairApiNgRails
|
2
|
+
module Api
|
3
|
+
module Enums
|
4
|
+
class ExecutionReportErrorCode
|
5
|
+
extend Api::Enums::Concerns::Enumable
|
6
|
+
|
7
|
+
enumify "ERROR_IN_MATCHER",
|
8
|
+
"PROCESSED_WITH_ERRORS",
|
9
|
+
"BET_ACTION_ERROR",
|
10
|
+
"INVALID_ACCOUNT_STATE",
|
11
|
+
"INVALID_WALLET_STATUS",
|
12
|
+
"INSUFFICIENT_FUNDS",
|
13
|
+
"LOSS_LIMIT_EXCEEDED",
|
14
|
+
"MARKET_SUSPENDED",
|
15
|
+
"MARKET_NOT_OPEN_FOR_BETTING",
|
16
|
+
"DUPLICATE_TRANSACTION",
|
17
|
+
"INVALID_ORDER",
|
18
|
+
"INVALID_MARKET_ID",
|
19
|
+
"PERMISSION_DENIED",
|
20
|
+
"DUPLICATE_BETIDS",
|
21
|
+
"NO_ACTION_REQUIRED",
|
22
|
+
"SERVICE_UNAVAILABLE",
|
23
|
+
"REJECTED_BY_REGULATOR"
|
24
|
+
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|