phraseapp-ruby 1.2.4 → 1.2.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 11e4707b7b9c2da831994392d1fdd9812de354e9
4
- data.tar.gz: 22ff9f24809cc29e66dd4f5292e8c01da1517d93
3
+ metadata.gz: 98d705055dc3e878177c16e0008960d540e0db3e
4
+ data.tar.gz: 0589f312e4ecfa432805d106c2af570d1a0c8d37
5
5
  SHA512:
6
- metadata.gz: b2d4640c59a99f737a8c5f831fa08d2011f98a0b9e0ecbac9897fc06651a561bccc68d8459b5471bf637a85143f3bdd9041ab0a118dd668e5e2bebec41b7f051
7
- data.tar.gz: 21ea75c0ff64a75643ae777546e1597918aeb00cf712b480318c159c699658bc4a07dd2930521a66f3fde9d3384cac44c00ca9e09d59517eddaa8ed4c6d0ed83
6
+ metadata.gz: 4d95bf56a879bc35e99709ced45143c3e281e1c0eb72e123274856307a9e3b88082a76f31b8c1ae5db751ce453ff62a7cdbbdad73346985452d3a31d2a8edd86
7
+ data.tar.gz: c306b137e0b50e981869538cf9837f4df8722e528e9345ee2b2b1fbe9c6b9210e97f68277237bb8359b5fd6240920160c02c8ad7c5816321403ceb92d72e1542
@@ -1,4 +1,7 @@
1
1
 
2
+ # revision_docs:d104be46bd36f220e2df166ba7d3adb7ee9b1005
3
+ # revision_generator:HEAD/2016-04-20T163945/sacry1
4
+
2
5
  require 'ostruct'
3
6
  require 'net/https'
4
7
  require 'uri'
@@ -26,6 +29,22 @@ module PhraseApp
26
29
 
27
30
 
28
31
  module ResponseObjects
32
+ class Account < ::OpenStruct
33
+ #created_at, id, name, updated_at,
34
+ def initialize(hash)
35
+ super(hash)
36
+ PhraseApp.handle_times(self)
37
+ end
38
+ end
39
+
40
+ class AccountPreview < ::OpenStruct
41
+ #created_at, id, name, updated_at,
42
+ def initialize(hash)
43
+ super(hash)
44
+ PhraseApp.handle_times(self)
45
+ end
46
+ end
47
+
29
48
  class AffectedCount < ::OpenStruct
30
49
  #records_affected,
31
50
  def initialize(hash)
@@ -75,7 +94,7 @@ module ResponseObjects
75
94
  end
76
95
 
77
96
  class Format < ::OpenStruct
78
- #api_name, default_encoding, default_file, description, exportable, extension, importable, name,
97
+ #api_name, default_encoding, default_file, description, exportable, extension, importable, includes_locale_information, name, renders_default_locale,
79
98
  def initialize(hash)
80
99
  super(hash)
81
100
  PhraseApp.handle_times(self)
@@ -123,7 +142,7 @@ module ResponseObjects
123
142
  end
124
143
 
125
144
  class Project < ::OpenStruct
126
- #created_at, id, main_format, name, updated_at,
145
+ #account, created_at, id, main_format, name, updated_at,
127
146
  def initialize(hash)
128
147
  super(hash)
129
148
  PhraseApp.handle_times(self)
@@ -304,28 +323,26 @@ module RequestParams
304
323
  # scopes::
305
324
  # A list of scopes that the access can be used for.
306
325
  class AuthorizationParams < ::OpenStruct
326
+
307
327
  def expires_at=(val)
308
- self.expires_at = Time.parse(val)
328
+ super(DateTime.parse(val))
309
329
  end
310
330
 
311
331
  def note=(val)
312
- self.note = val
332
+ super(val)
313
333
  end
314
334
 
315
335
  def scopes=(val)
316
- self.scopes = val.split(',')
336
+ super(val.split(','))
317
337
  end
318
338
 
319
339
  def validate
320
- if self.note == nil || self.note == ""
340
+
341
+ if note == nil || note == ""
321
342
  raise PhraseApp::ParamsHelpers::ParamsValidationError.new("Required parameter \"note\" of \"AuthorizationParams\" not set")
322
343
  end
323
344
  end
324
345
 
325
- def to_h
326
- @table.dup
327
- end
328
-
329
346
  end
330
347
  end
331
348
 
@@ -336,20 +353,18 @@ module RequestParams
336
353
  # name::
337
354
  # Blacklisted key name
338
355
  class BlacklistedKeyParams < ::OpenStruct
356
+
339
357
  def name=(val)
340
- self.name = val
358
+ super(val)
341
359
  end
342
360
 
343
361
  def validate
344
- if self.name == nil || self.name == ""
362
+
363
+ if name == nil || name == ""
345
364
  raise PhraseApp::ParamsHelpers::ParamsValidationError.new("Required parameter \"name\" of \"BlacklistedKeyParams\" not set")
346
365
  end
347
366
  end
348
367
 
349
- def to_h
350
- @table.dup
351
- end
352
-
353
368
  end
354
369
  end
355
370
 
@@ -360,20 +375,18 @@ module RequestParams
360
375
  # message::
361
376
  # Comment message
362
377
  class CommentParams < ::OpenStruct
378
+
363
379
  def message=(val)
364
- self.message = val
380
+ super(val)
365
381
  end
366
382
 
367
383
  def validate
368
- if self.message == nil || self.message == ""
384
+
385
+ if message == nil || message == ""
369
386
  raise PhraseApp::ParamsHelpers::ParamsValidationError.new("Required parameter \"message\" of \"CommentParams\" not set")
370
387
  end
371
388
  end
372
389
 
373
- def to_h
374
- @table.dup
375
- end
376
-
377
390
  end
378
391
  end
379
392
 
@@ -410,43 +423,44 @@ module RequestParams
410
423
  # xml_space_preserve::
411
424
  # Indicates whether the key should be exported with "xml:space=preserve". Supported by several XML-based formats.
412
425
  class TranslationKeyParams < ::OpenStruct
426
+
413
427
  def data_type=(val)
414
- self.data_type = val
428
+ super(val)
415
429
  end
416
430
 
417
431
  def description=(val)
418
- self.description = val
432
+ super(val)
419
433
  end
420
434
 
421
435
  def localized_format_key=(val)
422
- self.localized_format_key = val
436
+ super(val)
423
437
  end
424
438
 
