Class: Schematic::Client

Inherits:
Object
  • Object
show all
Defined in:
lib/schematic/client.rb

Instance Method Summary collapse

Constructor Details

#initialize(api_key:, base_url: nil) ⇒ void

Parameters:

  • base_url (String, nil) (defaults to: nil)
  • api_key (String)


9
10
11
12
13
14
15
16
17
18
# File 'lib/schematic/client.rb', line 9

def initialize(api_key:, base_url: nil)
  @raw_client = Schematic::Internal::Http::RawClient.new(
    base_url: base_url || Schematic::Environment::DEFAULT,
    headers: {
      "User-Agent" => "schematichq/1.4.1",
      "X-Fern-Language" => "Ruby",
      "X-Schematic-Api-Key" => api_key.to_s
    }
  )
end

Instance Method Details

#accesstokensSchematic::Accesstokens::Client



111
112
113
# File 'lib/schematic/client.rb', line 111

def accesstokens
  @accesstokens ||= Schematic::Accesstokens::Client.new(client: @raw_client)
end

#accountsSchematic::Accounts::Client



21
22
23
# File 'lib/schematic/client.rb', line 21

def accounts
  @accounts ||= Schematic::Accounts::Client.new(client: @raw_client)
end

#billingSchematic::Billing::Client



26
27
28
# File 'lib/schematic/client.rb', line 26

def billing
  @billing ||= Schematic::Billing::Client.new(client: @raw_client)
end

#checkoutSchematic::Checkout::Client



36
37
38
# File 'lib/schematic/client.rb', line 36

def checkout
  @checkout ||= Schematic::Checkout::Client.new(client: @raw_client)
end

#companiesSchematic::Companies::Client



41
42
43
# File 'lib/schematic/client.rb', line 41

def companies
  @companies ||= Schematic::Companies::Client.new(client: @raw_client)
end

#componentsSchematic::Components::Client



56
57
58
# File 'lib/schematic/client.rb', line 56

def components
  @components ||= Schematic::Components::Client.new(client: @raw_client)
end

#componentspublicSchematic::Componentspublic::Client



101
102
103
# File 'lib/schematic/client.rb', line 101

def componentspublic
  @componentspublic ||= Schematic::Componentspublic::Client.new(client: @raw_client)
end

#creditsSchematic::Credits::Client



31
32
33
# File 'lib/schematic/client.rb', line 31

def credits
  @credits ||= Schematic::Credits::Client.new(client: @raw_client)
end

#dataexportsSchematic::Dataexports::Client



61
62
63
# File 'lib/schematic/client.rb', line 61

def dataexports
  @dataexports ||= Schematic::Dataexports::Client.new(client: @raw_client)
end

#entitlementsSchematic::Entitlements::Client



46
47
48
# File 'lib/schematic/client.rb', line 46

def entitlements
  @entitlements ||= Schematic::Entitlements::Client.new(client: @raw_client)
end

#eventsSchematic::Events::Client



66
67
68
# File 'lib/schematic/client.rb', line 66

def events
  @events ||= Schematic::Events::Client.new(client: @raw_client)
end

#featuresSchematic::Features::Client



71
72
73
# File 'lib/schematic/client.rb', line 71

def features
  @features ||= Schematic::Features::Client.new(client: @raw_client)
end

#insightsSchematic::Insights::Client



76
77
78
# File 'lib/schematic/client.rb', line 76

def insights
  @insights ||= Schematic::Insights::Client.new(client: @raw_client)
end

#integrationsapiSchematic::Integrationsapi::Client



81
82
83
# File 'lib/schematic/client.rb', line 81

def integrationsapi
  @integrationsapi ||= Schematic::Integrationsapi::Client.new(client: @raw_client)
end

#planbundleSchematic::Planbundle::Client



86
87
88
# File 'lib/schematic/client.rb', line 86

def planbundle
  @planbundle ||= Schematic::Planbundle::Client.new(client: @raw_client)
end

#plangroupsSchematic::Plangroups::Client



91
92
93
# File 'lib/schematic/client.rb', line 91

def plangroups
  @plangroups ||= Schematic::Plangroups::Client.new(client: @raw_client)
end

#planmigrationsSchematic::Planmigrations::Client



96
97
98
# File 'lib/schematic/client.rb', line 96

def planmigrations
  @planmigrations ||= Schematic::Planmigrations::Client.new(client: @raw_client)
end

#plansSchematic::Plans::Client



51
52
53
# File 'lib/schematic/client.rb', line 51

def plans
  @plans ||= Schematic::Plans::Client.new(client: @raw_client)
end

#scheduledcheckoutSchematic::Scheduledcheckout::Client



106
107
108
# File 'lib/schematic/client.rb', line 106

def scheduledcheckout
  @scheduledcheckout ||= Schematic::Scheduledcheckout::Client.new(client: @raw_client)
end

#webhooksSchematic::Webhooks::Client



116
117
118
# File 'lib/schematic/client.rb', line 116

def webhooks
  @webhooks ||= Schematic::Webhooks::Client.new(client: @raw_client)
end