flowcommerce 0.0.80 → 0.0.81
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/flow_commerce/flow_api_v0_client.rb +78 -26
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e1b2bd81b5a4f3f0c8a9b63e650dbe351e81c468
|
4
|
+
data.tar.gz: 02312b107d0a59908d2418d9ce58ee732bfdc1ba
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ddd1bc8f83b83b6a0a3a1208c381046b5b70d60328b330fac17ebf1583e6fb3b3c7c992b3886688f221ba9da9b31ab11ad18a0297ea4bff71a94c037d598e100
|
7
|
+
data.tar.gz: ce801dcc22812c0fd61b1a096fe5419980611acabad82747a5329a09620fcf7bf6f78921642f04c8297e5dc58fbf86ed7c657fce0639b1dc97159344fabe0463
|
@@ -3895,10 +3895,14 @@ module Io
|
|
3895
3895
|
|
3896
3896
|
def AuthorizationForm.from_json(hash)
|
3897
3897
|
HttpClient::Preconditions.assert_class('hash', hash, Hash)
|
3898
|
-
|
3898
|
+
discriminator = HttpClient::Helper.symbolize_keys(hash)[:discriminator].to_s.strip
|
3899
|
+
if discriminator.empty?
|
3900
|
+
raise "Union type[authorization_form] requires a field named 'discriminator'"
|
3901
|
+
end
|
3902
|
+
case discriminator
|
3899
3903
|
when Types::DIRECT_AUTHORIZATION_FORM; DirectAuthorizationForm.new(hash)
|
3900
3904
|
when Types::MERCHANT_OF_RECORD_AUTHORIZATION_FORM; MerchantOfRecordAuthorizationForm.new(hash)
|
3901
|
-
else AuthorizationFormUndefinedType.new(:name =>
|
3905
|
+
else AuthorizationFormUndefinedType.new(:name => discriminator)
|
3902
3906
|
end
|
3903
3907
|
end
|
3904
3908
|
|
@@ -3946,9 +3950,13 @@ module Io
|
|
3946
3950
|
|
3947
3951
|
def Deminimus.from_json(hash)
|
3948
3952
|
HttpClient::Preconditions.assert_class('hash', hash, Hash)
|
3949
|
-
|
3953
|
+
discriminator = HttpClient::Helper.symbolize_keys(hash)[:discriminator].to_s.strip
|
3954
|
+
if discriminator.empty?
|
3955
|
+
raise "Union type[deminimus] requires a field named 'discriminator'"
|
3956
|
+
end
|
3957
|
+
case discriminator
|
3950
3958
|
when Types::DEMINIMUS_SIMPLE; DeminimusSimple.new(hash)
|
3951
|
-
else DeminimusUndefinedType.new(:name =>
|
3959
|
+
else DeminimusUndefinedType.new(:name => discriminator)
|
3952
3960
|
end
|
3953
3961
|
end
|
3954
3962
|
|
@@ -3997,10 +4005,14 @@ module Io
|
|
3997
4005
|
|
3998
4006
|
def Document.from_json(hash)
|
3999
4007
|
HttpClient::Preconditions.assert_class('hash', hash, Hash)
|
4000
|
-
|
4008
|
+
discriminator = HttpClient::Helper.symbolize_keys(hash)[:discriminator].to_s.strip
|
4009
|
+
if discriminator.empty?
|
4010
|
+
raise "Union type[document] requires a field named 'discriminator'"
|
4011
|
+
end
|
4012
|
+
case discriminator
|
4001
4013
|
when Types::CATALOG_ITEM_DOCUMENT; CatalogItemDocument.new(hash)
|
4002
4014
|
when Types::HARMONIZATION_DOCUMENT; HarmonizationDocument.new(hash)
|
4003
|
-
else DocumentUndefinedType.new(:name =>
|
4015
|
+
else DocumentUndefinedType.new(:name => discriminator)
|
4004
4016
|
end
|
4005
4017
|
end
|
4006
4018
|
|
@@ -4093,7 +4105,11 @@ module Io
|
|
4093
4105
|
|
4094
4106
|
def Event.from_json(hash)
|
4095
4107
|
HttpClient::Preconditions.assert_class('hash', hash, Hash)
|
4096
|
-
|
4108
|
+
discriminator = HttpClient::Helper.symbolize_keys(hash)[:discriminator].to_s.strip
|
4109
|
+
if discriminator.empty?
|
4110
|
+
raise "Union type[event] requires a field named 'discriminator'"
|
4111
|
+
end
|
4112
|
+
case discriminator
|
4097
4113
|
when Types::CATALOG_UPSERTED; CatalogUpserted.new(hash)
|
4098
4114
|
when Types::CATALOG_DELETED; CatalogDeleted.new(hash)
|
4099
4115
|
when Types::SUBCATALOG_UPSERTED; SubcatalogUpserted.new(hash)
|
@@ -4140,7 +4156,7 @@ module Io
|
|
4140
4156
|
when Types::TARGETING_ITEM_UPSERTED; TargetingItemUpserted.new(hash)
|
4141
4157
|
when Types::TARGETING_ITEM_DELETED; TargetingItemDeleted.new(hash)
|
4142
4158
|
when Types::TRACKING_LABEL_EVENT_UPSERTED; TrackingLabelEventUpserted.new(hash)
|
4143
|
-
else EventUndefinedType.new(:name =>
|
4159
|
+
else EventUndefinedType.new(:name => discriminator)
|
4144
4160
|
end
|
4145
4161
|
end
|
4146
4162
|
|
@@ -4190,10 +4206,14 @@ module Io
|
|
4190
4206
|
|
4191
4207
|
def ExpandableItemFunction.from_json(hash)
|
4192
4208
|
HttpClient::Preconditions.assert_class('hash', hash, Hash)
|
4193
|
-
|
4209
|
+
discriminator = HttpClient::Helper.symbolize_keys(hash)[:discriminator].to_s.strip
|
4210
|
+
if discriminator.empty?
|
4211
|
+
raise "Union type[expandable_item_function] requires a field named 'discriminator'"
|
4212
|
+
end
|
4213
|
+
case discriminator
|
4194
4214
|
when Types::ITEM_FUNCTION; ItemFunction.new(hash)
|
4195
4215
|
when Types::ITEM_FUNCTION_REFERENCE; ItemFunctionReference.new(hash)
|
4196
|
-
else ExpandableItemFunctionUndefinedType.new(:name =>
|
4216
|
+
else ExpandableItemFunctionUndefinedType.new(:name => discriminator)
|
4197
4217
|
end
|
4198
4218
|
end
|
4199
4219
|
|
@@ -4242,10 +4262,14 @@ module Io
|
|
4242
4262
|
|
4243
4263
|
def ExpandableOrganization.from_json(hash)
|
4244
4264
|
HttpClient::Preconditions.assert_class('hash', hash, Hash)
|
4245
|
-
|
4265
|
+
discriminator = HttpClient::Helper.symbolize_keys(hash)[:discriminator].to_s.strip
|
4266
|
+
if discriminator.empty?
|
4267
|
+
raise "Union type[expandable_organization] requires a field named 'discriminator'"
|
4268
|
+
end
|
4269
|
+
case discriminator
|
4246
4270
|
when Types::ORGANIZATION; Organization.new(hash)
|
4247
4271
|
when Types::ORGANIZATION_REFERENCE; OrganizationReference.new(hash)
|
4248
|
-
else ExpandableOrganizationUndefinedType.new(:name =>
|
4272
|
+
else ExpandableOrganizationUndefinedType.new(:name => discriminator)
|
4249
4273
|
end
|
4250
4274
|
end
|
4251
4275
|
|
@@ -4295,10 +4319,14 @@ module Io
|
|
4295
4319
|
|
4296
4320
|
def ExpandableSubcatalog.from_json(hash)
|
4297
4321
|
HttpClient::Preconditions.assert_class('hash', hash, Hash)
|
4298
|
-
|
4322
|
+
discriminator = HttpClient::Helper.symbolize_keys(hash)[:discriminator].to_s.strip
|
4323
|
+
if discriminator.empty?
|
4324
|
+
raise "Union type[expandable_subcatalog] requires a field named 'discriminator'"
|
4325
|
+
end
|
4326
|
+
case discriminator
|
4299
4327
|
when Types::SUBCATALOG; Subcatalog.new(hash)
|
4300
4328
|
when Types::SUBCATALOG_REFERENCE; SubcatalogReference.new(hash)
|
4301
|
-
else ExpandableSubcatalogUndefinedType.new(:name =>
|
4329
|
+
else ExpandableSubcatalogUndefinedType.new(:name => discriminator)
|
4302
4330
|
end
|
4303
4331
|
end
|
4304
4332
|
|
@@ -4347,10 +4375,14 @@ module Io
|
|
4347
4375
|
|
4348
4376
|
def ExpandableUser.from_json(hash)
|
4349
4377
|
HttpClient::Preconditions.assert_class('hash', hash, Hash)
|
4350
|
-
|
4378
|
+
discriminator = HttpClient::Helper.symbolize_keys(hash)[:discriminator].to_s.strip
|
4379
|
+
if discriminator.empty?
|
4380
|
+
raise "Union type[expandable_user] requires a field named 'discriminator'"
|
4381
|
+
end
|
4382
|
+
case discriminator
|
4351
4383
|
when Types::USER; User.new(hash)
|
4352
4384
|
when Types::USER_REFERENCE; UserReference.new(hash)
|
4353
|
-
else ExpandableUserUndefinedType.new(:name =>
|
4385
|
+
else ExpandableUserUndefinedType.new(:name => discriminator)
|
4354
4386
|
end
|
4355
4387
|
end
|
4356
4388
|
|
@@ -4402,9 +4434,13 @@ module Io
|
|
4402
4434
|
|
4403
4435
|
def ExportDelivery.from_json(hash)
|
4404
4436
|
HttpClient::Preconditions.assert_class('hash', hash, Hash)
|
4405
|
-
|
4437
|
+
discriminator = HttpClient::Helper.symbolize_keys(hash)[:discriminator].to_s.strip
|
4438
|
+
if discriminator.empty?
|
4439
|
+
raise "Union type[export_delivery] requires a field named 'discriminator'"
|
4440
|
+
end
|
4441
|
+
case discriminator
|
4406
4442
|
when Types::EXPORT_DELIVERY_EMAIL; ExportDeliveryEmail.new(hash)
|
4407
|
-
else ExportDeliveryUndefinedType.new(:name =>
|
4443
|
+
else ExportDeliveryUndefinedType.new(:name => discriminator)
|
4408
4444
|
end
|
4409
4445
|
end
|
4410
4446
|
|
@@ -4456,11 +4492,15 @@ module Io
|
|
4456
4492
|
|
4457
4493
|
def ExportType.from_json(hash)
|
4458
4494
|
HttpClient::Preconditions.assert_class('hash', hash, Hash)
|
4459
|
-
|
4495
|
+
discriminator = HttpClient::Helper.symbolize_keys(hash)[:discriminator].to_s.strip
|
4496
|
+
if discriminator.empty?
|
4497
|
+
raise "Union type[export_type] requires a field named 'discriminator'"
|
4498
|
+
end
|
4499
|
+
case discriminator
|
4460
4500
|
when Types::CATALOG_ITEM_EXPORT_TYPE; CatalogItemExportType.new(hash)
|
4461
4501
|
when Types::SOLIDUS_PRODUCT_EXPORT_TYPE; SolidusProductExportType.new(hash)
|
4462
4502
|
when Types::SOLIDUS_VARIANT_EXPORT_TYPE; SolidusVariantExportType.new(hash)
|
4463
|
-
else ExportTypeUndefinedType.new(:name =>
|
4503
|
+
else ExportTypeUndefinedType.new(:name => discriminator)
|
4464
4504
|
end
|
4465
4505
|
end
|
4466
4506
|
|
@@ -4519,11 +4559,15 @@ module Io
|
|
4519
4559
|
|
4520
4560
|
def InventoryStrategy.from_json(hash)
|
4521
4561
|
HttpClient::Preconditions.assert_class('hash', hash, Hash)
|
4522
|
-
|
4562
|
+
discriminator = HttpClient::Helper.symbolize_keys(hash)[:discriminator].to_s.strip
|
4563
|
+
if discriminator.empty?
|
4564
|
+
raise "Union type[inventory_strategy] requires a field named 'discriminator'"
|
4565
|
+
end
|
4566
|
+
case discriminator
|
4523
4567
|
when Types::INVENTORY_BACKORDER; InventoryBackorder.new(hash)
|
4524
4568
|
when Types::INVENTORY_STOCK; InventoryStock.new(hash)
|
4525
4569
|
when Types::INVENTORY_UNLIMITED; InventoryUnlimited.new(hash)
|
4526
|
-
else InventoryStrategyUndefinedType.new(:name =>
|
4570
|
+
else InventoryStrategyUndefinedType.new(:name => discriminator)
|
4527
4571
|
end
|
4528
4572
|
end
|
4529
4573
|
|
@@ -4572,10 +4616,14 @@ module Io
|
|
4572
4616
|
|
4573
4617
|
def OrderError.from_json(hash)
|
4574
4618
|
HttpClient::Preconditions.assert_class('hash', hash, Hash)
|
4575
|
-
|
4619
|
+
discriminator = HttpClient::Helper.symbolize_keys(hash)[:code].to_s.strip
|
4620
|
+
if discriminator.empty?
|
4621
|
+
raise "Union type[order_error] requires a field named 'code'"
|
4622
|
+
end
|
4623
|
+
case discriminator
|
4576
4624
|
when Types::ORDER_ITEM_NOT_AVAILABLE_ERROR; OrderItemNotAvailableError.new(hash)
|
4577
4625
|
when Types::GENERIC_ERROR; GenericError.new(hash)
|
4578
|
-
else OrderErrorUndefinedType.new(:name =>
|
4626
|
+
else OrderErrorUndefinedType.new(:name => discriminator)
|
4579
4627
|
end
|
4580
4628
|
end
|
4581
4629
|
|
@@ -4629,12 +4677,16 @@ module Io
|
|
4629
4677
|
|
4630
4678
|
def TierRuleOutcome.from_json(hash)
|
4631
4679
|
HttpClient::Preconditions.assert_class('hash', hash, Hash)
|
4632
|
-
|
4680
|
+
discriminator = HttpClient::Helper.symbolize_keys(hash)[:discriminator].to_s.strip
|
4681
|
+
if discriminator.empty?
|
4682
|
+
raise "Union type[tier_rule_outcome] requires a field named 'discriminator'"
|
4683
|
+
end
|
4684
|
+
case discriminator
|
4633
4685
|
when Types::AMOUNT_MARGIN; AmountMargin.new(hash)
|
4634
4686
|
when Types::AT_COST; AtCost.new(hash)
|
4635
4687
|
when Types::FLAT_RATE; FlatRate.new(hash)
|
4636
4688
|
when Types::PERCENT_MARGIN; PercentMargin.new(hash)
|
4637
|
-
else TierRuleOutcomeUndefinedType.new(:name =>
|
4689
|
+
else TierRuleOutcomeUndefinedType.new(:name => discriminator)
|
4638
4690
|
end
|
4639
4691
|
end
|
4640
4692
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: flowcommerce
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.81
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Flow Commerce, Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-10-
|
11
|
+
date: 2016-10-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: json
|