425
439
  def localized_format_string=(val)
426
- self.localized_format_string = val
440
+ super(val)
427
441
  end
428
442
 
429
443
  def max_characters_allowed=(val)
430
- self.max_characters_allowed = i.to_u
444
+ super(val.to_i)
431
445
  end
432
446
 
433
447
  def name=(val)
434
- self.name = val
448
+ super(val)
435
449
  end
436
450
 
437
451
  def name_plural=(val)
438
- self.name_plural = val
452
+ super(val)
439
453
  end
440
454
 
441
455
  def original_file=(val)
442
- self.original_file = val
456
+ super(val)
443
457
  end
444
458
 
445
459
  def plural=(val)
446
460
  if val.is_a?(TrueClass)
447
- self.plural = true
448
- elsif val.is_a?(FalseClass) #ignore
449
- self.plural = b
461
+ super(true)
462
+ elsif val.is_a?(FalseClass)
463
+ return
450
464
  else
451
465
  PhraseApp::ParamsHelpers::ParamsValidationError.new("invalid value #{val}")
452
466
  end
@@ -454,27 +468,27 @@ module RequestParams
454
468
 
455
469
  def remove_screenshot=(val)
456
470
  if val.is_a?(TrueClass)
457
- self.remove_screenshot = true
458
- elsif val.is_a?(FalseClass) #ignore
459
- self.remove_screenshot = b
471
+ super(true)
472
+ elsif val.is_a?(FalseClass)
473
+ return
460
474
  else
461
475
  PhraseApp::ParamsHelpers::ParamsValidationError.new("invalid value #{val}")
462
476
  end
463
477
  end
464
478
 
465
479
  def screenshot=(val)
466
- self.screenshot = val
480
+ super(val)
467
481
  end
468
482
 
469
483
  def tags=(val)
470
- self.tags = val
484
+ super(val)
471
485
  end
472
486
 
473
487
  def unformatted=(val)
474
488
  if val.is_a?(TrueClass)
475
- self.unformatted = true
476
- elsif val.is_a?(FalseClass) #ignore
477
- self.unformatted = b
489
+ super(true)
490
+ elsif val.is_a?(FalseClass)
491
+ return
478
492
  else
479
493
  PhraseApp::ParamsHelpers::ParamsValidationError.new("invalid value #{val}")
480
494
  end
@@ -482,24 +496,21 @@ module RequestParams
482
496
 
483
497
  def xml_space_preserve=(val)
484
498
  if val.is_a?(TrueClass)
485
- self.xml_space_preserve = true
486
- elsif val.is_a?(FalseClass) #ignore
487
- self.xml_space_preserve = b
499
+ super(true)
500
+ elsif val.is_a?(FalseClass)
501
+ return
488
502
  else
489
503
  PhraseApp::ParamsHelpers::ParamsValidationError.new("invalid value #{val}")
490
504
  end
491
505
  end
492
506
 
493
507
  def validate
494
- if self.name == nil || self.name == ""
508
+
509
+ if name == nil || name == ""
495
510
  raise PhraseApp::ParamsHelpers::ParamsValidationError.new("Required parameter \"name\" of \"TranslationKeyParams\" not set")
496
511
  end
497
512
  end
498
513
 
499
- def to_h
500
- @table.dup
501
- end
502
-
503
514
  end
504
515
  end
505
516
 
@@ -520,15 +531,16 @@ module RequestParams
520
531
  # source_locale_id::
521
532
  # Source locale. Can be the name or public id of the locale. Preferred is the public id.
522
533
  class LocaleParams < ::OpenStruct
534
+
523
535
  def code=(val)
524
- self.code = val
536
+ super(val)
525
537
  end
526
538
 
527
539
  def default=(val)
528
540
  if val.is_a?(TrueClass)
529
- self.default = true
530
- elsif val.is_a?(FalseClass) #ignore
531
- self.default = b
541
+ super(true)
542
+ elsif val.is_a?(FalseClass)
543
+ return
532
544
  else
533
545
  PhraseApp::ParamsHelpers::ParamsValidationError.new("invalid value #{val}")
534
546
  end
@@ -536,44 +548,42 @@ module RequestParams
536
548
 
537
549
  def main=(val)
538
550
  if val.is_a?(TrueClass)
539
- self.main = true
540
- elsif val.is_a?(FalseClass) #ignore
541
- self.main = b
551
+ super(true)
552
+ elsif val.is_a?(FalseClass)
553
+ return
542
554
  else
543
555
  PhraseApp::ParamsHelpers::ParamsValidationError.new("invalid value #{val}")
544
556
  end
545
557
  end
546
558
 
547
559
  def name=(val)
548
- self.name = val
560
+ super(val)
549
561
  end
550
562
 
551
563
  def rtl=(val)
552
564
  if val.is_a?(TrueClass)
553
- self.rtl = true
554
- elsif val.is_a?(FalseClass) #ignore
555
- self.rtl = b
565
+ super(true)
566
+ elsif val.is_a?(FalseClass)
567
+ return
556
568
  else
557
569
  PhraseApp::ParamsHelpers::ParamsValidationError.new("invalid value #{val}")
558
570
  end
559
571
  end
560
572
 
561
573
  def source_locale_id=(val)
562
- self.source_locale_id = val
574
+ super(val)
563
575
  end
564
576
 
565
577
  def validate
566
- if self.code == nil || self.code == ""
578
+
579
+ if code == nil || code == ""
567
580
  raise PhraseApp::ParamsHelpers::ParamsValidationError.new("Required parameter \"code\" of \"LocaleParams\" not set")
568
- endif self.name == nil || self.name == ""
581
+ end
582
+ if name == nil || name == ""
569
583
  raise PhraseApp::ParamsHelpers::ParamsValidationError.new("Required parameter \"name\" of \"LocaleParams\" not set")
570
584
  end
571
585
  end
572
586
 
573
- def to_h
574
- @table.dup
575
- end
576
-
577
587
  end
578
588
  end
579
589
 
@@ -608,15 +618,16 @@ module RequestParams
608
618
  # unverify_translations_upon_delivery::
609
619
  # Unverify translations upon delivery.
610
620
  class TranslationOrderParams < ::OpenStruct
621
+
611
622
  def category=(val)
612
- self.category = val
623
+ super(val)
613
624
  end
614
625
 
615
626
  def include_untranslated_keys=(val)
616
627
  if val.is_a?(TrueClass)
617
- self.include_untranslated_keys = true
618
- elsif val.is_a?(FalseClass) #ignore
619
- self.include_untranslated_keys = b
628
+ super(true)
629
+ elsif val.is_a?(FalseClass)
630
+ return
620
631
  else
621
632
  PhraseApp::ParamsHelpers::ParamsValidationError.new("invalid value #{val}")
622
633
  end
@@ -624,27 +635,27 @@ module RequestParams
624
635
 
625
636
  def include_unverified_translations=(val)
626
637
  if val.is_a?(TrueClass)
627
- self.include_unverified_translations = true
628
- elsif val.is_a?(FalseClass) #ignore
629
- self.include_unverified_translations = b
638
+ super(true)
639
+ elsif val.is_a?(FalseClass)
640
+ return
630
641
  else
631
642
  PhraseApp::ParamsHelpers::ParamsValidationError.new("invalid value #{val}")
632
643
  end
633
644
  end
634
645
 
635
646
  def lsp=(val)
636
- self.lsp = val
647
+ super(val)
637
648
  end
638
649
 
639
650
  def message=(val)
640
- self.message = val
651
+ super(val)
641
652
  end
642
653
 
643
654
  def priority=(val)
644
655
  if val.is_a?(TrueClass)
645
- self.priority = true
646
- elsif val.is_a?(FalseClass) #ignore
647
- self.priority = b
656
+ super(true)
657
+ elsif val.is_a?(FalseClass)
658
+ return
648
659
  else
649
660
  PhraseApp::ParamsHelpers::ParamsValidationError.new("invalid value #{val}")
650
661
  end
@@ -652,62 +663,63 @@ module RequestParams
652
663
 
653
664
  def quality=(val)
654
665
  if val.is_a?(TrueClass)
655
- self.quality = true
656
- elsif val.is_a?(FalseClass) #ignore
657
- self.quality = b
666
+ super(true)
667
+ elsif val.is_a?(FalseClass)
668
+ return
658
669
  else
659
670
  PhraseApp::ParamsHelpers::ParamsValidationError.new("invalid value #{val}")
660
671
  end
661
672
  end
662
673
 
663
674
  def source_locale_id=(val)
664
- self.source_locale_id = val
675
+ super(val)
665
676
  end
666
677
 
667
678
  def styleguide_id=(val)
668
- self.styleguide_id = val
679
+ super(val)
669
680
  end
670
681
 
671
682
  def tag=(val)
672
- self.tag = val
683
+ super(val)
673
684
  end
674
685
 
675
686
  def target_locale_ids=(val)
676
- self.target_locale_ids = val.split(',')
687
+ super(val.split(','))
677
688
  end
678
689
 
679
690
  def translation_type=(val)
680
- self.translation_type = val
691
+ super(val)
681
692
  end
682
693
 
683
694
  def unverify_translations_upon_delivery=(val)
684
695
  if val.is_a?(TrueClass)
685
- self.unverify_translations_upon_delivery = true
686
- elsif val.is_a?(FalseClass) #ignore
687
- self.unverify_translations_upon_delivery = b
696
+ super(true)
697
+ elsif val.is_a?(FalseClass)
698
+ return
688
699
  else
689
700
  PhraseApp::ParamsHelpers::ParamsValidationError.new("invalid value #{val}")
690
701
  end
691
702
  end
692
703
 
693
704
  def validate
694
- if self.category == nil || self.category == ""
705
+
706
+ if category == nil || category == ""
695
707
  raise PhraseApp::ParamsHelpers::ParamsValidationError.new("Required parameter \"category\" of \"TranslationOrderParams\" not set")
696
- endif self.lsp == nil || self.lsp == ""
708
+ end
709
+ if lsp == nil || lsp == ""
697
710
  raise PhraseApp::ParamsHelpers::ParamsValidationError.new("Required parameter \"lsp\" of \"TranslationOrderParams\" not set")
698
- endif self.source_locale_id == nil
711
+ end
712
+ if source_locale_id == nil
699
713
  raise PhraseApp::ParamsHelpers::ParamsValidationError.new("Required parameter \"source_locale_id\" of \"TranslationOrderParams\" not set")
700
- endif self.target_locale_ids == nil
714
+ end
715
+ if target_locale_ids == nil
701
716
  raise PhraseApp::ParamsHelpers::ParamsValidationError.new("Required parameter \"target_locale_ids\" of \"TranslationOrderParams\" not set")
702
- endif self.translation_type == nil || self.translation_type == ""
717
+ end
718
+ if translation_type == nil || translation_type == ""
703
719
  raise PhraseApp::ParamsHelpers::ParamsValidationError.new("Required parameter \"translation_type\" of \"TranslationOrderParams\" not set")
704
720
  end
705
721
  end
706
722
 
707
- def to_h
708
- @table.dup
709
- end
710
-
711
723
  end
712
724
  end
713
725
 
@@ -715,6 +727,8 @@ end
715
727
  module RequestParams
716
728
  # ProjectParams
717
729
  # == Parameters:
730
+ # account_id::
731
+ # Account ID to specify the actual account the project should be created in. Required if the requesting user is a member of multiple accounts.
718
732
  # main_format::
719
733
  # Main file format specified by its API Extension name. Used for locale downloads if no format is specified. For API Extension names of available file formats see <a href="guides/formats/">Format Guide</a> or our <a href="https://api.phraseapp.com/api/v2/formats">Formats API Endpoint</a>.
720
734
  # name::
@@ -722,34 +736,36 @@ module RequestParams
722
736
  # shares_translation_memory::
723
737
  # Indicates whether the project should share the account's translation memory
724
738
  class ProjectParams < ::OpenStruct
739
+
740
+ def account_id=(val)
741
+ super(val)
742
+ end
743
+
725
744
  def main_format=(val)
726
- self.main_format = val
745
+ super(val)
727
746
  end
728
747
 
729
748
  def name=(val)
730
- self.name = val
749
+ super(val)
731
750
  end
732
751
 
733
752
  def shares_translation_memory=(val)
734
753
  if val.is_a?(TrueClass)
735
- self.shares_translation_memory = true
736
- elsif val.is_a?(FalseClass) #ignore
737
- self.shares_translation_memory = b
754
+ super(true)
755
+ elsif val.is_a?(FalseClass)
756
+ return
738
757
  else
739
758
  PhraseApp::ParamsHelpers::ParamsValidationError.new("invalid value #{val}")
740
759
  end
741
760
  end
742
761
 
743
762
  def validate
744
- if self.name == nil || self.name == ""
763
+
764
+ if name == nil || name == ""
745
765
  raise PhraseApp::ParamsHelpers::ParamsValidationError.new("Required parameter \"name\" of \"ProjectParams\" not set")
746
766
  end
747
767
  end
748
768
 
749
- def to_h
750
- @table.dup
751
- end
752
-
753
769
  end
754
770
  end
755
771
 
@@ -784,68 +800,66 @@ module RequestParams
784
800
  # vocabulary_type::
785
801
  # Can be one of: not_specified, popular, technical, fictional.
786
802
  class StyleguideParams < ::OpenStruct
803
+
787
804
  def audience=(val)
788
- self.audience = val
805
+ super(val)
789
806
  end
790
807
 
791
808
  def business=(val)
792
- self.business = val
809
+ super(val)
793
810
  end
794
811
 
795
812
  def company_branding=(val)
796
- self.company_branding = val
813
+ super(val)
797
814
  end
798
815
 
799
816
  def formatting=(val)
800
- self.formatting = val
817
+ super(val)
801
818
  end
802
819
 
803
820
  def glossary_terms=(val)
804
- self.glossary_terms = val
821
+ super(val)
805
822
  end
806
823
 
807
824
  def grammar_consistency=(val)
808
- self.grammar_consistency = val
825
+ super(val)
809
826
  end
810
827
 
811
828
  def grammatical_person=(val)
812
- self.grammatical_person = val
829
+ super(val)
813
830
  end
814
831
 
815
832
  def literal_translation=(val)
816
- self.literal_translation = val
833
+ super(val)
817
834
  end
818
835
 
819
836
  def overall_tone=(val)
820
- self.overall_tone = val
837
+ super(val)
821
838
  end
822
839
 
823
840
  def samples=(val)
824
- self.samples = val
841
+ super(val)
825
842
  end
826
843
 
827
844
  def target_audience=(val)
828
- self.target_audience = val
845
+ super(val)
829
846
  end
830
847
 
831
848
  def title=(val)
832
- self.title = val
849
+ super(val)
833
850
  end
834
851
 
835
852
  def vocabulary_type=(val)
836
- self.vocabulary_type = val
853
+ super(val)
837
854
  end
838
855
 
839
856
  def validate
840
- if self.title == nil || self.title == ""
857
+
858
+ if title == nil || title == ""
841
859
  raise PhraseApp::ParamsHelpers::ParamsValidationError.new("Required parameter \"title\" of \"StyleguideParams\" not set")
842
860
  end
843
861
  end
844
862
 
845
- def to_h
846
- @table.dup
847
- end
848
-
849
863
  end
850
864
  end
851
865
 
@@ -856,20 +870,18 @@ module RequestParams
856
870
  # name::
857
871
  # Name of the tag
858
872
  class TagParams < ::OpenStruct
873
+
859
874
  def name=(val)
860
- self.name = val
875
+ super(val)
861
876
  end
862
877
 
863
878
  def validate
864
- if self.name == nil || self.name == ""
879
+
880
+ if name == nil || name == ""
865
881
  raise PhraseApp::ParamsHelpers::ParamsValidationError.new("Required parameter \"name\" of \"TagParams\" not set")
866
882
  end
867
883
  end
868
884
 
869
- def to_h
870
- @table.dup
871
- end
872
-
873
885
  end
874
886
  end
875
887
 
@@ -890,56 +902,56 @@ module RequestParams
890
902
  # unverified::
891
903
  # Indicates whether translation is unverified.
892
904
  class TranslationParams < ::OpenStruct
905
+
893
906
  def content=(val)
894
- self.content = val
907
+ super(val)
895
908
  end
896
909
 
897
910
  def excluded=(val)
898
911
  if val.is_a?(TrueClass)
899
- self.excluded = true
900
- elsif val.is_a?(FalseClass) #ignore
901
- self.excluded = b
912
+ super(true)
913
+ elsif val.is_a?(FalseClass)
914
+ return
902
915
  else
903
916
  PhraseApp::ParamsHelpers::ParamsValidationError.new("invalid value #{val}")
904
917
  end
905
918
  end
906
919
 
907
920
  def key_id=(val)
908
- self.key_id = val
921
+ super(val)
909
922
  end
910
923
 
911
924
  def locale_id=(val)
912
- self.locale_id = val
925
+ super(val)
913
926
  end
914
927
 
915
928
  def plural_suffix=(val)
916
- self.plural_suffix = val
929
+ super(val)
917
930
  end
918
931
 
919
932
  def unverified=(val)
920
933
  if val.is_a?(TrueClass)
921
- self.unverified = true
922
- elsif val.is_a?(FalseClass) #ignore
923
- self.unverified = b
934
+ super(true)
935
+ elsif val.is_a?(FalseClass)
936
+ return
924
937
  else
925
938
  PhraseApp::ParamsHelpers::ParamsValidationError.new("invalid value #{val}")
926
939
  end
927
940
  end
928
941
 
929
942
  def validate
930
- if self.content == nil || self.content == ""
943
+
944
+ if content == nil || content == ""
931
945
  raise PhraseApp::ParamsHelpers::ParamsValidationError.new("Required parameter \"content\" of \"TranslationParams\" not set")
932
- endif self.key_id == nil
946
+ end
947
+ if key_id == nil
933
948
  raise PhraseApp::ParamsHelpers::ParamsValidationError.new("Required parameter \"key_id\" of \"TranslationParams\" not set")
934
- endif self.locale_id == nil
949
+ end
950
+ if locale_id == nil
935
951
  raise PhraseApp::ParamsHelpers::ParamsValidationError.new("Required parameter \"locale_id\" of \"TranslationParams\" not set")
936
952
  end
937
953
  end
938
954
 
939
- def to_h
940
- @table.dup
941
- end
942
-
943
955
  end
944
956
  end
945
957
 
@@ -952,9 +964,11 @@ module RequestParams
952
964
  # file::
953
965
  # File to be imported
954
966
  # file_encoding::
955
- # Enforced a specific encoding on the file contents. Valid options are "UTF-8", "UTF-16" and "ISO-8859-1".
967
+ # Enforces a specific encoding on the file contents. Valid options are "UTF-8", "UTF-16" and "ISO-8859-1".
956
968
  # file_format::
957
969
  # File format. Auto-detected when possible and not specified.
970
+ # format_options::
971
+ # Additional options available for specific formats. See our format guide for complete list.
958
972
  # locale_id::
959
973
  # Locale of the file's content. Can be the name or public id of the locale. Preferred is the public id.
960
974
  # skip_unverification::
@@ -966,37 +980,42 @@ module RequestParams
966
980
  # update_translations::
967
981
  # Indicates whether existing translations should be updated with the file content.
968
982
  class UploadParams < ::OpenStruct
983
+
969
984
  def convert_emoji=(val)
970
985
  if val.is_a?(TrueClass)
971
- self.convert_emoji = true
972
- elsif val.is_a?(FalseClass) #ignore
973
- self.convert_emoji = b
986
+ super(true)
987
+ elsif val.is_a?(FalseClass)
988
+ return
974
989
  else
975
990
  PhraseApp::ParamsHelpers::ParamsValidationError.new("invalid value #{val}")
976
991
  end
977
992
  end
978
993
 
979
994
  def file=(val)
980
- self.file = val
995
+ super(val)
981
996
  end
982
997
 
983
998
  def file_encoding=(val)
984
- self.file_encoding = val
999
+ super(val)
985
1000
  end
986
1001
 
987
1002
  def file_format=(val)
988
- self.file_format = val
1003
+ super(val)
1004
+ end
1005
+
1006
+ def format_options=(val)
1007
+ super(JSON.load(val))
989
1008
  end
990
1009
 
991
1010
  def locale_id=(val)
992
- self.locale_id = val
1011
+ super(val)
993
1012
  end
994
1013
 
995
1014
  def skip_unverification=(val)
996
1015
  if val.is_a?(TrueClass)
997
- self.skip_unverification = true
998
- elsif val.is_a?(FalseClass) #ignore
999
- self.skip_unverification = b
1016
+ super(true)
1017
+ elsif val.is_a?(FalseClass)
1018
+ return
1000
1019
  else
1001
1020
  PhraseApp::ParamsHelpers::ParamsValidationError.new("invalid value #{val}")
1002
1021
  end
@@ -1004,38 +1023,35 @@ module RequestParams
1004
1023
 
1005
1024
  def skip_upload_tags=(val)
1006
1025
  if val.is_a?(TrueClass)
1007
- self.skip_upload_tags = true
1008
- elsif val.is_a?(FalseClass) #ignore
1009
- self.skip_upload_tags = b
1026
+ super(true)
1027
+ elsif val.is_a?(FalseClass)
1028
+ return
1010
1029
  else
1011
1030
  PhraseApp::ParamsHelpers::ParamsValidationError.new("invalid value #{val}")
1012
1031
  end
1013
1032
  end
1014
1033
 
1015
1034
  def tags=(val)
1016
- self.tags = val
1035
+ super(val)
1017
1036
  end
1018
1037
 
1019
1038
  def update_translations=(val)
1020
1039
  if val.is_a?(TrueClass)
1021
- self.update_translations = true
1022
- elsif val.is_a?(FalseClass) #ignore
1023
- self.update_translations = b
1040
+ super(true)
1041
+ elsif val.is_a?(FalseClass)
1042
+ return
1024
1043
  else
1025
1044
  PhraseApp::ParamsHelpers::ParamsValidationError.new("invalid value #{val}")
1026
1045
  end
1027
1046
  end
1028
1047
 
1029
1048
  def validate
1030
- if self.file == nil
1049
+
1050
+ if file == nil
1031
1051
  raise PhraseApp::ParamsHelpers::ParamsValidationError.new("Required parameter \"file\" of \"UploadParams\" not set")
1032
1052
  end
1033
1053
  end
1034
1054
 
1035
- def to_h
1036
- @table.dup
1037
- end
1038
-
1039
1055
  end
1040
1056
  end
1041
1057
 
@@ -1052,40 +1068,39 @@ module RequestParams
1052
1068
  # events::
1053
1069
  # List of event names to trigger the webhook (separated by comma)
1054
1070
  class WebhookParams < ::OpenStruct
1071
+
1055
1072
  def active=(val)
1056
1073
  if val.is_a?(TrueClass)
1057
- self.active = true
1058
- elsif val.is_a?(FalseClass) #ignore
1059
- self.active = b
1074
+ super(true)
1075
+ elsif val.is_a?(FalseClass)
1076
+ return
1060
1077
  else
1061
1078
  PhraseApp::ParamsHelpers::ParamsValidationError.new("invalid value #{val}")
1062
1079
  end
1063
1080
  end
1064
1081
 
1065
1082
  def callback_url=(val)
1066
- self.callback_url = val
1083
+ super(val)
1067
1084
  end
1068
1085
 
1069
1086
  def description=(val)
1070
- self.description = val
1087
+ super(val)
1071
1088
  end
1072
1089
 
1073
1090
  def events=(val)
1074
- self.events = val
1091
+ super(val)
1075
1092
  end
1076
1093
 
1077
1094
  def validate
1078
- if self.callback_url == nil || self.callback_url == ""
1095
+
1096
+ if callback_url == nil || callback_url == ""
1079
1097
  raise PhraseApp::ParamsHelpers::ParamsValidationError.new("Required parameter \"callback_url\" of \"WebhookParams\" not set")
1080
- endif self.events == nil || self.events == ""
1098
+ end
1099
+ if events == nil || events == ""
1081
1100
  raise PhraseApp::ParamsHelpers::ParamsValidationError.new("Required parameter \"events\" of \"WebhookParams\" not set")
1082
1101
  end
1083
1102
  end
1084
1103
 
1085
- def to_h
1086
- @table.dup
1087
- end
1088
-
1089
1104
  end
1090
1105
  end
1091
1106
 
@@ -1131,7 +1146,7 @@ module PhraseApp
1131
1146
  end
1132
1147
 
1133
1148
 
1134
-
1149
+
1135
1150
 
1136
1151
  module RequestParams
1137
1152
  # KeysDeleteParams
@@ -1141,22 +1156,19 @@ module RequestParams
1141
1156
  # q::
1142
1157
  # q_description_placeholder
1143
1158
  class KeysDeleteParams < ::OpenStruct
1159
+
1144
1160
  def locale_id=(val)
1145
- self.locale_id = val
1161
+ super(val)
1146
1162
  end
1147
1163
 
1148
1164
  def q=(val)
1149
- self.q = val
1165
+ super(val)
1150
1166
  end
1151
1167
 
1152
1168
  def validate
1153
1169
 
1154
1170
  end
1155
1171
 
1156
- def to_h
1157
- @table.dup
1158
- end
1159
-
1160
1172
  end
1161
1173
  end
1162
1174
 
@@ -1173,30 +1185,27 @@ module RequestParams
1173
1185
  # sort::
1174
1186
  # Sort by field. Can be one of: name, created_at, updated_at.
1175
1187
  class KeysListParams < ::OpenStruct
1188
+
1176
1189
  def locale_id=(val)
1177
- self.locale_id = val
1190
+ super(val)
1178
1191
  end
1179
1192
 
1180
1193
  def order=(val)
1181
- self.order = val
1194
+ super(val)
1182
1195
  end
1183
1196
 
1184
1197
  def q=(val)
1185
- self.q = val
1198
+ super(val)
1186
1199
  end
1187
1200
 
1188
1201
  def sort=(val)
1189
- self.sort = val
1202
+ super(val)
1190
1203
  end
1191
1204
 
1192
1205
  def validate
1193
1206
 
1194
1207
  end
1195
1208
 
1196
- def to_h
1197
- @table.dup
1198
- end
1199
-
1200
1209
  end
1201
1210
  end
1202
1211
 
@@ -1213,30 +1222,27 @@ module RequestParams
1213
1222
  # sort::
1214
1223
  # Sort by field. Can be one of: name, created_at, updated_at.
1215
1224
  class KeysSearchParams < ::OpenStruct
1225
+
1216
1226
  def locale_id=(val)
1217
- self.locale_id = val
1227
+ super(val)
1218
1228
  end
1219
1229
 
1220
1230
  def order=(val)
1221
- self.order = val
1231
+ super(val)
1222
1232
  end
1223
1233
 
1224
1234
  def q=(val)
1225
- self.q = val
1235
+ super(val)
1226
1236
  end
1227
1237
 
1228
1238
  def sort=(val)
1229
- self.sort = val
1239
+ super(val)
1230
1240
  end
1231
1241
 
1232
1242
  def validate
1233
1243
 
1234
1244
  end
1235
1245
 
1236
- def to_h
1237
- @table.dup
1238
- end
1239
-
1240
1246
  end
1241
1247
  end
1242
1248
 
@@ -1251,28 +1257,26 @@ module RequestParams
1251
1257
  # tags::
1252
1258
  # Tag or comma-separated list of tags to add to the matching collection of keys
1253
1259
  class KeysTagParams < ::OpenStruct
1260
+
1254
1261
  def locale_id=(val)
1255
- self.locale_id = val
1262
+ super(val)
1256
1263
  end
1257
1264
 
1258
1265
  def q=(val)
1259
- self.q = val
1266
+ super(val)
1260
1267
  end
1261
1268
 
1262
1269
  def tags=(val)
1263
- self.tags = val
1270
+ super(val)
1264
1271
  end
1265
1272
 
1266
1273
  def validate
1267
- if self.tags == nil || self.tags == ""
1274
+
1275
+ if tags == nil || tags == ""
1268
1276
  raise PhraseApp::ParamsHelpers::ParamsValidationError.new("Required parameter \"tags\" of \"keys_tagParams\" not set")
1269
1277
  end
1270
1278
  end
1271
1279
 
1272
- def to_h
1273
- @table.dup
1274
- end
1275
-
1276
1280
  end
1277
1281
  end
1278
1282
 
@@ -1287,28 +1291,26 @@ module RequestParams
1287
1291
  # tags::
1288
1292
  # Tag or comma-separated list of tags to add to the matching collection of keys
1289
1293
  class KeysUntagParams < ::OpenStruct
1294
+
1290
1295
  def locale_id=(val)
1291
- self.locale_id = val
1296
+ super(val)
1292
1297
  end
1293
1298
 
1294
1299
  def q=(val)
1295
- self.q = val
1300
+ super(val)
1296
1301
  end
1297
1302
 
1298
1303
  def tags=(val)
1299
- self.tags = val
1304
+ super(val)
1300
1305
  end
1301
1306
 
1302
1307
  def validate
1303
- if self.tags == nil || self.tags == ""
1308
+
1309
+ if tags == nil || tags == ""
1304
1310
  raise PhraseApp::ParamsHelpers::ParamsValidationError.new("Required parameter \"tags\" of \"keys_untagParams\" not set")
1305
1311
  end
1306
1312
  end
1307
1313
 
1308
- def to_h
1309
- @table.dup
1310
- end
1311
-
1312
1314
  end
1313
1315
  end
1314
1316
 
@@ -1319,7 +1321,7 @@ module RequestParams
1319
1321
  # convert_emoji::
1320
1322
  # Indicates whether Emoji symbols should be converted to actual Emojis. <a href="guides/working-with-phraseapp/emoji-support/">Working with Emojis</a>.
1321
1323
  # encoding::
1322
- # Specify an encoding for the locale file. See the <a href="guides/formats">format guide</a> for a list of supported encodings for each format.
1324
+ # Enforces a specific encoding on the file contents. Valid options are "UTF-8", "UTF-16" and "ISO-8859-1".
1323
1325
  # fallback_locale_id::
1324
1326
  # If a key has no translation in the locale being downloaded the translation in the fallback locale will be used. Provide the public ID of the locale that should be used as the fallback. Requires include_empty_translations to be set to <code>true</code>.
1325
1327
  # file_format::
@@ -1335,37 +1337,38 @@ module RequestParams
1335
1337
  # tag::
1336
1338
  # Limit result to keys tagged with the given tag (identified by its name).
1337
1339
  class LocaleDownloadParams < ::OpenStruct
1340
+
1338
1341
  def convert_emoji=(val)
1339
1342
  if val.is_a?(TrueClass)
1340
- self.convert_emoji = true
1341
- elsif val.is_a?(FalseClass) #ignore
1342
- self.convert_emoji = b
1343
+ super(true)
1344
+ elsif val.is_a?(FalseClass)
1345
+ return
1343
1346
  else
1344
1347
  PhraseApp::ParamsHelpers::ParamsValidationError.new("invalid value #{val}")
1345
1348
  end
1346
1349
  end
1347
1350
 
1348
1351
  def encoding=(val)
1349
- self.encoding = val
1352
+ super(val)
1350
1353
  end
1351
1354
 
1352
1355
  def fallback_locale_id=(val)
1353
- self.fallback_locale_id = val
1356
+ super(val)
1354
1357
  end
1355
1358
 
1356
1359
  def file_format=(val)
1357
- self.file_format = val
1360
+ super(val)
1358
1361
  end
1359
1362
 
1360
1363
  def format_options=(val)
1361
- self.format_options = JSON.load(val)
1364
+ super(JSON.load(val))
1362
1365
  end
1363
1366
 
1364
1367
  def include_empty_translations=(val)
1365
1368
  if val.is_a?(TrueClass)
1366
- self.include_empty_translations = true
1367
- elsif val.is_a?(FalseClass) #ignore
1368
- self.include_empty_translations = b
1369
+ super(true)
1370
+ elsif val.is_a?(FalseClass)
1371
+ return
1369
1372
  else
1370
1373
  PhraseApp::ParamsHelpers::ParamsValidationError.new("invalid value #{val}")
1371
1374
  end
@@ -1373,9 +1376,9 @@ module RequestParams
1373
1376
 
1374
1377
  def keep_notranslate_tags=(val)
1375
1378
  if val.is_a?(TrueClass)
1376
- self.keep_notranslate_tags = true
1377
- elsif val.is_a?(FalseClass) #ignore
1378
- self.keep_notranslate_tags = b
1379
+ super(true)
1380
+ elsif val.is_a?(FalseClass)
1381
+ return
1379
1382
  else
1380
1383
  PhraseApp::ParamsHelpers::ParamsValidationError.new("invalid value #{val}")
1381
1384
  end
@@ -1383,28 +1386,25 @@ module RequestParams
1383
1386
 
1384
1387
  def skip_unverified_translations=(val)
1385
1388
  if val.is_a?(TrueClass)
1386
- self.skip_unverified_translations = true
1387
- elsif val.is_a?(FalseClass) #ignore
1388
- self.skip_unverified_translations = b
1389
+ super(true)
1390
+ elsif val.is_a?(FalseClass)
1391
+ return
1389
1392
  else
1390
1393
  PhraseApp::ParamsHelpers::ParamsValidationError.new("invalid value #{val}")
1391
1394
  end
1392
1395
  end
1393
1396
 
1394
1397
  def tag=(val)
1395
- self.tag = val
1398
+ super(val)
1396
1399
  end
1397
1400
 
1398
1401
  def validate
1399
- if self.file_format == nil || self.file_format == ""
1402
+
1403
+ if file_format == nil || file_format == ""
1400
1404
  raise PhraseApp::ParamsHelpers::ParamsValidationError.new("Required parameter \"file_format\" of \"locale_downloadParams\" not set")
1401
1405
  end
1402
1406
  end
1403
1407
 
1404
- def to_h
1405
- @table.dup
1406
- end
1407
-
1408
1408
  end
1409
1409
  end
1410
1410
 
@@ -1421,44 +1421,42 @@ module RequestParams
1421
1421
  # unverified::
1422
1422
  # Indicates whether translation is unverified.
1423
1423
  class TranslationUpdateParams < ::OpenStruct
1424
+
1424
1425
  def content=(val)
1425
- self.content = val
1426
+ super(val)
1426
1427
  end
1427
1428
 
1428
1429
  def excluded=(val)
1429
1430
  if val.is_a?(TrueClass)
1430
- self.excluded = true
1431
- elsif val.is_a?(FalseClass) #ignore
1432
- self.excluded = b
1431
+ super(true)
1432
+ elsif val.is_a?(FalseClass)
1433
+ return
1433
1434
  else
1434
1435
  PhraseApp::ParamsHelpers::ParamsValidationError.new("invalid value #{val}")
1435
1436
  end
1436
1437
  end
1437
1438
 
1438
1439
  def plural_suffix=(val)
1439
- self.plural_suffix = val
1440
+ super(val)
1440
1441
  end
1441
1442
 
1442
1443
  def unverified=(val)
1443
1444
  if val.is_a?(TrueClass)
1444
- self.unverified = true
1445
- elsif val.is_a?(FalseClass) #ignore
1446
- self.unverified = b
1445
+ super(true)
1446
+ elsif val.is_a?(FalseClass)
1447
+ return
1447
1448
  else
1448
1449
  PhraseApp::ParamsHelpers::ParamsValidationError.new("invalid value #{val}")
1449
1450
  end
1450
1451
  end
1451
1452
 
1452
1453
  def validate
1453
- if self.content == nil || self.content == ""
1454
+
1455
+ if content == nil || content == ""
1454
1456
  raise PhraseApp::ParamsHelpers::ParamsValidationError.new("Required parameter \"content\" of \"translation_updateParams\" not set")
1455
1457
  end
1456
1458
  end
1457
1459
 
1458
- def to_h
1459
- @table.dup
1460
- end
1461
-
1462
1460
  end
1463
1461
  end
1464
1462
 
@@ -1473,26 +1471,23 @@ module RequestParams
1473
1471
  # sort::
1474
1472
  # Sort criteria. Can be one of: key_name, created_at, updated_at.
1475
1473
  class TranslationsByKeyParams < ::OpenStruct
1474
+
1476
1475
  def order=(val)
1477
- self.order = val
1476
+ super(val)
1478
1477
  end
1479
1478
 
1480
1479
  def q=(val)
1481
- self.q = val
1480
+ super(val)
1482
1481
  end
1483
1482
 
1484
1483
  def sort=(val)
1485
- self.sort = val
1484
+ super(val)
1486
1485
  end
1487
1486
 
1488
1487
  def validate
1489
1488
 
1490
1489
  end
1491
1490
 
1492
- def to_h
1493
- @table.dup
1494
- end
1495
-
1496
1491
  end
1497
1492
  end
1498
1493
 
@@ -1507,26 +1502,23 @@ module RequestParams
1507
1502
  # sort::
1508
1503
  # Sort criteria. Can be one of: key_name, created_at, updated_at.
1509
1504
  class TranslationsByLocaleParams < ::OpenStruct
1505
+
1510
1506
  def order=(val)
1511
- self.order = val
1507
+ super(val)
1512
1508
  end
1513
1509
 
1514
1510
  def q=(val)
1515
- self.q = val
1511
+ super(val)
1516
1512
  end
1517
1513
 
1518
1514
  def sort=(val)
1519
- self.sort = val
1515
+ super(val)
1520
1516
  end
1521
1517
 
1522
1518
  def validate
1523
1519
 
1524
1520
  end
1525
1521
 
1526
- def to_h
1527
- @table.dup
1528
- end
1529
-
1530
1522
  end
1531
1523
  end
1532
1524
 
@@ -1541,26 +1533,23 @@ module RequestParams
1541
1533
  # sort::
1542
1534
  # Sort criteria. Can be one of: key_name, created_at, updated_at.
1543
1535
  class TranslationsExcludeParams < ::OpenStruct
1536
+
1544
1537
  def order=(val)
1545
- self.order = val
1538
+ super(val)
1546
1539
  end
1547
1540
 
1548
1541
  def q=(val)
1549
- self.q = val
1542
+ super(val)
1550
1543
  end
1551
1544
 
1552
1545
  def sort=(val)
1553
- self.sort = val
1546
+ super(val)
1554
1547
  end
1555
1548
 
1556
1549
  def validate
1557
1550
 
1558
1551
  end
1559
1552
 
1560
- def to_h
1561
- @table.dup
1562
- end
1563
-
1564
1553
  end
1565
1554
  end
1566
1555
 
@@ -1575,26 +1564,23 @@ module RequestParams
1575
1564
  # sort::
1576
1565
  # Sort criteria. Can be one of: key_name, created_at, updated_at.
1577
1566
  class TranslationsIncludeParams < ::OpenStruct
1567
+
1578
1568
  def order=(val)
1579
- self.order = val
1569
+ super(val)
1580
1570
  end
1581
1571
 
1582
1572
  def q=(val)
1583
- self.q = val
1573
+ super(val)
1584
1574
  end
1585
1575
 
1586
1576
  def sort=(val)
1587
- self.sort = val
1577
+ super(val)
1588
1578
  end
1589
1579
 
1590
1580
  def validate
1591
1581
 
1592
1582
  end
1593
1583
 
1594
- def to_h
1595
- @table.dup
1596
- end
1597
-
1598
1584
  end
1599
1585
  end
1600
1586
 
@@ -1609,26 +1595,23 @@ module RequestParams
1609
1595
  # sort::
1610
1596
  # Sort criteria. Can be one of: key_name, created_at, updated_at.
1611
1597
  class TranslationsListParams < ::OpenStruct
1598
+
1612
1599
  def order=(val)
1613
- self.order = val
1600
+ super(val)
1614
1601
  end
1615
1602
 
1616
1603
  def q=(val)
1617
- self.q = val
1604
+ super(val)
1618
1605
  end
1619
1606
 
1620
1607
  def sort=(val)
1621
- self.sort = val
1608
+ super(val)
1622
1609
  end
1623
1610
 
1624
1611
  def validate
1625
1612
 
1626
1613
  end
1627
1614
 
1628
- def to_h
1629
- @table.dup
1630
- end
1631
-
1632
1615
  end
1633
1616
  end
1634
1617
 
@@ -1643,26 +1626,23 @@ module RequestParams
1643
1626
  # sort::
1644
1627
  # Sort criteria. Can be one of: key_name, created_at, updated_at.
1645
1628
  class TranslationsSearchParams < ::OpenStruct
1629
+
1646
1630
  def order=(val)
1647
- self.order = val
1631
+ super(val)
1648
1632
  end
1649
1633
 
1650
1634
  def q=(val)
1651
- self.q = val
1635
+ super(val)
1652
1636
  end
1653
1637
 
1654
1638
  def sort=(val)
1655
- self.sort = val
1639
+ super(val)
1656
1640
  end
1657
1641
 
1658
1642
  def validate
1659
1643
 
1660
1644
  end
1661
1645
 
1662
- def to_h
1663
- @table.dup
1664
- end
1665
-
1666
1646
  end
1667
1647
  end
1668
1648
 
@@ -1677,26 +1657,23 @@ module RequestParams
1677
1657
  # sort::
1678
1658
  # Sort criteria. Can be one of: key_name, created_at, updated_at.
1679
1659
  class TranslationsUnverifyParams < ::OpenStruct
1660
+
1680
1661
  def order=(val)
1681
- self.order = val
1662
+ super(val)
1682
1663
  end
1683
1664
 
1684
1665
  def q=(val)
1685
- self.q = val
1666
+ super(val)
1686
1667
  end
1687
1668
 
1688
1669
  def sort=(val)
1689
- self.sort = val
1670
+ super(val)
1690
1671
  end
1691
1672
 
1692
1673
  def validate
1693
1674
 
1694
1675
  end
1695
1676
 
1696
- def to_h
1697
- @table.dup
1698
- end
1699
-
1700
1677
  end
1701
1678
  end
1702
1679
 
@@ -1711,26 +1688,23 @@ module RequestParams
1711
1688
  # sort::
1712
1689
  # Sort criteria. Can be one of: key_name, created_at, updated_at.
1713
1690
  class TranslationsVerifyParams < ::OpenStruct
1691
+
1714
1692
  def order=(val)
1715
- self.order = val
1693
+ super(val)
1716
1694
  end
1717
1695
 
1718
1696
  def q=(val)
1719
- self.q = val
1697
+ super(val)
1720
1698
  end
1721
1699
 
1722
1700
  def sort=(val)
1723
- self.sort = val
1701
+ super(val)
1724
1702
  end
1725
1703
 
1726
1704
  def validate
1727
1705
 
1728
1706
  end
1729
1707
 
1730
- def to_h
1731
- @table.dup
1732
- end
1733
-
1734
1708
  end
1735
1709
  end
1736
1710
 
@@ -2532,7 +2506,7 @@ end
2532
2506
  return PhraseApp::ResponseObjects::TranslationKeyDetails.new(JSON.load(rc.body)), err
2533
2507
  end
2534
2508
 
2535
- # Delete all keys matching query. Same constraints as list.
2509
+ # Delete all keys matching query. Same constraints as list. Please limit the number of affected keys to about 1,000 as you might experience timeouts otherwise.
2536
2510
  # API Path: /v2/projects/:project_id/keys
2537
2511
  # == Parameters:
2538
2512
  # project_id::
@@ -3873,6 +3847,12 @@ end
3873
3847
  data_hash["file_format"] = params.file_format
3874
3848
  end
3875
3849
 
3850
+ if params.format_options != nil
3851
+ params.format_options.each do |key, value|
3852
+ data_hash["format_options"][key] = value
3853
+ end
3854
+ end
3855
+
3876
3856
  if params.locale_id != nil
3877
3857
  data_hash["locale_id"] = params.locale_id
3878
3858
  end